10.10.2015, 09:36
code should look like this:
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;
}