[Ajuda] Dialog duplicada
#1

Fiz um sistema de eventos onde digitado o comando /resultadoevento aparece dialogs para preencher com os ids e os prкmios. No ultimo dialog o resultado й publicado, porйm estб saindo duas vezes o resultado veja.



OnDialogResponse

PHP код:
if(dialogid == DIALOG_EVENTO_RESULTADO1)
{
    if(
response)
     {
         new 
id strval(inputtext);
         new 
string[128], string1[128];
         
eventoPrimeiroColocado Nome(id);
         
        
format(string, -1"{FFD700}1є {FFFFFF}- {FFD700}%s\n\n"eventoPrimeiroColocado);
        
strcat(string1,string);
        
format(string, -1"{FFFFFF}Digite o prкmio do {FFD700}PRIMEIRO {FFFFFF}colocado:\n");
        
strcat(string1,string);
        
ShowPlayerDialog(playeridDIALOG_EVENTO_PREMIO1DIALOG_STYLE_INPUT"{FFD700}» {FFFFFF}RESULTADO DO EVENTO 1є COLOCADO {FFD700}«"string1"Prуximo""");
      }
}
if(
dialogid == DIALOG_EVENTO_PREMIO1)
{
    if(
response)
    {
         new 
string[500], string1[500];
         
        
format(eventoPremioPrimeiroColocado128inputtext);
        
        
format(string, -1"{FFD700}1є {FFFFFF}- {FFD700}%s\n"eventoPrimeiroColocado);
        
strcat(string1,string);
         
        
format(string, -1"{FFFFFF}Ganhou: %s\n\n",eventoPremioPrimeiroColocado);
        
strcat(string1,string);
        
        
format(string, -1"{FFFFFF}Digite o ID do {FFD700}SEGUNDO {FFFFFF}colocado:\n");
        
strcat(string1,string);
        
ShowPlayerDialog(playeridDIALOG_EVENTO_RESULTADO2DIALOG_STYLE_INPUT"{FFD700}» {FFFFFF}RESULTADO DO EVENTO 2є COLOCADO {FFD700}«"string1"Prуximo""");
    }
}
if(
dialogid == DIALOG_EVENTO_RESULTADO2)
{
    if(
response)
     {
         new 
id strval(inputtext);
         new 
string[500], string1[500];
         
eventoSegundoColocado Nome(id);
        
format(string, -1"{FFD700}1є {FFFFFF}- {FFD700}%s\n"eventoPrimeiroColocado);
        
strcat(string1,string);
        
format(string, -1"{FFFFFF}Ganhou: %s\n\n",eventoPremioPrimeiroColocado);
        
strcat(string1,string);
        
format(string, -1"{FFD700}2є {FFFFFF}- {FFD700}%s\n\n"eventoSegundoColocado);
        
strcat(string1,string);
        
format(string, -1"{FFFFFF}Digite o prкmio do {FFD700}SEGUNDO {FFFFFF}colocado:\n");
        
strcat(string1,string);
        
        
ShowPlayerDialog(playeridDIALOG_EVENTO_PREMIO2DIALOG_STYLE_INPUT"{FFD700}» {FFFFFF}RESULTADO DO EVENTO 2є COLOCADO {FFD700}«"string1"Prуximo""");
      }
}
if(
dialogid == DIALOG_EVENTO_PREMIO2)
{
    if(
response)
    {
         new 
string[500], string1[500];
        
format(eventoPremioSegundoColocado128inputtext);
        
format(string, -1"{FFD700}1є {FFFFFF}- {FFD700}%s\n"eventoPrimeiroColocado);
        
strcat(string1,string);
        
format(string, -1"{FFFFFF}Ganhou: %s\n\n",eventoPremioPrimeiroColocado);
        
strcat(string1,string);
        
format(string, -1"{FFD700}2є {FFFFFF}- {FFD700}%s\n"eventoSegundoColocado);
        
strcat(string1,string);
        
format(string, -1"{FFFFFF}Ganhou: %s\n\n",eventoPremioSegundoColocado);
        
strcat(string1,string);
        
format(string, -1"{FFFFFF}Digite o ID do {FFD700}TERCEIRO {FFFFFF}colocado:\n");
        
strcat(string1,string);
        
ShowPlayerDialog(playeridDIALOG_EVENTO_RESULTADO3DIALOG_STYLE_INPUT"{FFD700}» {FFFFFF}RESULTADO DO EVENTO 3є COLOCADO {FFD700}«"string1"Prуximo""");
    }
}
if(
dialogid == DIALOG_EVENTO_RESULTADO3)
{
    if(
response)
     {
         new 
id strval(inputtext);
         new 
string[500], string1[500];
         
eventoTerceiroColocado Nome(id);
        
format(string, -1"{FFD700}1є {FFFFFF}- {FFD700}%s\n"eventoPrimeiroColocado);
        
strcat(string1,string);
        
format(string, -1"{FFFFFF}Ganhou: %s\n\n",eventoPremioPrimeiroColocado);
        
strcat(string1,string);
        
format(string, -1"{FFD700}2є {FFFFFF}- {FFD700}%s\n"eventoSegundoColocado);
        
strcat(string1,string);
        
format(string, -1"{FFFFFF}Ganhou: %s\n\n",eventoPremioSegundoColocado);
        
strcat(string1,string);
        
format(string, -1"{FFD700}3є {FFFFFF}- {FFD700}%s\n\n"eventoTerceiroColocado);
        
strcat(string1,string);
        
format(string, -1"{FFFFFF}Digite o prкmio do {FFD700}TERCEIRO {FFFFFF}colocado:\n");
        
strcat(string1,string);
        
ShowPlayerDialog(playeridDIALOG_EVENTO_PREMIO3DIALOG_STYLE_INPUT"{FFD700}» {FFFFFF}RESULTADO DO EVENTO 3є COLOCADO {FFD700}«"string1"Publicar""");
      }
}
if(
dialogid == DIALOG_EVENTO_PREMIO3)
{
    if(
response)
    {
         new 
string[500], string1[500];
         
format(eventoPremioTerceiroColocado128inputtext);
         
        for(new 
0MAX_PLAYERSi++)
        {
                
format(string, -1"{FFD700}1є {FFFFFF}- {FFD700}%s\n"eventoPrimeiroColocado);
                
strcat(string1,string);
                
format(string, -1"{FFFFFF}Ganhou: %s\n\n"eventoPremioPrimeiroColocado);
                
strcat(string1,string);
                
format(string, -1"{FFD700}2є {FFFFFF}- {FFD700}%s\n"eventoSegundoColocado);
                
strcat(string1,string);
                
format(string, -1"{FFFFFF}Ganhou: %s\n\n"eventoPremioSegundoColocado);
                
strcat(string1,string);
                
format(string, -1"{FFD700}3є {FFFFFF}- {FFD700}%s\n"eventoTerceiroColocado);
                
strcat(string1,string);
                
format(string, -1"{FFFFFF}Ganhou: %s\n"eventoPremioTerceiroColocado);
                
strcat(string1,string);
                
ShowPlayerDialog(iDIALOG_EVENTO_PUBLICARDIALOG_STYLE_MSGBOX"{FFD700}» {FFFFFF}RESULTADO DO EVENTO {FFD700}«"string1"Fechar""");
        }
    }

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)