[HELP]OnPlayerStateChange[HELP]
#1

Hello Guys!
i need help for OnPlayerKeyStateChange , i am wondering how to make the player kick from vehicle of Government vehicles if they not a police .
heres the code , can someone can do it for me? i'll give rep+
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(
    {
        RemovePlayerFromVehicle(playerid);
    }
    return 1;
}
Reply
#2

I'll assume that your "Government Vehicle" includes an SF Police Car.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)  //Checks if player has entered a vehicle as a driver
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 596) //Checks if the vehicle that he has entered with is an SF Police Car
        {
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
Reply
#3

if(newstate == PLAYER_STATE_DRIVER)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)