10.06.2017, 13:44
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleID = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && PlayerInfo[playerid][pFac] != 1)
{
if(vehicleID == 596 || 597 || 598 || 599 || 523)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You have to be a Police officer to drive this vehicle!");
}
else if(vehicleID == 490 && PlayerInfo[playerid][pFacRank] < 3)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You need to be a police officer at rank 3 or above to drive this vehicle!");
}
}
return 1;
}