SA-MP Forums Archive
Player gets frozen when ejected out of a vehicle - 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: Player gets frozen when ejected out of a vehicle (/showthread.php?tid=380658)



Player gets frozen when ejected out of a vehicle - NewerthRoleplay - 26.09.2012

Hi I am creating faction only vehicles and it works completely how it is supposed to however once the player is ejected he gets frozen and the only way to get unfrozen is by relogging.

Code:
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
    {
        new car = GetPlayerVehicleID(playerid);
        for(new i = 0; i < sizeof(LSPDVehicles); i++)
        {
            if(car == LSPDVehicles[i])
            {
                if(PlayerInfo[playerid][Faction] != 1)
                {
                    ClearAnimations(playerid);
                    RemovePlayerFromVehicle(playerid);
                    SendClientMessage(playerid, -1, "You don`t have the keys for this car.");
                }
            }
        }
    return 1;
    }