HELP ME DIALOG_STYLE_INPUT
#1

I have this dialog command in list works that way more when I define if (listitem == 0) my dialog does not work





PHP код:
   if (strcmp("/cu2"cmdtexttrue10) == 0
    { 
        if(
AreaPosto[playerid] == true
        { 
            
ShowPlayerDialog(playerid,GASOLINA,DIALOG_STYLE_LIST,"Posto","Gasolina\nDiesel\nEtanol","Comprar","Sair"); 
     
        } 
        else 
            { 
                   
SendClientMessage(playeridCOR_ERRO"Vocк nгo estб em um posto de combustнvel!"); 
            } 
    return 
1
    } 


It works fine so more when I set in if (listitem == 0) I have no answer





PHP код:
if(dialogid == GASOLINA
    { 
        if(
response
            { 
             
     
             
                new var[
128]; 
                new 
tmp [128], idxcmd [128]; 
                
tmp strtok(inputtextidx); 
                
ShowPlayerDialog(playerid,GASOLINA,DIALOG_STYLE_INPUT,"Posto","Gasolina","Comprar","Sair"); 
              
              
                if(!
strlen(tmp)) 
                { 
                    
SendClientMessage(playeridCOR_ERRO"Quantidade de 1 a 100"); 
                     return 
1
                } 
                new 
quantidade
                
quantidade strval(tmp); 
                 
                 
                if(
quantidade 100 || quantidade 1)    return SendClientMessage(playeridCOR_ERRO"Quantidade invбlida!"); 
                 
                 
                 
                if(
pInfo[playerid][GasG] >= 100)    return SendClientMessage(playeridCOR_ERRO"Seu tanque jб estб completo!"); 
                     
                     
                     
                if(
GetPlayerCash(playerid) < quantidade*5)    return SendClientMessage(playeridCOR_ERRO"Vocк nгo tem a quantia necessбria!"); 
                 
                 
                 
                 
                if(
pInfo[playerid][GasG]+quantidade <= 100
                { 
                     
                     
                    new 
preco quantidade*5
                     
                     
                    
TogglePlayerControllable(playeridtrue); 
                     
                     
                    new 
AgoraV pInfo[playerid][GasG] + quantidade
                    
pInfo[playerid][GasG] = AgoraV
                    
sGivePlayerCash(playerid, -preco); 
                     
format(gStrsizeof(gStr), "Abastecendo %d litros de Gasolina..."quantidade); 
                    
SendClientMessage(playeridAZUL_BMOgStr); 
                } 
                else 
                { 
                    new 
precofull 100-pInfo[playerid][GasG]; 
                    
TogglePlayerControllable(playeridtrue); 
                    
pInfo[playerid][GasG] = 100
                    
sGivePlayerCash(playerid, -precofull*5); 
                    
format(gStrsizeof(gStr), "Abastecendo %d litros de Gasolina..."precofull); 
                    
SendClientMessage(playeridAZUL_BMOgStr); 
                } 
                
SetTimerEx("Abastecendo"3000false"i"playerid); 
                
TogglePlayerControllable(playeridfalse); 
                return 
1
     
     
            } 
    } 
Reply
#2

I see no listitem under OnDialogResponse.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)