This message doesn't show
#1

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.
Reply
#2

Your looping thought all player with the letter "I" then Why do you then use "playerid" ?
Reply
#3

Is a simple code mistake i made,however this don't fix the problem.
Reply
#4

I would suggest using some prints to debug the problem.
Reply
#5

It prints this:

[02:12:04] - WARNING ALL COPS: Axel(1) murdered Floy(0) at Downtown

I used:
pawn Код:
printf("%s", copmsg);
Reply
#6

Make sure your if statements are going through too. It's a good idea to print the team's each player is on and make sure it's all matching the statements properly.
Reply
#7

pawn Код:
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: Robbery in progress by %s (%d) - Location: %s",name,playerid,zones[current_zone][zone_name]);
    SendClientMessage(i, COLOR_BLUE, copmsg);
    }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)