06.10.2013, 16:38
You use OnPlayerStateChange, like this:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicle = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicle) == 598)
{
if(pTeam[playerid] != team_lspd)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFFFFFFFF, "You're not a cop.");
return 1;
}
}
}
return 1;
}