SA-MP Forums Archive
[Ajuda] /procurados em dialogo - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] /procurados em dialogo (/showthread.php?tid=304267)



[Ajuda] /procurados em dialogo - master_mc - 17.12.2011

Boas galera do foruns samp, venho aqui mais uma vez pedir a voзa ajuda em relaзгo a este pequeno garande problema do /procurados em dialogo serб que alguem me ajuda a fazer o /procurados o meu cуdigo actual й este aqui

pawn Код:
if(strcmp(cmd, "/procurados", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(!IsACop(playerid))
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й um policial!");
                return 1;
            }
            if(OnDuty[playerid] != 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo Bateu o cartгo!");
                return 1;
            }
            new x;
            SendClientMessage(playerid, COLOR_WHITE, "|______________ Suspeitos ______________|");
            for(new i=0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(WantedPoints[i] > 0)
                    {
                        GetPlayerName(i, giveplayer, sizeof(giveplayer));
                        format(string, sizeof(string), "%s%s(%d): %d",             string,giveplayer,i,WantedPoints[i]);
                        x++;
                        if(x > 3)
                        {
                            SendClientMessage(playerid, COLOR_YELLOW, string);
                            x = 0;
                            format(string, sizeof(string), "");
                        }
                        else
                        {
                            format(string, sizeof(string), "\n%s, ", string);
                        }
                    }
                }
            }
            if(x <= 3 && x > 0)
            {
                string[strlen(string)-2] = '.';
                SendClientMessage(playerid, COLOR_YELLOW, string);
            }
        }//not connected
        return 1;
    }



Re: /procurados em dialogo - Victor Cesaroni - 17.12.2011

Em vez de:
pawn Код:
SendClientMessage(playerid, COLOR_YELLOW, string);
Coloque:
pawn Код:
ShowPlayerDialog(playerid, ID_DO_DIALOG, DIALOG_STYLE_LIST, "Procurados", string);



Re: /procurados em dialogo - Victor Cesaroni - 17.12.2011

This forum requires that you wait 120 seconds between posts. Please try again in 9 seconds.

E postou 2 vezes ¬¬'


Re: /procurados em dialogo - master_mc - 18.12.2011

Vitor nгo entendo muito de dialog serб que me pode explicar como fazer o cmd ajustado para dialogo ?

Desde jб obrigado pela atenзгo,


Re: [Ajuda] /procurados em dialogo - master_mc - 18.12.2011

Vitor me ajuda ae :P


Re: [Ajuda] /procurados em dialogo - array13 - 18.12.2011

Troque as linhas que o vitor disse, e voce vai ficar com o comando em dialogo --'


Re: [Ajuda] /procurados em dialogo - master_mc - 18.12.2011

mas como faзo o showplayerdialog? nao sei trabalhar com dialog


Re: [Ajuda] /procurados em dialogo - Rodrigo_Avanged - 19.12.2011

Quote:
Originally Posted by master_mc
Посмотреть сообщение
Boas galera do foruns samp, venho aqui mais uma vez pedir a voзa ajuda em relaзгo a este pequeno garande problema do /procurados em dialogo serб que alguem me ajuda a fazer o /procurados o meu cуdigo actual й este aqui

pawn Код:
if(strcmp(cmd, "/procurados", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(!IsACop(playerid))
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й um policial!");
                return 1;
            }
            if(OnDuty[playerid] != 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo Bateu o cartгo!");
                return 1;
            }
            new x;
            SendClientMessage(playerid, COLOR_WHITE, "|______________ Suspeitos ______________|");
            for(new i=0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(WantedPoints[i] > 0)
                    {
                        GetPlayerName(i, giveplayer, sizeof(giveplayer));
                        format(string, sizeof(string), "%s%s(%d): %d",             string,giveplayer,i,WantedPoints[i]);
                        x++;
                        if(x > 3)
                        {
                            SendClientMessage(playerid, COLOR_YELLOW, string);
                            x = 0;
                            format(string, sizeof(string), "");
                        }
                        else
                        {
                            format(string, sizeof(string), "\n%s, ", string);
                        }
                    }
                }
            }
            if(x <= 3 && x > 0)
            {
                string[strlen(string)-2] = '.';
                SendClientMessage(playerid, COLOR_YELLOW, string);
            }
        }//not connected
        return 1;
    }
Troca por esse :
if(strcmp(cmd, "/procurados", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um policial!");
return 1;
}
if(OnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo Bateu o cartгo!");
return 1;
}
new x;
ShowPlayerDialog(playerid,1, DIALOG_STYLE_LIST, "|______________ Suspeitos ______________|", string);
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(WantedPoints[i] > 0)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s%s(%d): %d", string,giveplayer,i,WantedPoints[i]);
x++;
if(x > 3)
{
SendClientMessage(playerid, COLOR_YELLOW, string);
x = 0;
format(string, sizeof(string), "");
}
else
{
format(string, sizeof(string), "\n%s, ", string);
}
}
}
}
if(x <= 3 && x > 0)
{
string[strlen(string)-2] = '.';
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}//not connected
return 1;
}