wanted
#1

My /wanted command doesn't work properly, it doesn't show the players with w1.

pawn Код:
if(strcmp(cmd, "/wanted", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gTeam[playerid] == 2 || IsACop(playerid))
            {
                new x;
                SendClientMessage(playerid, COLOR_1RED, "|____Current Wanted List____|");
                for(new i=0; i < MAX_PLAYERS; i++) {
                    if(IsPlayerConnected(i))
                    {
                        if(WantedLevel[i] > 0)
                        {
                            GetPlayerName(i, giveplayer, sizeof(giveplayer));
                            format(string, sizeof(string), "%s%s:[WantedLevel:%d]", string,giveplayer,WantedLevel[i]);
                            x++;
                            if(x > 3) {
                                SendClientMessage(playerid, COLOR_WHITE, string);
                                x = 0;
                                format(string, sizeof(string), "");
                            } else {
                                format(string, sizeof(string), "%s, ", string);
                            }
                        }
                    }
                }
                if(x <= 3 && x > 0) {
                    string[strlen(string)-2] = '.';
                    SendClientMessage(playerid, COLOR_WHITE, string);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   You're not a Cop / Serviciu Roman de Investigatii / Armata Romana !");
            }
        }//not connected
        return 1;
Reply
#2

Bumb, help please!
Reply
#3

Do you get any errors?
Does it show people with wanted 2,3,4,5,6?
Reply
#4

I don't get any errors and yes it shows the players with wanted 2,3,4,5,6,7,8,9 and 10, but not those with wanted 1.
Reply
#5

Try this

pawn Код:
* * * * * * * * * * * * if(WantedLevel[i] != 0)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)