[Ajuda] Ajuda aqui no /procurados
#5

Nгo tem necessidade de criar a var:
pawn Код:
new str[...];
e tambйm esta:
pawn Код:
new msg[...];
Uma chega perfeitamente para isso.

Tambйm nгo precisa de:
pawn Код:
if(GetPlayerWantedLevel(i) == 1) || GetPlayerWantedLevel(i) == 2) //...
Pode usar um Operador lуgico que neste caso й o && para verificar se й entre 1 e 6.

Cуdigo que fiz:
pawn Код:
if(strcmp(cmdtext, "/procurados", true) == 0)
{
    new
        str[128],
        Jogador[MAX_PLAYER_NAME],
        count = 0;

    for(new x = 0; x <= GetMaxPlayers(); x++)
    {
        if(IsPlayerConnected(x) && Procurados[x])
        {        
            SendClientMessage(playerid, 0x0080FFAA, "~~~~~~~~~~~~~~~~ Procurados ~~~~~~~~~~~~~~~~");
            format(str, sizeof(str), "Nome: %s Level: %d", Jogador, GetPlayerWantedLevel(x));
            SendClientMessage(playerid, VERMELHO, str);
            GetPlayerName(x, Jogador, sizeof(Jogador));
           
            if(GetPlayerWantedLevel(x) >= 1 && GetPlayerWantedLevel(x) <=6)
            {
                format(str, sizeof(str), "%d: %s: Procurado Nнvel %i", x, Jogador, GetPlayerWantedLevel(x));
                SendClientMessage(playerid, 0xFFFFFFAA, str);
                count++;
            }
        }
    }
    return SendClientMessage(playerid, 0xFF0000AA, "Ninguйm estб procurado no momento.");
}
Teste e me diga algo.
Reply


Messages In This Thread
Ajuda aqui no /procurados - by Smoking_Script - 25.06.2013, 02:26
Re: Ajuda aqui no /procurados - by focaximubh - 25.06.2013, 02:32
Re: Ajuda aqui no /procurados - by andreasbleck - 25.06.2013, 02:37
Re: Ajuda aqui no /procurados - by DannielCooper - 25.06.2013, 10:59
Re: Ajuda aqui no /procurados - by Knight97 - 25.06.2013, 11:52

Forum Jump:


Users browsing this thread: 2 Guest(s)