12.07.2010, 18:16
Hey.
Another failure occurred ><"
This time,I got failed on scripting a wanted level increase if a player which is not a cop or a medic enters a law enforcement vehicle.
Code:
The problem is,it sends me both of the messages and raises my wanted level in two starts EVEN though I'm a cop.
What the hell?
Another failure occurred ><"
This time,I got failed on scripting a wanted level increase if a player which is not a cop or a medic enters a law enforcement vehicle.
Code:
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;
}
What the hell?