Jump to content
  • 0

/wanted bug


rekatluos

Question

deci codul e asa

if(strcmp(cmd, "/wanted", true) == 0)
    {
        new string2[128];
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pDBanned] == 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "** You are Banned From Cop Duty!");
                return 1;
            }
            if(PlayerInfo[playerid][pDuty] == 0)
            {
                SendClientMessage(playerid, COLOR_GREY, "** You aren't on Duty!");
                return 1;
            }
            if(IsACop(playerid) || IsAFreecop(playerid))
            {
                new x;
                SendClientMessage(playerid, COLOR_GREEN, "Current Wanted Suspects:");
                for(new i=0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(WantedLevel[i] > 1)
                        {
                            GetPlayerName(i, giveplayer, sizeof(giveplayer));
                            format(string2, sizeof(string2), "%s %s: %d", string,giveplayer,WantedLevel[i]);
                            x++;
                            if(x > 3)
                            {
                                SendClientMessage(playerid, COLOR_YELLOW, string);
                                x = 0;
                                format(string2, sizeof(string2), " ");
                            }
                            else
                            {
                                format(string2, sizeof(string2), "%s, ", string);
                            }
                        }
                    }
                }
                if(x <= 3 && x > 0)
                {
                    string[strlen(string2)-2] = '.';
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   You're not a Cop / FBI / National Guard !");
            }
        }//not connected
        return 1;
    }

Cand nu e nimeni wanted apare "Current Wanted List : " si nu e urmata de nimic ,dar cand e vreun jucator wanted ,apare asa -> wantedbug.jpg

nu inteleg de la ce ,vreo idee?

thx in advance

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.