Posts: 3,351
Threads: 780
Joined: Jan 2010
pawn Код:
for(new i=0;i<MAX_PLAYERS;i++)
{
new current_zone;
current_zone = player_zone[i];
if(gTeam[playerid] == TEAM_COP)
{
new copmsg[170];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(copmsg, sizeof(copmsg), "- WARNING ALL COPS: Robbery in progress by %s (%d) - Location: %s",name,playerid,zones[current_zone][zone_name]);
SendClientMessage(i, COLOR_BLUE, copmsg);
}
}
When a player start a robbery,this "WARNING ALL COPS etc" message doesn't show to TEAM_COP.
I got NO errors while compiling.
Posts: 2,364
Threads: 135
Joined: Dec 2009
Reputation:
0
Your looping thought all player with the letter "I" then Why do you then use "playerid" ?
Posts: 3,351
Threads: 780
Joined: Jan 2010
Is a simple code mistake i made,however this don't fix the problem.
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
I would suggest using some prints to debug the problem.
Posts: 3,351
Threads: 780
Joined: Jan 2010
It prints this:
[02:12:04] - WARNING ALL COPS: Axel(1) murdered Floy(0) at Downtown
I used: