12.07.2010, 18:18
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(pInfo[playerid][Team] != TEAM_COPS || pInfo[playerid][Team] != TEAM_MEDICS)
{
if(GetPlayerVehicleID(playerid) == Ambulance[0] || Ambulance[1])
{
SendClientMessage(playerid, Orange, "Felony commited,stolen law enforcement vehicle(+2 wanted level)");
SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+2);
for(new cop; cop < MAX_PLAYERS; cop++)
{
if(IsPlayerConnected(cop))
{
if(pInfo[cop][Team] == TEAM_COPS)
{
format(gstring,256,"Felony commited: the player %s has stolen a law enforcement vehicle.",pName(playerid));
SendClientMessage(cop,lBlue,gstring);
return 1;
}
}
}
}
}
return 1;
}
return 1;
}