SA-MP Forums Archive
Antifall script is not working - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Antifall script is not working (/showthread.php?tid=312928)



Antifall script is not working - iZN - 23.01.2012

My script for antifall from bike is not working.

Can you see the script, is anything is wrong?

OnPlayerStateChange callback code
pawn Код:
if(Anim[playerid] == 1)
    {
        if(oldstate == PLAYER_STATE_eDriver)
        {
            if(newstate == PLAYER_STATE_ONFOOT)
            {
                if(invehicle[playerid] == 1)
                {
                    PutPlayerInVehicle(playerid, whatvehicle[playerid], eDriver);
                }
            }
        }
        if(oldstate == PLAYER_STATE_PASSENGER)
        {
            if(newstate == PLAYER_STATE_ONFOOT)
            {
                if(invehicle[playerid] == 1)
                {
                    PutPlayerInVehicle(playerid, whatvehicle[playerid], passenger);
                }
            }
        }
        if(oldstate == PLAYER_STATE_ONFOOT)
        {
            if(newstate == PLAYER_STATE_eDriver || PLAYER_STATE_PASSENGER)
            {
                invehicle[playerid] = 1;
                whatvehicle[playerid] = GetPlayerVehicleID(playerid);
            }
        }
    }