[Ajuda] Ajuda Bug dialog
#1

RESOLVIDO!
Reply
#2

poste o ondialogresponse todo acredito que vocк esta colocando tudo misturado e os ids devem estar iguais..
Reply
#3

PHP код:
 if(dialogid == 123)
{
    if(
response)
    {
        if(
listitem == 0)
        {
            
ShowPlayerDialog(playerid1234DIALOG_STYLE_INPUT"Muniзгo Desert""{436EEE}Muniзгo:""Equipar""Cancelar");
            
SetPVarInt(playerid,"arma",24);
        }
        if(
listitem == 1)
        {
            
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo Shotgun""{436EEE}Muniзгo:""Equipar""Cancelar");
            
SetPVarInt(playerid,"arma",25);
        }
        if(
listitem == 2)
        {
            
ShowPlayerDialog(playerid1234DIALOG_STYLE_INPUT"Muniзгo MP5""{436EEE}Muniзгo:""Equipar""Cancelar");
            
SetPVarInt(playerid,"arma",29);
        }
        if(
listitem == 3)
        {
            
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo M4A1""{436EEE}Muniзгo:""Equipar""Cancelar");
            
SetPVarInt(playerid,"arma",31);
        }
        if(
listitem == 4)
        {
            
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo Silenced 9mm""{436EEE}Muniзгo:""Equipar""Cancelar");
            
SetPVarInt(playerid,"arma",23);
        }
        if(
listitem == 5)
        {
            
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo Combat Shotgun""{436EEE}Muniзгo:""Equipar""Cancelar");
            
SetPVarInt(playerid,"arma",27);
        }

        if(
listitem == 6)
        {
            
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo Sniper""{436EEE}Muniзгo:""Equipar""Cancelar");
            
SetPVarInt(playerid,"arma",34);
        }

        if(
listitem == 7)
        {
            
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo 9mm""{436EEE}Muniзгo:""Equipar""Cancelar");
            
SetPVarInt(playerid,"arma",22);
        }

        if(
listitem == 8)
        {
            
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Qunatidades Bomba de Gбs""{436EEE}Muniзгo:""Equipar""Cancelar");
            
SetPVarInt(playerid,"arma",17);
        }
        if(
listitem == 9)
        {
            if(
ColocarColete[playerid] == 0)
            {
                new 
id CountAttachedObjects(playerid);
                
SetPlayerAttachedObject(playeridid1914210.10.050.0);
                
SetPlayerAttachedObjectEx(19142,Vaga_Colete,playerid,id);
                
SendClientMessage(playerid0x00BFFFAA"[Informaзгo] Voce colocou seu Colete!");
                
ColocarColete[playerid] = 1;
                
SetPlayerArmour(playerid50);
            }
            else if(
ColocarColete[playerid] == 1)
            {
                
RemovePlayerAttachedObjectEx(playerid,Vaga_Colete);
                
SendClientMessage(playerid0x00BFFFAA"[Informaзгo] Voce retirou seu Colete!");
                
ColocarColete[playerid] = 0;
                
SetPlayerArmour(playerid0);
                
SetPVarInt(playerid,"arma",0);
            }
        }
    }
    return 
1;
}

if(
dialogid == 1234)
{
    if(
response)
    {
        switch(
GetPVarInt(playerid"arma"))
        {
            case 
24:
            {
                if(!
strval(inputtext) || strval(inputtext) > 90)
                {
                    
SendClientMessage(playerid0x36648BAA"Essa Arma Sу suporta apenas {27408B} 90 {36648B}Balas.");
                    
// retorno mostrando a dialog de muniзгo pra que dessa vez ele coloque um numero de bala valido..
                    
return ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo""{436EEE}Muniзгo:""Equipar""Cancelar");
                }
                
GivePlayerWeaponEx(playeridGetPVarInt(playerid"arma"), strval(inputtext));

            }
            case 
25:
            {
                if(!
strval(inputtext) || strval(inputtext) > 65)
                {
                    
SendClientMessage(playerid0x36648BAA" Essa Arma Sу suporta apenas {27408B}65{36648B}Balas.");
                    return 
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo""{436EEE}Muniзгo:""Equipar""Cancelar");
                }
                
GivePlayerWeaponEx(playeridGetPVarInt(playerid"arma"), strval(inputtext));
            }
            case 
29:
            {
                if(!
strval(inputtext) || strval(inputtext) > 250)
                {
                    
SendClientMessage(playerid0x36648BAA"Essa Arma Sу suporta apenas {27408B}250{36648B} Balas.");
                    return 
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo""{436EEE}Muniзгo:""Equipar""Cancelar");
                }
                
GivePlayerWeaponEx(playeridGetPVarInt(playerid"arma"), strval(inputtext));
            }
            case 
31:
            {

                if(!
strval(inputtext) || strval(inputtext) > 270)
                {
                    
SendClientMessage(playerid0x36648BAA"Essa Arma Sу suporta apenas {27408B}270{36648B} Balas.");
                    return 
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo""{436EEE}Muniзгo:""Equipar""Cancelar");
                }
                
GivePlayerWeaponEx(playeridGetPVarInt(playerid"arma"), strval(inputtext));
            }
            case 
23:
            {
                if(!
strval(inputtext) || strval(inputtext) > 220)
                {
                    
SendClientMessage(playerid0x36648BAA"Essa Arma Sу suporta apenas {27408B}220{36648B} Balas.");
                    return 
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo""{436EEE}Muniзгo:""Equipar""Cancelar");
                }
                
GivePlayerWeaponEx(playeridGetPVarInt(playerid"arma"), strval(inputtext));
            }
            case 
27:
            {
                if(!
strval(inputtext) || strval(inputtext) > 125)
                {
                    
SendClientMessage(playerid0x36648BAA"Essa Arma Sу suporta apenas {27408B}125{36648B} Balas.");
                    return 
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo""{436EEE}Muniзгo:""Equipar""Cancelar");
                }
                
GivePlayerWeaponEx(playeridGetPVarInt(playerid"arma"), strval(inputtext));
            }
            case 
34:
            {
                if(!
strval(inputtext) || strval(inputtext) > 40)
                {

                    
SendClientMessage(playerid0x36648BAA"Essa Arma Sу suporta apenas {27408B} 40 {36648B} Balas.");
                    return 
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo""{436EEE}Muniзгo:""Equipar""Cancelar");
                }
                
GivePlayerWeaponEx(playeridGetPVarInt(playerid"arma"), strval(inputtext));
            }
             case 
22:
            {
                if(!
strval(inputtext) || strval(inputtext) > 220)
                {

                    
SendClientMessage(playerid0x36648BAA"Essa Arma Sу suporta apenas {27408B} 220 {36648B} Balas.");
                    return 
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo""{436EEE}Muniзгo:""Equipar""Cancelar");
                }
                
GivePlayerWeaponEx(playeridGetPVarInt(playerid"arma"), strval(inputtext));
            }
            case 
17:
            {
                if(!
strval(inputtext) || strval(inputtext) > 5)
                {

                    
SendClientMessage(playerid0x36648BAA"Seu Suporte De Bombas Sу suporta {27408B} 5 {36648B} Bombбs de Gбs.");
                    return 
ShowPlayerDialog(playerid,1234DIALOG_STYLE_INPUT"Muniзгo""{436EEE}Muniзгo:""Equipar""Cancelar");
                }
                
GivePlayerWeaponEx(playerid,GetPVarInt(playerid,"arma"),strval(inputtext));
            }
            default: 
ShowPlayerDialog(playerid123DIALOG_STYLE_LIST"Equipamentos Militar""Deserte Eagle\nShotgun\nMP5\nM4A1\nSilenced 9mm\nCombat Shotgun\nSniper\n9mm\nBomba de Gбs\nColete\nC.O.E""Escolher""Cancelar");
        }
        return 
1;
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)