Ajuda no Dialog
#1

Estou tentando converter o comando /infolider para dialog, mais estб ocorrendo um problema, quando chega no final ele repete e acaba bugando. no caso comeзa os oficiais da justiзa novamente, alguem pode ajudar ? pesquisei na wiki e nenhum resultado.

pawn Code:
if(strcmp(cmd, "/comandofdp", true) ==0 || strcmp(cmd, "/infolideres", true) ==0)
    {
        format(DialogDiDi, sizeof(DialogDiDi),"%s ______Oficiais da Justiзa______\n\n",DialogDiDi);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Governo: {0099ff}%s \n",DialogDiDi, InfoOrg[7][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Mйdicos: {aa3333}%s \n",DialogDiDi, InfoOrg[4][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Policia Militar: {828282}%s \n",DialogDiDi, InfoOrg[1][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Policia Cнvil: {828282}%s \n",DialogDiDi, InfoOrg[17][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Policia Federal: {828282}%s \n",DialogDiDi, InfoOrg[25][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}BOPE: {828282}%s \n",DialogDiDi, InfoOrg[2][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}GATE: {828282}%s \n",DialogDiDi, InfoOrg[13][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Interpol: {828282}%s \n",DialogDiDi, InfoOrg[12][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Exercito: {828282}%s \n\n",DialogDiDi, InfoOrg[3][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s ___________Gangsters___________\n\n",DialogDiDi);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Los Aztecas: {828282}%s \n",DialogDiDi, InfoOrg[5][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Los Vagos: {828282}%s \n",DialogDiDi, InfoOrg[19][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}PCC: {828282}%s \n",DialogDiDi, InfoOrg[11][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Ballas: {828282}%s \n",DialogDiDi, InfoOrg[18][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Groove Street: {828282}%s \n",DialogDiDi, InfoOrg[15][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Comando Vermelho: {828282}%s \n",DialogDiDi, InfoOrg[23][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Marombas: {828282}%s \n\n",DialogDiDi, InfoOrg[27][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s ___________Mafiosos___________\n\n",DialogDiDi);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Mбfia Yakuza: {828282}%s \n",DialogDiDi, InfoOrg[20][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Mбfia Cosa Nostra: {828282}%s \n",DialogDiDi, InfoOrg[22][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Mбfia Russa: {828282}%s \n\n",DialogDiDi, InfoOrg[28][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s ___________Terroristas___________\n\n",DialogDiDi);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Taliban: {828282}%s \n",DialogDiDi, InfoOrg[6][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Al'qaeda: {828282}%s \n",DialogDiDi, InfoOrg[16][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Hamas: {828282}%s \n\n",DialogDiDi, InfoOrg[30][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s ___________Mercenбrios___________\n\n",DialogDiDi);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Sons of Anarchy: {828282}%s \n",DialogDiDi, InfoOrg[21][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Mayans: {828282}%s \n\n",DialogDiDi, InfoOrg[24][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s ___________Outras Orgs___________\n\n",DialogDiDi);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Hitmans: {828282}%s \n",DialogDiDi, InfoOrg[8][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Assassins: {828282}%s \n",DialogDiDi, InfoOrg[26][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Rede Globo: {828282}%s \n",DialogDiDi, InfoOrg[9][Lider]);
        format(DialogDiDi, sizeof(DialogDiDi),"%s {FF8C00}Mecвnicos: {828282}%s \n",DialogDiDi, InfoOrg[14][Lider]);
        ShowPlayerDialog(playerid, 1500, DIALOG_STYLE_MSGBOX, "{00FF00} Sexy{FFFF00} Machine{0244ff} Gun{FFFFFF} - Lнderes", DialogDiDi, "Fechar", "");
        return 1;
    }
Reply
#2

Tenta assim:
PHP Code:
if(strcmp(cmd"/comandofdp"true) ==|| strcmp(cmd"/infolideres"true) ==0)
    {
        
strcat(DialogDiDi,"%s ______Oficiais da Justiзa______\n\n",DialogDiDi);
        
strcat(DialogDiDi,"%s {FF8C00}Governo: {0099ff}%s \n",DialogDiDiInfoOrg[7][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Mйdicos: {aa3333}%s \n",DialogDiDiInfoOrg[4][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Policia Militar: {828282}%s \n",DialogDiDiInfoOrg[1][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Policia Cнvil: {828282}%s \n",DialogDiDiInfoOrg[17][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Policia Federal: {828282}%s \n",DialogDiDiInfoOrg[25][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}BOPE: {828282}%s \n",DialogDiDiInfoOrg[2][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}GATE: {828282}%s \n",DialogDiDiInfoOrg[13][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Interpol: {828282}%s \n",DialogDiDiInfoOrg[12][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Exercito: {828282}%s \n\n",DialogDiDiInfoOrg[3][Lider]);
        
strcat(DialogDiDi,"%s ___________Gangsters___________\n\n",DialogDiDi);
        
strcat(DialogDiDi,"%s {FF8C00}Los Aztecas: {828282}%s \n",DialogDiDiInfoOrg[5][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Los Vagos: {828282}%s \n",DialogDiDiInfoOrg[19][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}PCC: {828282}%s \n",DialogDiDiInfoOrg[11][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Ballas: {828282}%s \n",DialogDiDiInfoOrg[18][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Groove Street: {828282}%s \n",DialogDiDiInfoOrg[15][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Comando Vermelho: {828282}%s \n",DialogDiDiInfoOrg[23][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Marombas: {828282}%s \n\n",DialogDiDiInfoOrg[27][Lider]);
        
strcat(DialogDiDi,"%s ___________Mafiosos___________\n\n",DialogDiDi);
        
strcat(DialogDiDi,"%s {FF8C00}Mбfia Yakuza: {828282}%s \n",DialogDiDiInfoOrg[20][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Mбfia Cosa Nostra: {828282}%s \n",DialogDiDiInfoOrg[22][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Mбfia Russa: {828282}%s \n\n",DialogDiDiInfoOrg[28][Lider]);
        
strcat(DialogDiDi,"%s ___________Terroristas___________\n\n",DialogDiDi);
        
strcat(DialogDiDi,"%s {FF8C00}Taliban: {828282}%s \n",DialogDiDiInfoOrg[6][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Al'qaeda: {828282}%s \n",DialogDiDiInfoOrg[16][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Hamas: {828282}%s \n\n",DialogDiDiInfoOrg[30][Lider]);
        
strcat(DialogDiDi,"%s ___________Mercenбrios___________\n\n",DialogDiDi);
        
strcat(DialogDiDi,"%s {FF8C00}Sons of Anarchy: {828282}%s \n",DialogDiDiInfoOrg[21][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Mayans: {828282}%s \n\n",DialogDiDiInfoOrg[24][Lider]);
        
strcat(DialogDiDi,"%s ___________Outras Orgs___________\n\n",DialogDiDi);
        
strcat(DialogDiDi,"%s {FF8C00}Hitmans: {828282}%s \n",DialogDiDiInfoOrg[8][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Assassins: {828282}%s \n",DialogDiDiInfoOrg[26][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Rede Globo: {828282}%s \n",DialogDiDiInfoOrg[9][Lider]);
        
strcat(DialogDiDi,"%s {FF8C00}Mecвnicos: {828282}%s \n",DialogDiDiInfoOrg[14][Lider]);
        
ShowPlayerDialog(playerid1500DIALOG_STYLE_MSGBOX"{00FF00} Sexy{FFFF00} Machine{0244ff} Gun{FFFFFF} - Lнderes"DialogDiDi"Fechar""");
        return 
1;
    } 
Reply
#3

pawn Code:
error 035: argument type mismatch (argument 3)
Reply
#4

No final em qual parte?

Isso nгo irб funcionar, BrasileiroTop.
Reply
#5

PHP Code:
if(strcmp(cmd"/teste"true) == || strcmp(cmd"/teste1"true) == 0)
    {
        new 
DialogOrg[1500];
        if(
IsPlayerConnected(playerid))
        {
                
format(string128"TITULO DAS ORGS \n\n");
                
strcat(DialogOrg,string);
                
format(string128"1 - NOME DA ORG 1: %s \n"InfoOrg[1][Lider]);
                
strcat(DialogOrg,string);
                
format(string128"2 - NOME DA ORG 2: %s \n\n"InfoOrg[2][Lider]);
                
strcat(DialogOrg,string);
                
format(string128"TITULO DAS ORGS");
                
strcat(DialogOrg,string);
                
format(string128"3 - NOME DA ORG 1: %s \n"InfoOrg[3][Lider]);
                
strcat(DialogOrg,string);
                
                
ShowPlayerDialog(playerid7000DIALOG_STYLE_MSGBOX"ORGS"DialogOrg"Ok""Ok");
            }
        return 
true;
    } 
Reply
#6

Quote:
Originally Posted by Malinowski
View Post
PHP Code:
if(strcmp(cmd"/teste"true) == || strcmp(cmd"/teste1"true) == 0)
    {
        new 
DialogOrg[1500];
        if(
IsPlayerConnected(playerid))
        {
                
format(string128"TITULO DAS ORGS \n\n");
                
strcat(DialogOrg,string);
                
format(string128"1 - NOME DA ORG 1: %s \n"InfoOrg[1][Lider]);
                
strcat(DialogOrg,string);
                
format(string128"2 - NOME DA ORG 2: %s \n\n"InfoOrg[2][Lider]);
                
strcat(DialogOrg,string);
                
format(string128"TITULO DAS ORGS");
                
strcat(DialogOrg,string);
                
format(string128"3 - NOME DA ORG 1: %s \n"InfoOrg[3][Lider]);
                
strcat(DialogOrg,string);
                
                
ShowPlayerDialog(playerid7000DIALOG_STYLE_MSGBOX"ORGS"DialogOrg"Ok""Ok");
            }
        return 
true;
    } 
Irei tentar dessa forma, jб tentei +- assim e deu erro, ficou repetindo.
Reply
#7

PHP Code:
if(strcmp(cmd"/comandofdp"true) ==|| strcmp(cmd"/infolideres"true) ==0)
{
    new 
strcmd[2024// se nгo for suficiente, aumente.
    
strcat(strcmd"______Oficiais da Justiзa______\n\n"sizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Governo: {0099ff}%s \n",InfoOrg[7][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Mйdicos: {aa3333}%s \n",InfoOrg[4][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Policia Militar: {828282}%s \n",InfoOrg[1][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Policia Cнvil: {828282}%s \n",InfoOrg[17][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Policia Federal: {828282}%s \n",InfoOrg[25][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}BOPE: {828282}%s \n",InfoOrg[2][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}GATE: {828282}%s \n",InfoOrg[13][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Interpol: {828282}%s \n",InfoOrg[12][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Exercito: {828282}%s \n\n",InfoOrg[3][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
strcat(strcmd"___________Gangsters___________\n\n"sizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Los Aztecas: {828282}%s \n",InfoOrg[5][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Los Vagos: {828282}%s \n",InfoOrg[19][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}PCC: {828282}%s \n",InfoOrg[11][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Ballas: {828282}%s \n",InfoOrg[18][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Groove Street: {828282}%s \n",InfoOrg[15][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Comando Vermelho: {828282}%s \n",InfoOrg[23][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Marombas: {828282}%s \n\n",InfoOrg[27][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
strcat(strcmd"___________Mafiosos___________\n\n"sizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Mбfia Yakuza: {828282}%s \n",InfoOrg[20][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Mбfia Cosa Nostra: {828282}%s \n",InfoOrg[22][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Mбfia Russa: {828282}%s \n\n",InfoOrg[28][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
strcat(strcmd"___________Terroristas___________\n\n"sizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Taliban: {828282}%s \n",InfoOrg[6][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Al'qaeda: {828282}%s \n",InfoOrg[16][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Hamas: {828282}%s \n\n",InfoOrg[30][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
strcat(strcmd"___________Mercenбrios___________\n\n"sizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Sons of Anarchy: {828282}%s \n",InfoOrg[21][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Mayans: {828282}%s \n\n",InfoOrg[24][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
strcat(strcmd"___________Outras Orgs___________\n\n"sizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Hitmans: {828282}%s \n",InfoOrg[8][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Assassins: {828282}%s \n",InfoOrg[26][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Rede Globo: {828282}%s \n",InfoOrg[9][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
format(DialogDiDisizeof(DialogDiDi),"{FF8C00}Mecвnicos: {828282}%s \n",InfoOrg[14][Lider]);
    
strcat(strcmdDialogDiDisizeof(strcmd));
    
ShowPlayerDialog(playerid1500DIALOG_STYLE_MSGBOX"{00FF00} Sexy{FFFF00} Machine{0244ff} Gun{FFFFFF} - Lнderes"strcmd"Fechar""");

Se ficar "incompleto", aumente o valor da cйlula strcmd.
Reply
#8

Conseguir fazer, pelo visto eu estava completamente fora do rumo, muito obrigado a todos
Reply
#9

Usa o Pawn.CMD й mais rбpido e voce pode colocar o mesmo comando pra ser ativado com outros comandos (ex: /ajuda /h /help /cmds /comandos/ /cmd ... todos vc pode configurar pra fazer o mesmo comando, e o melhor nгo precisa fazer checagem usando o strcmp q й mais lento, ruim de ler e repetitivo).

https://sampforum.blast.hk/showthread.php?tid=608474
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)