[AJUDA] Comando em Dialog ( DIALOG_STYLE_LIST )
#1

Olб pessoal, Queria saber se tem como execurtar um comando no DIALOG_STYLE_LIST.

Vamos supor que o comando й /infoorg
Ex: Clicamos em um item no dialog( DIALOG_STYLE_LIST ) que estaria escrito infoorg, dai ele executa o comando que ja existe que й /Infoorg, tem como?

Obrigado desde jб.
Reply
#2

Bote na response da dialog

pawn Код:
OnPlayerCommandText(playerid,"/infoorg");
Reply
#3

Deu certo no dialog mais no Comando da erro!

pawn Код:
C:\Users\Gabriel\Desktop\sdfsdf\gamemodes\LAC.pwn(21707) : error 017: undefined symbol "Player"
C:\Users\Gabriel\Desktop\sdfsdf\gamemodes\LAC.pwn(21707) : warning 215: expression has no effect
C:\Users\Gabriel\Desktop\sdfsdf\gamemodes\LAC.pwn(21707) : error 001: expected token: ";", but found "]"
C:\Users\Gabriel\Desktop\sdfsdf\gamemodes\LAC.pwn(21707) : error 029: invalid expression, assumed zero
C:\Users\Gabriel\Desktop\sdfsdf\gamemodes\LAC.pwn(21707) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#4

Posta o comando ne
Reply
#5

Ta ae:
pawn Код:
if(strcmp(cmd, "/infoorg", true) ==0 || strcmp(cmd, "/infoorganizacao", true) ==0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
            {
                new org;
                new id;
                new arquivo[256];
                new PlayerNome[MAX_PLAYER_NAME];
                GetPlayerName(playerid, PlayerNome, sizeof(PlayerNome));
                //format(arquivo, sizeof(arquivo), "/Contas/%s.ini",PlayerNome);
                if(PlayerInfo[playerid][pMember] > 0)
                {
                    org = PlayerInfo[playerid][pMember];
                }
                if(PlayerInfo[playerid][pLeader] > 0)
                {
                    org = PlayerInfo[playerid][pLeader];
                }
                ClearChatbox(playerid, 3);
                SendClientMessage(playerid,COLOR_INFOORG3,"------------------------------------------------------------------------------------------------------------------------------");
                SendClientMessage(playerid,COLOR_INFOORG3,"*    . : : : | => Informaзхes da Organizaзгo <= | : : : .    *");
                if(IsPlayerOnline(InfoOrg[org][Lider]))
                {
                    id = GetPlayerID(InfoOrg[org][Lider]);
                    format(string,sizeof(string),"Lider da Org: %s [ CARGO = %d ] [ ONLINE ]",InfoOrg[org][Lider],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid,COLOR_INFOORG1,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Lider],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"Lider da Org:%s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Lider]);
                        SendClientMessage(playerid,COLOR_INFOORG1,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Lider]);
                        format(string,sizeof(string),"Lider da Org: %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Lider],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid,COLOR_INFOORG1,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][SubLider]))
                {
                    id = GetPlayerID(InfoOrg[org][SubLider]);
                    format(string,sizeof(string),"Sub-Lider da Org: %s [ CARGO = %d ] [ ONLINE ]",InfoOrg[org][SubLider],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid,COLOR_INFOORG2,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][SubLider],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"Sub-Lider da Org: %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][SubLider]);
                        SendClientMessage(playerid,COLOR_INFOORG2,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][SubLider]);
                        format(string,sizeof(string),"Sub-Lider da Org: %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][SubLider],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid,COLOR_INFOORG2,string);
                    }
                }
                SendClientMessage(playerid,COLOR_INFOORG1,"*    . : : : | => Membros da Organizaзгo <= | : : : .    *");
                if(IsPlayerOnline(InfoOrg[org][Membro1]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro1]);
                    format(string,sizeof(string),"[ Vaga 1 ] = %s [ CARGO = %d ] [ ONLINE ]",InfoOrg[org][Membro1],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid,COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro1],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 1 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro1]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro1]);
                        format(string,sizeof(string),"[ Vaga 1 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro1],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro2]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro2]);
                    format(string,sizeof(string),"[ Vaga 2 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro2],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro2],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 2 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro2]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro2]);
                        format(string,sizeof(string),"[ Vaga 2 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro2],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro3]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro3]);
                    format(string,sizeof(string),"[ Vaga 3 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro3],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro3],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 3 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro3]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro3]);
                        format(string,sizeof(string),"[ Vaga 3 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro3],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro4]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro4]);
                    format(string,sizeof(string),"[ Vaga 4 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro4],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro4],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 4 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro4]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro4]);
                        format(string,sizeof(string),"[ Vaga 4 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro4],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro5]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro5]);
                    format(string,sizeof(string),"[ Vaga 5 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro5],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro5],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 5 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro5]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro5]);
                        format(string,sizeof(string),"[ Vaga 5 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro5],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro6]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro6]);
                    format(string,sizeof(string),"[ Vaga 6 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro6],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro6],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 6 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro6]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro6]);
                        format(string,sizeof(string),"[ Vaga 6 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro6],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro7]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro7]);
                    format(string,sizeof(string),"[ Vaga 7 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro7],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro7],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 7 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro7]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro7]);
                        format(string,sizeof(string),"[ Vaga 7 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro7],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro8]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro8]);
                    format(string,sizeof(string),"[ Vaga 8 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro8],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro8],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 8 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro8]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro8]);
                        format(string,sizeof(string),"[ Vaga 8 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro8],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro9]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro9]);
                    format(string,sizeof(string),"[ Vaga 9 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro9],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro9],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 9 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro9]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro9]);
                        format(string,sizeof(string),"[ Vaga 9 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro9],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro10]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro10]);
                    format(string,sizeof(string),"[ Vaga 10 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro10],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro10],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 10 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro10]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro10]);
                        format(string,sizeof(string),"[ Vaga 10 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro10],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro11]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro11]);
                    format(string,sizeof(string),"[ Vaga 11 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro11],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro11],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 11 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro11]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro11]);
                        format(string,sizeof(string),"[ Vaga 11 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro11],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro12]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro12]);
                    format(string,sizeof(string),"[ Vaga 12 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro12],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro12],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 12 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro12]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro12]);
                        format(string,sizeof(string),"[ Vaga 12 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro12],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro13]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro13]);
                    format(string,sizeof(string),"[ Vaga 13 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro13],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro13],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 13 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro13]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro13]);
                        format(string,sizeof(string),"[ Vaga 13 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro13],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                if(IsPlayerOnline(InfoOrg[org][Membro14]))
                {
                    id = GetPlayerID(InfoOrg[org][Membro14]);
                    format(string,sizeof(string),"[ Vaga 14 ] = %s [ CARGO = %d] [ ONLINE ]",InfoOrg[org][Membro14],PlayerInfo[id][pRank]);
                    SendClientMessage(playerid, COLOR_INFOORG3,string);
                }
                else
                {
                    if(strcmp(InfoOrg[org][Membro14],"Ninguem",true)==0)
                    {
                        format(string,sizeof(string),"[ Vaga 14 ] = %s [ CARGO = 0 ] [ OFFLINE ]",InfoOrg[org][Membro14]);
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                    else
                    {
                        format(arquivo, sizeof(arquivo), "/Contas/%s.ini",InfoOrg[org][Membro14]);
                        format(string,sizeof(string),"[ Vaga 14 ] = %s [ CARGO = %d ] [ OFFLINE ]",InfoOrg[org][Membro14],dini_Int(arquivo,"Rank"));
                        SendClientMessage(playerid, COLOR_INFOORG3,string);
                    }
                }
                SendClientMessage(playerid, COLOR_INFOORG3,"------------------------------------------------------------------------------------------------------------------------------");
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIGHTRED,"* Vocк nгo faz parte de uma organizaзгo!");
                return 1;
            }
        }
        return 1;
    }
Reply
#6

Poste o comando da dialog + a response
Reply
#7

bote no topo:
pawn Код:
new Player[MAX_PLAYERS];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)