OnPlayerStateChange (RemovePlayerFromVehicle)
#1

Here is my script that i use to remove players from restricted vehicle, but if i go in any vehicle i get removed where i in SAPD or not.
Please help.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
    new vid = GetPlayerVehicleID(playerid);
    if(vid == sapd1 || vid == sapd2 vid == sapd3 || vid == sapd4 || Member[playerid] != 3)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, red, "You cannot enter this vehicle!");
    }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)