12.02.2012, 17:44
Hello,i've this code to set the wanted stars at the every teams steals a police vehicle,except TEAM_COP.
The problem is: The code works good,but i want add a Wanted Level stars for the rest of vehicle ids,how to?
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && gTeam[playerid] != TEAM_COP)
{
switch(GetVehicleModel(GetPlayerVehicleID(playerid)))
{
case 497, 447, 523, 416, 433, 427, 490, 528, 407, 544, 596, 597, 598, 599, 432, 601, 470, 472, 430, 428:
{
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+4);
new string[64];
format(string, sizeof(string), "- CRIME - Law Enforcement Vehicle Theft - Wanted Level %d ", GetPlayerWantedLevel(playerid));
SendClientMessage(playerid, red, string);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i))continue;
new current_zone;
current_zone = player_zone[i];
if(gTeam[i] == TEAM_COP)
{
new copmsg[170];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: Law Enforcement Vehicle Theft By %s (%d) - Location: %s",name,playerid,zones[current_zone][zone_name]);
SendClientMessage(i, COLOR_BLUE, copmsg);
}
}
}
}
}
return 1;
}