Jump to content

secret2010

Membru
  • Posts

    13
  • Joined

  • Last visited

    Never

Posts posted by secret2010

  1. Pui sub public OnPlayerCommandText asta

    pff imi da o erroare :'C:\Users\Jani\Desktop\SA-MP\filterscripts\help.pwn(1) : error 010: invalid function or declaration

    Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

    1 Error.

    dar trebuie bagat in Game Mode,sau in FIlescript?

  2. [pawn]// This is a comment

    // uncomment the line below if you want to write a filterscript

    //#define FILTERSCRIPT

    #include <a_samp>

    #if defined FILTERSCRIPT

    public OnFilterScriptInit()

    {

    print("\n--------------------------------------");

    print(" Blank Filterscript by your name here");

    print("--------------------------------------\n");

    return 1;

    }

    public OnFilterScriptExit()

    {

    public OnPlayerCommandText(playerid, cmdtext[]) {

    if (strcmp(cmdtext, "/ajutoare", true)==0){

    SendClientMessage(playerid, 0x33AA33AA, "Daca ati gasit un bug/hacker face-ti un raport tastand: /raport:");

    SendClientMessage(playerid, 0xFFFFFFAA, "tastatii: /comenzi pentru a vedea toate comenzile de pleyer.");

    return 1;}

    if (strcmp(cmdtext, "/creatori", true)==0){

    SendClientMessage(playerid, 0x33AA33AA, "OWN----[CHK]rObErT--------");

    return 1;}

    if (strcmp(cmdtext, "/comenzi", true)==0){

    SendClientMessage(playerid, 0x33AA33AA, "---Lista de Comenzi:---");

    SendClientMessage(playerid, 0xFFFFFFAA, "comenzi cont: /login /registrare /status /schimba parola ");

    SendClientMessage(playerid, 0xFFFFFFAA, "Comenzii Animatii: /mainilesus /telefon /telefon0 /beat /bomba /arestat /rade ");

    SendClientMessage(playerid, 0xFFFFFFAA, "Comenzii Animatii: /priveste /spargator /cu bratele încrucisate /vomitat /acoperire /gandeste /mananca ");

    SendClientMessage(playerid, 0xFFFFFFAA, "Comenzii Animatii: /priveste /spargator /cu bratele încrucisate /vomitat /acoperire /gandeste /mananca ");

    SendClientMessage(playerid, 0xFFFFFFAA, "/salut /fund /traficant de droguri /Murind de fisurilor /fumeaza fumeazaF /stai /[censured by the system] /chat /taichi /danseaza /bea /animlist2 /animlist ");

    SendClientMessage(playerid, 0xFFFFFFAA, "Alte comenzi: /teleportari");

    return 1;}

    #endif[/pawn]

    Unde trebuie bagat? ca ma chinui de dimineata:S

  3. Plisss ajutati-ma , unde pun codul de mapa? /la-m bagat si in /FileScript da nu merge...(Nu  mi-a dat nici o erroare la Pawno cand am pus...)

    Unde trebuie pus?

    [pawn]CreateObject(1946, 2290.6000976563, -1519.5999755859, 26.10000038147, 0, 0, 0);

    CreateObject(1946, 2290.599609375, -1519.599609375, 26.10000038147, 0, 0, 0);

    CreateObject(1946, 2290.6000976563, -1534.8000488281, 26.10000038147, 0, 0, 0);

    CreateObject(1946, 2316.8000488281, -1519.3000488281, 24.5, 0, 0, 0);

    CreateObject(1946, 2317, -1536.3000488281, 24.5, 0, 0, 0);

    CreateObject(17951, 2255.5, -1461.0999755859, 24.799999237061, 0, 0, 268);

    CreateObject(1641, 2404.5, -1481, 22.799999237061, 0, 0, 0);

    CreateObject(1641, 2399, -1489.5, 22.799999237061, 0, 0, 0);

    CreateObject(970, 2403.3000488281, -1513.6999511719, 23.39999961853, 0, 0, 0);

    CreateObject(1228, 2387.8994140625, -1509.7998046875, 23.39999961853, 0, 0, 0);

    CreateObject(1228, 2387.8000488281, -1507.1999511719, 23.39999961853, 0, 0, 0);

    CreateObject(1228, 2387.8999023438, -1504.0999755859, 23.39999961853, 0, 0, 0);

    CreateObject(1228, 2387.8000488281, -1500.9000244141, 23.39999961853, 0, 0, 0);

    CreateObject(1228, 2387.8994140625, -1497.099609375, 23.39999961853, 0, 0, 0);

    CreateObject(1228, 2388, -1494.0999755859, 23.39999961853, 0, 0, 0);

    CreateObject(1228, 2387.6000976563, -1491, 23.39999961853, 0, 0, 0);

    CreateObject(3749, 2418.3999023438, -1486.3000488281, 28.700000762939, 0, 0, 266);

    CreateObject(990, 2410.5, -1479.9000244141, 24.39999961853, 0, 0, 0);

    CreateObject(990, 2401.3994140625, -1479.7998046875, 24.39999961853, 0, 0, 0);

    CreateObject(990, 2391.3994140625, -1479.7998046875, 24.39999961853, 0, 0, 0);

    CreateObject(990, 2381.5, -1479.5, 24.700000762939, 0, 0, 0);

    CreateObject(970, 2390.8000488281, -1480.1999511719, 23.39999961853, 0, 0, 0);

    CreateObject(970, 2395.1000976563, -1480.1999511719, 23.39999961853, 0, 0, 0);

    CreateObject(970, 2399.6999511719, -1480.3000488281, 23.39999961853, 0, 0, 0);

    CreateObject(970, 2404.3000488281, -1480.3000488281, 23.39999961853, 0, 0, 0);

    CreateObject(970, 2413.1999511719, -1480.4000244141, 23.39999961853, 0, 0, 0);

    CreateObject(970, 2408.7998046875, -1480.3994140625, 23.39999961853, 0, 0, 0);

    CreateObject(16090, 2421.1000976563, -1486.6999511719, 22.799999237061, 0, 0, 176);

    CreateObject(3578, 2411, -1478.3000488281, 23.60000038147, 0, 0, 0);

    CreateObject(3578, 2400.6000976563, -1478.3000488281, 23.60000038147, 0, 0, 0);

    CreateObject(1949, 2379.6999511719, -1467.5, 27.5, 0, 0, 0);

    CreateObject(3578, 2390.5, -1478.4000244141, 23.60000038147, 0, 0, 0);

    CreateObject(3578, 2380.1000976563, -1480.0999755859, 23.799999237061, 0, 0, 0);

    CreateObject(996, 2407.3000488281, -1478, 25.10000038147, 0, 0, 0);

    CreateObject(996, 2398, -1478.1999511719, 25.10000038147, 0, 0, 358);

    CreateObject(996, 2380.1000976563, -1479.0999755859, 24.799999237061, 0, 0, 0);

    CreateObject(996, 2385.8999023438, -1479.1999511719, 25.89999961853, 0, 0, 0);

    CreateObject(996, 2388.6999511719, -1476.4000244141, 23.60000038147, 0, 0, 0);

    CreateObject(996, 2406.5, -1478, 26, 0, 0, 0);

    CreateObject(996, 2383.1000976563, -1479.8000488281, 25.60000038147, 0, 0, 0);

    CreateObject(996, 2386.6000976563, -1481.5999755859, 25, 0, 0, 0);

    CreateObject(996, 2395, -1468.1999511719, 27.5, 0, 0, 0);

    CreateObject(996, 2378.1000976563, -1479, 23.700000762939, 0, 0, 0);

    CreateObject(996, 2389.1000976563, -1478.0999755859, 26.200000762939, 0, 0, 0);

    CreateObject(970, 2397.3000488281, -1514.0999755859, 23.39999961853, 0, 0, 0);

    CreateObject(970, 2390.8999023438, -1514.0999755859, 23.39999961853, 0, 0, 0);

    CreateObject(970, 2384.8999023438, -1512.6999511719, 23.39999961853, 0, 0, 338);

    CreateObject(1228, 2387.8000488281, -1513.8000488281, 23.39999961853, 0, 0, 80);

    CreateObject(2682, 2103.8999023438, -1812.4000244141, 13.5, 0, 0, 0);

    CreateObject(2682, 2102, -1814.8000488281, 13.39999961853, 0, 0, 0);

    CreateObject(2682, 2103.3000488281, -1817.1999511719, 13.5, 0, 0, 0);

    CreateObject(2682, 2102.1000976563, -1819.9000244141, 13.5, 0, 0, 0);

    CreateObject(2682, 2103.8000488281, -1800.6999511719, 13.5, 0, 0, 0);

    CreateObject(2682, 2101.5, -1798.3000488281, 13.5, 0, 0, 0);

    CreateObject(2682, 2103.6000976563, -1796.1999511719, 13.5, 0, 0, 0);

    CreateObject(1582, 2102, -1798.0999755859, 13.300000190735, 0, 0, 0);

    CreateObject(2682, 2102.1000976563, -1793.1999511719, 13.5, 0, 0, 0);[/pawn]

  4. Am gasit un script de basket ,la-m pus ,si la-m testat si merge dar ,nu merge sa intr-u in masini ,cand dau F sau enter ,face o Animatie

    o pot rezolva cumva sa faca de alta tasta?

    scriptul este:

    [pawn]//Zaster's BasketBall MiniGame Script

    //Please Don't Not Remove The Credits!

    // Enjoy For This Script! :)

    #include <a_samp>

    new HavingBall[MAX_PLAYERS];

    new Anim[MAX_PLAYERS];

    new Ball;

    new BallStatus;

    new Baller;

    new ShootingBall;

    new BallBounce;

    public OnPlayerCommandText(playerid, cmdtext[])

    {

    if (strcmp("/basketball", cmdtext, true, 6) == 0)

    {

    new Float:x, Float:y, Float:z;

    GetPlayerPos(playerid, x, y, z);

    DestroyObject(Ball);

    Ball = CreateObject(2114, x+random(3), y+random(3), z-0.8, 0, 0, 96);

    SendClientMessage(playerid,-1,"{FF0000}Let's Start The {FFF000}Basket Game!");

            new Text3D:label = Create3DTextLabel("I Play Basket!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);

            Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);

    return 1;

    }

    return 0;

    }

    public OnObjectMoved(objectid)

    {

        new i = Baller;

        if(ShootingBall == 2)

        {

    BallDown2(i);

    return 1;

        }

        else if(ShootingBall == 3)

        {

    BallDown3(i);

    return 1;

        }

        else if(ShootingBall == 4)

        {

    BallDown4(i);

    return 1;

        }

        else if(ShootingBall == 5)

        {

    BallDown5(i);

    return 1;

        }

        else if(ShootingBall == 6)

        {

            ApplyAnimation(i,"BSKTBALL","BBALL_walk",4.1,1,1,1,1,1);

    HavingBall = 1;

    Anim = 0;

        }

        if(BallBounce == 1)

        {

            new Float:x, Float:y, Float:z;

        GetObjectPos(Ball, x, y, z);

        MoveObject(Ball, x, y, z+1.2, 4);

        BallBounce = 2;

    }

    else if(BallBounce == 2)

        {

            new Float:x, Float:y, Float:z;

        GetObjectPos(Ball, x, y, z);

        MoveObject(Ball, x, y, z-1.2, 4);

        BallBounce = 3;

    }

    else if(BallBounce == 3)

        {

            new Float:x, Float:y, Float:z;

        GetObjectPos(Ball, x, y, z);

        MoveObject(Ball, x, y, z+0.8, 3);

        BallBounce = 4;

    }

    else if(BallBounce == 4)

        {

            new Float:x, Float:y, Float:z;

        GetObjectPos(Ball, x, y, z);

        MoveObject(Ball, x, y, z-0.8, 3);

        BallBounce = 5;

    }

    else if(BallBounce == 5)

        {

            new Float:x, Float:y, Float:z;

        GetObjectPos(Ball, x, y, z);

        MoveObject(Ball, x, y, z+0.5, 2);

        BallBounce = 6;

    }

    else if(BallBounce == 6)

        {

            new Float:x, Float:y, Float:z;

        GetObjectPos(Ball, x, y, z);

        MoveObject(Ball, x, y, z-0.5, 2);

        BallBounce = 7;

    }

    else if(BallBounce == 7)

        {

            new Float:x, Float:y, Float:z;

        GetObjectPos(Ball, x, y, z);

        MoveObject(Ball, x, y, z+0.2, 1);

        BallBounce = 8;

    }

    else if(BallBounce == 8)

        {

            new Float:x, Float:y, Float:z;

        GetObjectPos(Ball, x, y, z);

        MoveObject(Ball, x, y, z-0.2, 1);

        BallBounce = 0;

    }

        if(!HavingBall) return 1;

    new Keys, ud, lr;

    GetPlayerKeys(i, Keys, ud, lr);

        if(Anim)

        {

            switch(BallStatus)

        {

    case 0:

    {

    BallStatus = 1;

    new Float:x, Float:y, Float:z;

    GetPlayerPos(i, x, y, z);

    StopObject(Ball);

    new Float:x2, Float:y2;

        GetXYInFrontOfPlayer(i, x2, y2, 0.4);

    MoveObject(Ball, x2, y2, z+0.1, 5.5);

    }

    case 1:

    {

            BallStatus = 0;

            new Float:x, Float:y, Float:z;

    GetPlayerPos(i, x, y, z);

    StopObject(Ball);

    new Float:x2, Float:y2;

    GetXYInFrontOfPlayer(i, x2, y2, 0.4);

    MoveObject(Ball, x2, y2, z-0.8, 5.5);

    }

    }

    return 1;

        }

        if(Keys & KEY_SPRINT)

    {

            ApplyAnimation(i,"BSKTBALL","BBALL_run",4.1,1,1,1,1,1);

            switch(BallStatus)

    {

    case 0:

    {

    BallStatus = 1;

    new Float:x, Float:y, Float:z;

    GetPlayerPos(i, x, y, z);

    StopObject(Ball);

    new Float:x2, Float:y2;

            GetXYInFrontOfPlayer(i, x2, y2, 1.5);

    MoveObject(Ball, x2, y2, z+0.1, 8);

    }

    case 1:

    {

            BallStatus = 0;

            new Float:x, Float:y, Float:z;

    GetPlayerPos(i, x, y, z);

    StopObject(Ball);

    new Float:x2, Float:y2;

    GetXYInFrontOfPlayer(i, x2, y2, 1.5);

    MoveObject(Ball, x2, y2, z-0.8, 8);

    }

    }

    return 1;

        }

        else

        {

            ApplyAnimation(i,"BSKTBALL","BBALL_walk",4.1,1,1,1,1,1);

        }

    switch(BallStatus)

    {

    case 0:

    {

    BallStatus = 1;

    new Float:x, Float:y, Float:z;

    GetPlayerPos(i, x, y, z);

    StopObject(Ball);

    new Float:x2, Float:y2;

        GetXYInFrontOfPlayer(i, x2, y2, 1.2);

    MoveObject(Ball, x2, y2, z+0.1, 5);

    }

    case 1:

    {

            BallStatus = 0;

            new Float:x, Float:y, Float:z;

    GetPlayerPos(i, x, y, z);

    StopObject(Ball);

    new Float:x2, Float:y2;

    GetXYInFrontOfPlayer(i, x2, y2, 1.2);

    MoveObject(Ball, x2, y2, z-0.8, 5);

    }

    }

        return 1;

    }

    public OnPlayerDisconnect(playerid, reason)

    {

        HavingBall[playerid] = 0;

        Anim[playerid] = 0;

        if(HavingBall[playerid]) Baller = 999;

    return 1;

    }

    public OnPlayerDeath(playerid, killerid, reason)

    {

        HavingBall[playerid] = 0;

        if(HavingBall[playerid]) Baller = 999;

    return 1;

    }

    public OnFilterScriptInit()

    {

    Baller = 999;

    DestroyObject(Ball);

    Ball = CreateObject(2114, 2782.3027,-2019.0826,13.5547-0.8, 0, 0, 96);

    return 1;

    }

    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

    {

        if ((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK) && !IsPlayerInAnyVehicle(playerid))

    {

    if(HavingBall[playerid])

    {

                ApplyAnimation(playerid,"BSKTBALL","BBALL_idleloop",4.1,1,1,1,1,1);

    }

    else

    {

                ApplyAnimation(playerid,"BSKTBALL","BBALL_def_loop",4.0,1,0,0,0,0);

    }

    Anim[playerid] = 1;

    }

    if (!(newkeys & KEY_SECONDARY_ATTACK) && (oldkeys & KEY_SECONDARY_ATTACK) && !IsPlayerInAnyVehicle(playerid))

    {

    ClearAnimations(playerid);

    Anim[playerid] = 0;

    }

    if(newkeys & KEY_FIRE && !IsPlayerInAnyVehicle(playerid))

    {

            if(!HavingBall[playerid])

    {

    new Float:x, Float:y, Float:z;

    GetObjectPos(Ball, x, y, z);

    if(IsPlayerInRangeOfPoint(playerid, 1.5, x, y, z))

    {

    HavingBall[playerid] = 1;

    ApplyAnimation(playerid,"BSKTBALL","BBALL_pickup",4.0,0,0,0,0,0);

    if(Baller != 999)

    {

    HavingBall[baller] = 0;

    ClearAnimations(Baller);

    ApplyAnimation(Baller, "CARRY", "crry_prtial", 1.0, 0, 0, 0, 0, 0);

    ApplyAnimation(playerid,"BSKTBALL","BBALL_walk",4.1,1,1,1,1,1);

    }

    Baller = playerid;

    BallStatus = 1;

    new Float:x2, Float:y2;

    GetXYInFrontOfPlayer(playerid, x2, y2, 0.8);

    GetPlayerPos(playerid, x, y, z);

    StopObject(Ball);

    MoveObject(Ball, x2, y2, z, 2.5);

    Anim[playerid] = 0;

    BallBounce = 0;

    }

    }

    else

    {

                if(IsPlayerInRangeOfPoint(playerid, 2, 2795.5237,-2019.6152,13.5547))

    {

    MoveObject(Ball, 2794.9612,-2019.5415,15.5075, 7.5);

    SetPlayerPos(playerid, 2795.5237,-2019.6152,13.5547);

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Dnk",4.0,1,0,0,0,0);

    HavingBall[playerid] = 0;

    SetTimerEx("ClearAnim", 1100, 0, "d", playerid);

    SetTimerEx("BallDown2", 1100, 0, "d", playerid);

    return 1;

    }

                else if(IsPlayerInRangeOfPoint(playerid, 4, 2795.5237,-2019.6152,13.5547) && IsPlayerFacingPoint(playerid, 20, 2795.5237,-2019.6152,13.5547))

    {

    new rand = random(1);

    if(rand == 0)

    {

    MoveObject(Ball, 2794.9612,-2019.5415,15.5075, 10.5+random(4));

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);

    ShootingBall = 2;

    HavingBall[playerid] = 0;

    return 1;

    }

    ShootMiss(playerid);

    return 1;

    }

                else if(IsPlayerInRangeOfPoint(playerid, 7, 2795.5237,-2019.6152,13.5547) && IsPlayerFacingPoint(playerid, 20, 2795.5237,-2019.6152,13.5547))

    {

    new rand = random(2);

    if(rand == 0)

    {

    MoveObject(Ball, 2794.9612,-2019.5415,15.5075, 11.0+random(4));

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);

    ShootingBall = 2;

    HavingBall[playerid] = 0;

    return 1;

    }

    ShootMiss(playerid);

    return 1;

    }

    else if(IsPlayerInRangeOfPoint(playerid, 10, 2795.5237,-2019.6152,13.5547) && IsPlayerFacingPoint(playerid, 20, 2795.5237,-2019.6152,13.5547))

    {

    new rand = random(3);

    if(rand == 0)

    {

    MoveObject(Ball, 2794.9612,-2019.5415,15.5075, 11.5+random(4));

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);

    ShootingBall = 2;

    HavingBall[playerid] = 0;

    return 1;

    }

    ShootMiss(playerid);

    return 1;

    }

    else if(IsPlayerInRangeOfPoint(playerid, 2, 2768.3669,-2019.6644,13.5547))

    {

    MoveObject(Ball, 2768.6289,-2019.7227,15.6287, 7.5);

    SetPlayerPos(playerid, 2768.3669,-2019.6644,13.5547);

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Dnk",4.0,1,0,0,0,0);

    HavingBall[playerid] = 0;

    SetTimerEx("ClearAnim", 800, 0, "d", playerid);

    SetTimerEx("BallDown3", 1100, 0, "d", playerid);

    return 1;

    }

                else if(IsPlayerInRangeOfPoint(playerid, 4, 2768.3669,-2019.6644,13.5547) && IsPlayerFacingPoint(playerid, 20, 2768.3669,-2019.6644,13.5547))

    {

    new rand = random(1);

    if(rand == 0)

    {

    MoveObject(Ball, 2768.6289,-2019.7227,15.6287, 10.5+random(4));

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);

    ShootingBall = 3;

    HavingBall[playerid] = 0;

    return 1;

    }

    ShootMiss2(playerid);

    return 1;

    }

                else if(IsPlayerInRangeOfPoint(playerid, 7, 2768.3669,-2019.6644,13.5547) && IsPlayerFacingPoint(playerid, 20, 2768.3669,-2019.6644,13.5547))

    {

    new rand = random(2);

    if(rand == 0)

    {

    MoveObject(Ball, 2768.6289,-2019.7227,15.6287, 11.0+random(4));

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);

    ShootingBall = 3;

    HavingBall[playerid] = 0;

    return 1;

    }

    ShootMiss2(playerid);

    return 1;

    }

    else if(IsPlayerInRangeOfPoint(playerid, 10, 2768.3669,-2019.6644,13.5547) && IsPlayerFacingPoint(playerid, 20, 2768.3669,-2019.6644,13.5547))

    {

    new rand = random(3);

    if(rand == 0)

    {

    MoveObject(Ball, 2768.6289,-2019.7227,15.6287, 11.5+random(4));

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);

    ShootingBall = 3;

    HavingBall[playerid] = 0;

    return 1;

    }

                    ShootMiss2(playerid);

    return 1;

    }

    for(new i; i < MAX_PLAYERS; i++)

    {

    if(IsPlayerConnected(i))

    {

    if(IsPlayerFacingPlayer(playerid, i, 15))

    {

    new Float:x, Float:y, Float:z;

    GetPlayerPos(i, x, y, z);

    if(IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z))

    {

    Baller = i;

    HavingBall[playerid] = 0;

    ClearAnimations(playerid);

    ApplyAnimation(playerid,"BSKTBALL","BBALL_def_loop",4.0,1,0,0,0,0);

    SetTimerEx("ClearAnim", 700, 0, "d", playerid);

    MoveObject(Ball, x, y, z, 13+random(4));

    Anim = 0;

    ShootingBall = 6;

    ApplyAnimation(i,"BSKTBALL","BBALL_def_loop",4.0,1,0,0,0,0);

    return 1;

    }

    }

    }

    }

    new Float:x, Float:y, Float:z;

    GetPlayerPos(playerid, x, y, z);

    HavingBall[playerid] = 0;

    new Float:x2, Float:y2;

    GetXYInFrontOfPlayer(playerid, x2, y2, 6.0);

    SetTimerEx("BallDown", 600, 0, "df", playerid, z);

    MoveObject(Ball, x2, y2, z+random(8)+3, 10.0+random(4));

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);

    ShootingBall = 0;

    }

    }

    return 1;

    }

    stock IsPlayerFacingPoint(playerid, Float:dOffset, Float:pX, Float:pY, Float:pZ)

    {

    #pragma unused pZ

    new

    Float:X,

    Float:Y,

    Float:Z,

    Float:pA,

    Float:ang;

    if(!IsPlayerConnected(playerid)) return 0;

    GetPlayerPos(playerid, X, Y, Z);

    GetPlayerFacingAngle(playerid, pA);

    if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);

    else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0);

    else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);

    if(AngleInRangeOfAngle(-ang, pA, dOffset)) return true;

    return false;

    }

    stock IsPlayerFacingPlayer(playerid, targetid, Float:dOffset)

    {

    new

    Float:pX,

    Float:pY,

    Float:pZ,

    Float:pA,

    Float:X,

    Float:Y,

    Float:Z,

    Float:ang;

    if(!IsPlayerConnected(playerid) || !IsPlayerConnected(targetid)) return 0;

    GetPlayerPos(targetid, pX, pY, pZ);

    GetPlayerPos(playerid, X, Y, Z);

    GetPlayerFacingAngle(playerid, pA);

    if( Y > pY ) ang = (-acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);

    else if( Y < pY && X < pX ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 450.0);

    else if( Y < pY ) ang = (acos((X - pX) / floatsqroot((X - pX)*(X - pX) + (Y - pY)*(Y - pY))) - 90.0);

    if(AngleInRangeOfAngle(-ang, pA, dOffset)) return true;

    return false;

    }

    stock AngleInRangeOfAngle(Float:a1, Float:a2, Float:range)

    {

    a1 -= a2;

    if((a1 < range) && (a1 > -range)) return true;

    return false;

    }

    forward BallDown(playerid, Float:oldz);

    public BallDown(playerid, Float:oldz)

    {

        new Float:x, Float:y, Float:z;

    GetObjectPos(Ball, x, y, z);

    new Float:a;

    new Float:x2, Float:y2;

    GetPlayerPos(playerid, x2, y2, a);

    GetPlayerFacingAngle(playerid, a);

    x2 += (16 * floatsin(-a, degrees));

    y2 += (16 * floatcos(-a, degrees));

    MoveObject(Ball, x2, y2, oldz-0.8, 10.0+random(3));

    Baller = 999;

    ShootingBall = 0;

    BallBounce = 1;

    return 1;

    }

    forward BallDown2(playerid);

    public BallDown2(playerid)

    {

    MoveObject(Ball, 2795.5237,-2019.6152,13.5547-0.8, 10.0+random(3));

    Baller = 999;

    ShootingBall = 0;

    GameTextForPlayer(playerid, "~g~Canestro!", 3000, 3);

    BallBounce = 1;

    return 1;

    }

    forward BallDown3(playerid);

    public BallDown3(playerid)

    {

    MoveObject(Ball, 2768.3669,-2019.6644,13.5547-0.8, 10.0+random(3));

    Baller = 999;

    ShootingBall = 0;

    GameTextForPlayer(playerid, "~g~Canestro!", 3000, 3);

    BallBounce = 1;

    return 1;

    }

    forward BallDown4(playerid);

    public BallDown4(playerid)

    {

    MoveObject(Ball, 2795.5237+random(5),-2019.6152+random(5),13.5547-0.8, 10.0+random(3));

    Baller = 999;

    ShootingBall = 0;

    GameTextForPlayer(playerid, "~r~Mancato!", 3000, 3);

    BallBounce = 1;

    return 1;

    }

    forward BallDown5(playerid);

    public BallDown5(playerid)

    {

    MoveObject(Ball, 2768.3669+random(5),-2019.6644+random(5),13.5547-0.8, 10.0+random(3));

    Baller = 999;

    ShootingBall = 0;

    GameTextForPlayer(playerid, "~r~Mancato!", 3000, 3);

    BallBounce = 1;

    return 1;

    }

    forward ShootMiss(playerid);

    public ShootMiss(playerid)

    {

    MoveObject(Ball, 2794.9612+random(2), -2019.5415+random(2), 15.5075+random(2), 12.5+random(4));

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);

    ShootingBall = 4;

    HavingBall[playerid] = 0;

    return 1;

    }

    forward ShootMiss2(playerid);

    public ShootMiss2(playerid)

    {

    MoveObject(Ball, 2768.6289+random(2),-2019.7227+random(2),15.6287+random(2), 12.5+random(4));

    ApplyAnimation(playerid,"BSKTBALL","BBALL_Jump_Shot",4.0,0,0,0,0,0);

    ShootingBall = 5;

    HavingBall[playerid] = 0;

    return 1;

    }

    forward ClearAnim(playerid);

    public ClearAnim(playerid)

    {

    ClearAnimations(playerid);

    return 1;

    }

    GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)

    {

    new Float:a;

    GetPlayerPos(playerid, x, y, a);

    GetPlayerFacingAngle(playerid, a);

    if (GetPlayerVehicleID(playerid))

    {

        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);

    }

    x += (distance * floatsin(-a, degrees));

    y += (distance * floatcos(-a, degrees));

    }

    // The END!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!![/pawn]

    Am intrat pe link si imi da erroare:

    Hopa! Google Chrome nu s-a putut conecta la wiki.sa-mp.com

    Încerca?i s? înc?rca?i din nou: wiki.­sa-­mp.­com/­wiki/­OnPlayerKeyState­Change

    Sugestii suplimentare:

    Accesa?i o copie p?strat? în memoria cache a site-ului wiki.­sa-­mp.­com/­wiki/­OnPlayerKeyState­Change

    Accesa?i sa-­mp.­com

    C?uta?i pe Google:

    -----------------------------------------------------------------------------------------

    NU imi pute-ti da voi scriptul facut cu orice tasta numa 'F'... sa nu fiee  ca e u na ma pricep

  5. Imi putetii da un script anti arme pe servar ? (da ca un  pleyer are hack de arme sa-l scoata afara din joc) si un mesaj sa apare in joc (Pleyerul) s fost scos depe servar (arma)

    (dar daca ia adminul o arma,sau ii de unui pleyer sa nu se intample nimic,merge?)

  6. Imi zice ca nu esti logat ca RCON (si mi-o da si daca nu-s admin)

    Imi da erroare cand sa fac .amx ...

    C:\Users\Jani\Desktop\SA-MP servar\filterscripts\placaadmin.pwn(151) : warning 217: loose indentation

    C:\Users\Jani\Desktop\SA-MP servar\filterscripts\placaadmin.pwn(160) : error 010: invalid function or declaration

    Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

    1 Error.

    Ma poate ajuta cineva?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.