SA-MP Forums Archive
[AJUDA] /Lideres - 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] /Lideres (/showthread.php?tid=289107)



[AJUDA] /Lideres - Jason` - 10.10.2011

Olhem meu codigo /lideres

pawn Код:
if (strcmp(cmd,"/Lideres",true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            format(string, sizeof(string), "|______Lideres %s:______|", NOMEDOSERVE);
            SendClientMessage(playerid,COR_VERDE,string);
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pLeader] >= 1)
                    {
                        new org = GetPlayerOrg(i);
                        new NomeOrg[MAX_ORG_NOME];
                        OrgNome(org, NomeOrg, MAX_ORG_NOME);
                        format(string,sizeof(string),"Organizaзгo: %s[ID: %d] Lider: %s Cel: %d\n",NomeOrg,org,pNome(i),PlayerInfo[i][pPnumber]);
                        SendClientMessage(playerid,OrgCor(org),string);
                    }
                }
            }
            return 1;
        }
        return 1;
    }
Ele geta todos os player e manda um sendclientmessage a cada lider q ele acha, teria como eu fazer isso em dialog list?um dialog so pegasse os players?

Agradeзo desde ja


Re: [AJUDA] /Lideres - Vai_Besta - 10.10.2011

pawn Код:
if (strcmp(cmd,"/Lideres",true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            format(string, sizeof(string), "|______Lideres %s:______|", NOMEDOSERVE);
            SendClientMessage(playerid,COR_VERDE,string);
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pLeader] >= 1)
                    {
                        new org = GetPlayerOrg(i);
                        new NomeOrg[MAX_ORG_NOME];
                        OrgNome(org, NomeOrg, MAX_ORG_NOME);
                        format(string,sizeof(string),"Organizaзгo: %s[ID: %d] Lider: %s Cel: %d\n",NomeOrg,org,pNome(i),PlayerInfo[i][pPnumber]);
                        ShowPlayerDialog(playerid,2138,DIALOG_STYLE_MSGBOX ,"Lideres",string,"Sair","");
                    }
                }
            }
            return 1;
        }
        return 1;
    }
Nгo sei se funcionara


Re: [AJUDA] /Lideres - Jason` - 10.10.2011

Nao funciona =/
To mofando pra conseguir isso kkkkkk


Re: [AJUDA] /Lideres - Josma_cmd - 10.10.2011

pawn Код:
if (strcmp(cmd,"/Lideres",true) == 0)
{
    format(string, sizeof(string), "|______Lideres %s:______|", NOMEDOSERVE);
    SendClientMessage(playerid,COR_VERDE,string);
    for(new i = 0; i <= GetmaxPlayers(); i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(PlayerInfo[i][pLeader] > 0)
        {
            new org = GetPlayerOrg(i);
            new NomeOrg[MAX_ORG_NOME];
            OrgNome(org, NomeOrg, MAX_ORG_NOME);
            format(string,sizeof(string),"Organizaзгo: %s[ID: %d] Lider: %s Cel: %d\n",NomeOrg,org,pNome(i),PlayerInfo[i][pPnumber]);
            SendClientMessage(playerid,OrgCor(org),string);
            return true;
        }
    }
    return true;
}