[Ajuda] Transformar em DAILOG
#1

Bem quando eu digito o comando /admins, ele aparece no chat, em forma de mensagem.. Gostaria de transformar em dialog, podem me ajudar?

O que mudo aqui?

PHP код:
 CMD:admins(playeridparams[])
    {
        
SendClientMessage(playeridCOR_ADMIN"Admins Online:");
        foreach(
Playeri)
        {
            if(
PlayerInfo[i][pAdmin] > || PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
lolz[40];
                    if(
PlayerInfo[i][pAdminTemp] == 1)lolz "TEMPORБRIO";
                    if(
PlayerInfo[i][pAdmin] == 1)lolz "1";
                    if(
PlayerInfo[i][pAdmin] == 2)lolz "2";
                    if(
PlayerInfo[i][pAdmin] == 3)lolz "3";
                    if(
PlayerInfo[i][pAdmin] == 4)lolz "4";
                    if(
PlayerInfo[i][pAdmin] == 5)lolz "5";
                    if(
PlayerInfo[i][pAdmin] == 1337)lolz "MASTER";
                    if(
PlayerInfo[i][pAdmin] == 1338)lolz "RESP. LIDERES";
                    if(
PlayerInfo[i][pAdmin] == 1339)lolz "RESP. ADM/HELPER";
                    if(
PlayerInfo[i][pAdmin] == 1340)lolz "RESP. EDIЗOES";
                    
//if(PlayerInfo[i][pAdmin] == 1338)lolz = "RESP. ADM/HELPER";
                    //if(PlayerInfo[i][pAdmin] >= 1339 && PlayerInfo[i][pAdmin] <= 3000)lolz = "SUB-DONO";
                    
if(PlayerInfo[i][pAdmin] == 5000)lolz "FUNDADOR";
                    new 
string[128];
                    if(
admtrampando[i] == 1)
                    {
                        
format(string128"Admin: %s Nнvel: [%s]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    else
                    {
                        
format(string128"Admin: %s Nнvel: [%s][JOGANDO]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                }
            }
        }
        return 
true;
    } 
Reply
#2

Bem, tenta assim:
pawn Код:
new string[120];
for(new i =0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new admin1 = PlayerInfo[i][pAdmin] == 1)lolz = "1";  // por ai vai  

format(string, sizeof(string), "%s", admin1);
ShowPlayerDialog(playerid, DIALOG_DEFINA, DIALOG_STYLE_LIST,"admins onlin", string, "Ok","");
}
}
faz um "menor" e se der certo vocк faz o resto.
Reply
#3

Quote:
Originally Posted by Eiffel
Посмотреть сообщение
Bem quando eu digito o comando /admins, ele aparece no chat, em forma de mensagem.. Gostaria de transformar em dialog, podem me ajudar?

O que mudo aqui?

PHP код:
 CMD:admins(playeridparams[])
    {
        
SendClientMessage(playeridCOR_ADMIN"Admins Online:");
        foreach(
Playeri)
        {
            if(
PlayerInfo[i][pAdmin] > || PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
lolz[40];
                    if(
PlayerInfo[i][pAdminTemp] == 1)lolz "TEMPORБRIO";
                    if(
PlayerInfo[i][pAdmin] == 1)lolz "1";
                    if(
PlayerInfo[i][pAdmin] == 2)lolz "2";
                    if(
PlayerInfo[i][pAdmin] == 3)lolz "3";
                    if(
PlayerInfo[i][pAdmin] == 4)lolz "4";
                    if(
PlayerInfo[i][pAdmin] == 5)lolz "5";
                    if(
PlayerInfo[i][pAdmin] == 1337)lolz "MASTER";
                    if(
PlayerInfo[i][pAdmin] == 1338)lolz "RESP. LIDERES";
                    if(
PlayerInfo[i][pAdmin] == 1339)lolz "RESP. ADM/HELPER";
                    if(
PlayerInfo[i][pAdmin] == 1340)lolz "RESP. EDIЗOES";
                    
//if(PlayerInfo[i][pAdmin] == 1338)lolz = "RESP. ADM/HELPER";
                    //if(PlayerInfo[i][pAdmin] >= 1339 && PlayerInfo[i][pAdmin] <= 3000)lolz = "SUB-DONO";
                    
if(PlayerInfo[i][pAdmin] == 5000)lolz "FUNDADOR";
                    new 
string[128];
                    if(
admtrampando[i] == 1)
                    {
                        
format(string128"Admin: %s Nнvel: [%s]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    else
                    {
                        
format(string128"Admin: %s Nнvel: [%s][JOGANDO]"sendernamelolz);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                }
            }
        }
        return 
true;
    } 
Tenta aee:
PHP код:

    CMD
:admins(playeridparams[])
    {
        new 
Dialog[256];
        foreach(
Player,i)
        {
            if(
PlayerInfo[i][pAdmin] > || PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
lolz[40];
                    if(
PlayerInfo[i][pAdminTemp] == 1)lolz "TEMPORБRIO";
                    if(
PlayerInfo[i][pAdmin] == 1)lolz "1";
                    if(
PlayerInfo[i][pAdmin] == 2)lolz "2";
                    if(
PlayerInfo[i][pAdmin] == 3)lolz "3";
                    if(
PlayerInfo[i][pAdmin] == 4)lolz "4";
                    if(
PlayerInfo[i][pAdmin] == 5)lolz "5";
                    if(
PlayerInfo[i][pAdmin] == 1337)lolz "MASTER";
                    if(
PlayerInfo[i][pAdmin] == 1338)lolz "RESP. LIDERES";
                    if(
PlayerInfo[i][pAdmin] == 1339)lolz "RESP. ADM/HELPER";
                    if(
PlayerInfo[i][pAdmin] == 1340)lolz "RESP. EDIЗOES";
                    
//if(PlayerInfo[i][pAdmin] == 1338)lolz = "RESP. ADM/HELPER";
                    //if(PlayerInfo[i][pAdmin] >= 1339 && PlayerInfo[i][pAdmin] <= 3000)lolz = "SUB-DONO";
                    
if(PlayerInfo[i][pAdmin] == 5000)lolz "FUNDADOR";
                    if(
admtrampando[i] == 1)
                    {
                        
format(string128"Admin: %s Nнvel: [%s]"sendernamelolz);
                        
strcat(Dialog,string);
                    }
                    else
                    {
                        
format(string128"Admin: %s Nнvel: [%s]"sendernamelolz);
                        
strcat(Dialog,string);
                    }
                    
ShowPlayerDialog(playerid1010DIALOG_STYLE_MSGBOX"Administradores Online"Dialog"Fechar""");
                }
            }
        }
        return 
true;
    } 
Reply
#4

Man, deu 4 erros que precisava adicionar o new string .. depois que adicionei deu mais 4 erros, que sгo esses:



PHP код:
C:\Users\pcpc\Desktop\GM By Eiffel USANDO Copia (4) - Copia Copia\gamemodes\BPS.pwn(72713) : error 001expected token";"but found "new"
C:\Users\pcpc\Desktop\GM By Eiffel USANDO Copia (4) - Copia Copia\gamemodes\BPS.pwn(72737) : error 035argument type mismatch (argument 1)
C:\Users\pcpc\Desktop\GM By Eiffel USANDO Copia (4) - Copia Copia\gamemodes\BPS.pwn(72738) : error 035argument type mismatch (argument 2)
C:\Users\pcpc\Desktop\GM By Eiffel USANDO Copia (4) - Copia Copia\gamemodes\BPS.pwn(72742) : error 035argument type mismatch (argument 1)
C:\Users\pcpc\Desktop\GM By Eiffel USANDO Copia (4) - Copia Copia\gamemodes\BPS.pwn(72743) : error 035argument type mismatch (argument 2


ajuda ai?
Reply
#5

Quote:
Originally Posted by Eiffel
Посмотреть сообщение
Man, deu 4 erros que precisava adicionar o new string .. depois que adicionei deu mais 4 erros, que sгo esses:



PHP код:
C:\Users\pcpc\Desktop\GM By Eiffel USANDO Copia (4) - Copia Copia\gamemodes\BPS.pwn(72713) : error 001expected token";"but found "new"
C:\Users\pcpc\Desktop\GM By Eiffel USANDO Copia (4) - Copia Copia\gamemodes\BPS.pwn(72737) : error 035argument type mismatch (argument 1)
C:\Users\pcpc\Desktop\GM By Eiffel USANDO Copia (4) - Copia Copia\gamemodes\BPS.pwn(72738) : error 035argument type mismatch (argument 2)
C:\Users\pcpc\Desktop\GM By Eiffel USANDO Copia (4) - Copia Copia\gamemodes\BPS.pwn(72742) : error 035argument type mismatch (argument 1)
C:\Users\pcpc\Desktop\GM By Eiffel USANDO Copia (4) - Copia Copia\gamemodes\BPS.pwn(72743) : error 035argument type mismatch (argument 2


ajuda ai?
PHP код:

CMD
:admins(playeridparams[])
    {
        new 
Dialog[256],str[128];
        foreach(
Player,i)
        {
            if(
PlayerInfo[i][pAdmin] > || PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
lolz[40];
                    if(
PlayerInfo[i][pAdminTemp] == 1)lolz "TEMPORБRIO";
                    if(
PlayerInfo[i][pAdmin] == 1)lolz "1";
                    if(
PlayerInfo[i][pAdmin] == 2)lolz "2";
                    if(
PlayerInfo[i][pAdmin] == 3)lolz "3";
                    if(
PlayerInfo[i][pAdmin] == 4)lolz "4";
                    if(
PlayerInfo[i][pAdmin] == 5)lolz "5";
                    if(
PlayerInfo[i][pAdmin] == 1337)lolz "MASTER";
                    if(
PlayerInfo[i][pAdmin] == 1338)lolz "RESP. LIDERES";
                    if(
PlayerInfo[i][pAdmin] == 1339)lolz "RESP. ADM/HELPER";
                    if(
PlayerInfo[i][pAdmin] == 1340)lolz "RESP. EDIЗOES";
                    
//if(PlayerInfo[i][pAdmin] == 1338)lolz = "RESP. ADM/HELPER";
                    //if(PlayerInfo[i][pAdmin] >= 1339 && PlayerInfo[i][pAdmin] <= 3000)lolz = "SUB-DONO";
                    
if(PlayerInfo[i][pAdmin] == 5000)lolz "FUNDADOR";
                    if(
admtrampando[i] == 1)
                    {
                        
format(str128"Admin: %s Nнvel: [%s]"sendernamelolz);
                        
strcat(Dialog,str);
                    }
                    else
                    {
                        
format(str128"Admin: %s Nнvel: [%s]"sendernamelolz);
                        
strcat(Dialog,str);
                    }
                    
ShowPlayerDialog(playerid1010DIALOG_STYLE_MSGBOX"Administradores Online"Dialog"Fechar""");
                }
            }
        }
        return 
true;
    } 
TENTA AGORA
Reply
#6

Kevinho007 Obrigado maninho, deu certo e vlw а todos que tentaram me ajudar ja me dando um caminho andado para tudo! Vlw msm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)