07.07.2014, 23:49
How can I do that if a player enters a vehicle and is not an admin then it would get him out of the car?
public OnPlayerStateChange(playerid, newstate, oldstate) //Called when a player changes state
{
if(newstate & PLAYER_STATE_DRIVER) //If player enters as a driver in a vehicle
{
if(!IsPlayerAdmin(playerid)) //If the player is not an admin, replace this with your admin variable.
{
RemovePlayerFromVehicle(playerid); //Remove the player from the vehicle
}
}
return 1;
}