SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 21/08/2014, 07:29 PM   #1
eNtinityGaming
Huge Clucker
 
eNtinityGaming's Avatar
 
Join Date: Jan 2014
Posts: 338
Reputation: 1
Default DIALOG_COLETES não está funcionando

o dialog tem 2 opções: Armas e Coletes, o dialogid do colete não está abrindo, por exemplo eu abro a o dialog armas e clico na arma q eu desejo, certo comprou até ai tudo bem, ai eu vou na dialog dos coletes, clico em algum colete e não acontece nada, oq pode ser?

pawn Code:
if(dialogid == DIALOG_SHOP)
    {
        switch(listitem)
        {
            case 0:
            {
             ShowPlayerDialog(playerid, DIALOG_ARMAS, DIALOG_STYLE_LIST, "{FB0000}Armas", "9mm 500$\n9mm Silenced 700$\nDesert Eagle 1000$\nShotgun 1500$\nSwanoff Shotgun 1700$\nCombat Shotgun 2000$\nMicro SMG/Uzi 1000$\nMP5 1250$\nAK-47 2000$\nM4 2250$\nTec-9 1000$\nCountry Rifle 1500$\nSniper Rifle 3000$", "Comprar", "Fechar");
            }
            case 1:
            {
             ShowPlayerDialog(playerid, DIALOG_COLETE, DIALOG_STYLE_LIST, "{FFFFFF}Colete", "Armor 25% 250$\nArmor 50% 500$\nArmor 75% 750$\nArmor 100% 1000$\nHealth Refill 1000$\nVibrator 250$\nDouble Dildo 500$\nBombs 2000$", "Comprar", "Fechar");
            }
        }
    }
    if(dialogid == DIALOG_ARMAS)
    {
        switch(listitem)
        {
            case 0: /* 9mm */
            {
                if(GetPlayerMoney(playerid) >=500)
                {
                GivePlayerWeapon(playerid, 22, 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a 9mm"); /* Successfull pourcheas message */
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!"); /* Not enough money message */
                }
            }
            case 1: /* 9mm Silenced */
            {
                if(GetPlayerMoney(playerid) >=700)
                {
                GivePlayerWeapon(playerid, 23, 500);
                GivePlayerMoney(playerid, -700);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a 9mm Silenced");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 2: /* Desert Eagle */
            {
                if(GetPlayerMoney(playerid) >=1000)
                {
                GivePlayerWeapon(playerid, 24, 107);
                GivePlayerMoney(playerid,-1000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Desert Eagle");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 3: /* Shotgun */
            {
                if(GetPlayerMoney(playerid) >=1500)
                {
                GivePlayerWeapon(playerid, 25, 150);
                GivePlayerMoney(playerid, -1500);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Shotgun");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 4: /* Sawnoff Shotgun */
            {
                if(GetPlayerMoney(playerid) >=1700)
                {
                GivePlayerWeapon(playerid, 26, 200);
                GivePlayerMoney(playerid, -1700);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Sawnoff Shotgun");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 5: /* Combat Shotgun */
            {
                if(GetPlayerMoney(playerid) >=2000)
                {
                GivePlayerWeapon(playerid, 27, 200);
                GivePlayerMoney(playerid, -2000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Combat Shotgun");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 6: /* Micro SMG/Uzi */
            {
                if(GetPlayerMoney(playerid) >=1000)
                {
                GivePlayerWeapon(playerid, 28, 500);
                GivePlayerMoney(playerid, -1000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Micro SMG/Uzi");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 7: /* MP-5 */
            {
                if(GetPlayerMoney(playerid) >=1250)
                {
                GivePlayerWeapon(playerid, 29, 250);
                GivePlayerMoney(playerid, -1250);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a MP-5");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 8: /* AK-47 */
            {
                if(GetPlayerMoney(playerid) >=2000)
                {
                GivePlayerWeapon(playerid, 30, 300);
                GivePlayerMoney(playerid, -2000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a AK-47");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 9: /* M4 */
            {
                if(GetPlayerMoney(playerid) >=2250)
                {
                GivePlayerWeapon(playerid, 31, 300);
                GivePlayerMoney(playerid, -2250);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a M4");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 10: /* Tec-9 */
            {
                if(GetPlayerMoney(playerid) >=1000)
                {
                GivePlayerWeapon(playerid, 32, 500);
                GivePlayerMoney(playerid, -1000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Tec-9");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 11: /* Country Rifle */
            {
                if(GetPlayerMoney(playerid) >=1500)
                {
                GivePlayerWeapon(playerid, 33, 250);
                GivePlayerMoney(playerid, -1500);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Country Rifle");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
            case 12: /* Sniper Rifle */
            {
                if(GetPlayerMoney(playerid) >=3000)
                {
                GivePlayerWeapon(playerid, 34, 100);
                GivePlayerMoney(playerid, -3000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Sniper Rifle");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
                }
            }
        }
        if(dialogid == DIALOG_COLETE)
        {
        switch(listitem)
        {
            case 0:
            {
                if(GetPlayerMoney(playerid) >=250) /* 25% Armor */
                {
                SetPlayerArmour(playerid, 25.0);
                GivePlayerMoney(playerid, -250);
                SendClientMessage(playerid, AZUL_CLARO, "[ELSE] » You successfully bought 25% Armor");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[ELSE] » You dont have enough money!");
                }
            }
            case 1:
            {
                if(GetPlayerMoney(playerid) >=500)  /* 50% Armor */
                {
                SetPlayerArmour(playerid, 50.0);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, AZUL_CLARO, "[ELSE] » You successfully bought 50% Armor");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[ELSE] » You dont have enough money!");
                }
            }
            case 2:
            {
                if(GetPlayerMoney(playerid) >=750)  /* 75% Armor */
                {
                SetPlayerArmour(playerid, 75.0);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, AZUL_CLARO, "[ELSE] » You successfully bought 75% Armor");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[ELSE] » You dont have enough money!");
                }
            }
            case 3:
            {
                if(GetPlayerMoney(playerid) >=1000)  /* 100% Armor */
                {
                SetPlayerArmour(playerid, 100.0);
                GivePlayerMoney(playerid, -1000);
                SendClientMessage(playerid, AZUL_CLARO, "[ELSE] » You successfully bought 100% Armor");
                }
                else
                {
                SendClientMessage(playerid, VERMELHO, "[ELSE] » You dont have enough money!");
                }
             }
          }
       }
    }
eNtinityGaming is offline   Reply With Quote
Old 21/08/2014, 07:51 PM   #2
Schocc
High-roller
 
Join Date: Mar 2012
Location: /home
Posts: 3,253
Reputation: 378
Default Re: DIALOG_COLETES não está funcionando

Você colocou o dialog do colete dentro de outro dialog.

pawn Code:
if(dialogid == DIALOG_SHOP)
{
    switch(listitem)
    {
        case 0:
        {
            ShowPlayerDialog(playerid, DIALOG_ARMAS, DIALOG_STYLE_LIST, "{FB0000}Armas", "9mm 500$\n9mm Silenced 700$\nDesert Eagle 1000$\nShotgun 1500$\nSwanoff Shotgun 1700$\nCombat Shotgun 2000$\nMicro SMG/Uzi 1000$\nMP5 1250$\nAK-47 2000$\nM4 2250$\nTec-9 1000$\nCountry Rifle 1500$\nSniper Rifle 3000$", "Comprar", "Fechar");
        }
        case 1:
        {
            ShowPlayerDialog(playerid, DIALOG_COLETE, DIALOG_STYLE_LIST, "{FFFFFF}Colete", "Armor 25% 250$\nArmor 50% 500$\nArmor 75% 750$\nArmor 100% 1000$\nHealth Refill 1000$\nVibrator 250$\nDouble Dildo 500$\nBombs 2000$", "Comprar", "Fechar");
        }
    }
}

if(dialogid == DIALOG_ARMAS)
{
    switch(listitem)
    {
        case 0: /* 9mm */
        {
            if(GetPlayerMoney(playerid) >=500)
            {
                GivePlayerWeapon(playerid, 22, 500);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a 9mm"); /* Successfull pourcheas message */
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!"); /* Not enough money message */
            }
        }
        case 1: /* 9mm Silenced */
        {
            if(GetPlayerMoney(playerid) >=700)
            {
                GivePlayerWeapon(playerid, 23, 500);
                GivePlayerMoney(playerid, -700);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a 9mm Silenced");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 2: /* Desert Eagle */
        {
            if(GetPlayerMoney(playerid) >=1000)
            {
                GivePlayerWeapon(playerid, 24, 107);
                GivePlayerMoney(playerid,-1000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Desert Eagle");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 3: /* Shotgun */
        {
            if(GetPlayerMoney(playerid) >=1500)
            {
                GivePlayerWeapon(playerid, 25, 150);
                GivePlayerMoney(playerid, -1500);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Shotgun");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 4: /* Sawnoff Shotgun */
        {
            if(GetPlayerMoney(playerid) >=1700)
            {
                GivePlayerWeapon(playerid, 26, 200);
                GivePlayerMoney(playerid, -1700);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Sawnoff Shotgun");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 5: /* Combat Shotgun */
        {
            if(GetPlayerMoney(playerid) >=2000)
            {
                GivePlayerWeapon(playerid, 27, 200);
                GivePlayerMoney(playerid, -2000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Combat Shotgun");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 6: /* Micro SMG/Uzi */
        {
            if(GetPlayerMoney(playerid) >=1000)
            {
                GivePlayerWeapon(playerid, 28, 500);
                GivePlayerMoney(playerid, -1000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Micro SMG/Uzi");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 7: /* MP-5 */
        {
            if(GetPlayerMoney(playerid) >=1250)
            {
                GivePlayerWeapon(playerid, 29, 250);
                GivePlayerMoney(playerid, -1250);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a MP-5");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 8: /* AK-47 */
        {
            if(GetPlayerMoney(playerid) >=2000)
            {
                GivePlayerWeapon(playerid, 30, 300);
                GivePlayerMoney(playerid, -2000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a AK-47");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 9: /* M4 */
        {
            if(GetPlayerMoney(playerid) >=2250)
            {
                GivePlayerWeapon(playerid, 31, 300);
                GivePlayerMoney(playerid, -2250);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a M4");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 10: /* Tec-9 */
        {
            if(GetPlayerMoney(playerid) >=1000)
            {
                GivePlayerWeapon(playerid, 32, 500);
                GivePlayerMoney(playerid, -1000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Tec-9");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 11: /* Country Rifle */
        {
            if(GetPlayerMoney(playerid) >=1500)
            {
                GivePlayerWeapon(playerid, 33, 250);
                GivePlayerMoney(playerid, -1500);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Country Rifle");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
        case 12: /* Sniper Rifle */
        {
            if(GetPlayerMoney(playerid) >=3000)
            {
                GivePlayerWeapon(playerid, 34, 100);
                GivePlayerMoney(playerid, -3000);
                SendClientMessage(playerid, AZUL_CLARO, "[WEAPONS] » Successfully bought a Sniper Rifle");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[WEAPONS] » You dont have enough money!");
            }
        }
    }
}

if(dialogid == DIALOG_COLETE)
{
    switch(listitem)
    {
        case 0:
        {
            if(GetPlayerMoney(playerid) >=250) /* 25% Armor */
            {
                SetPlayerArmour(playerid, 25.0);
                GivePlayerMoney(playerid, -250);
                SendClientMessage(playerid, AZUL_CLARO, "[ELSE] » You successfully bought 25% Armor");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[ELSE] » You dont have enough money!");
            }
        }
        case 1:
        {
            if(GetPlayerMoney(playerid) >=500)  /* 50% Armor */
            {
                SetPlayerArmour(playerid, 50.0);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, AZUL_CLARO, "[ELSE] » You successfully bought 50% Armor");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[ELSE] » You dont have enough money!");
            }
        }
        case 2:
        {
            if(GetPlayerMoney(playerid) >=750)  /* 75% Armor */
            {
                SetPlayerArmour(playerid, 75.0);
                GivePlayerMoney(playerid, -500);
                SendClientMessage(playerid, AZUL_CLARO, "[ELSE] » You successfully bought 75% Armor");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[ELSE] » You dont have enough money!");
            }
        }
        case 3:
        {
            if(GetPlayerMoney(playerid) >=1000)  /* 100% Armor */
            {
                SetPlayerArmour(playerid, 100.0);
                GivePlayerMoney(playerid, -1000);
                SendClientMessage(playerid, AZUL_CLARO, "[ELSE] » You successfully bought 100% Armor");
            }
            else
            {
                SendClientMessage(playerid, VERMELHO, "[ELSE] » You dont have enough money!");
            }
        }
    }
}


Seu erro foi basicamente isso:
pawn Code:
if (dialogid == dialog_armas)
{
    switch(listitem){
        case 0:{}
        case 1:{}
    }

    // Seu erro foi colocar um dialogID dentro de outro.
    if (dialogid == dialog_colete){

    }
}
Schocc is offline   Reply With Quote
Old 21/08/2014, 07:58 PM   #3
eNtinityGaming
Huge Clucker
 
eNtinityGaming's Avatar
 
Join Date: Jan 2014
Posts: 338
Reputation: 1
Default Re: DIALOG_COLETES não está funcionando

Valeu amigo !
Funcionou certinho
eNtinityGaming is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Não está funcionando ! ZaturN Português/Portuguese 8 10/12/2013 09:38 PM
[Ajuda] Convertffs não está funcionando? SouUmaJujuba Português/Portuguese 11 08/10/2013 08:38 PM
[Ajuda] Comando não está funcionando! lokos45 Português/Portuguese 1 12/09/2013 06:19 PM
[Ajuda] Porque não esta funcionando ? lyllrasta Português/Portuguese 7 06/09/2012 10:15 PM


All times are GMT. The time now is 02:07 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.