Quote:
Originally Posted by Sellize
PHP код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
new newcar = GetPlayerVehicleID(playerid);
if(CopCar(newcar))
{
if (gTeam[playerid] != TEAM_COPS){
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You're not in the police team"); return 1; }
// continued code if the player is a cop
}
}
return 1;
}
|
Lol i just realize to put it on OnPlayerStateChange instead of onplayernetervehicle thx!