Weapon Dialog problem
#1

When i type /w everything works, I select one of the weapons group and when i select the weapon name nothing happens(it doesn't give it to me). Here is the code
pawn Код:
if(dialogid == DIALOG_WEAPONS) {
        if(response == 1)
    {
        switch(dialogid)
        {
            case 25:
            {
                switch(listitem)
                {
                    case 0: ShowPlayerDialog(playerid, 26, 2, "Melee ($ 50)", "Brass knuckles ($ 50)\nGolf club ($ 50)\nNite stick ($ 50)\nKnife ($ 50)\nBaseball bat ($ 50)\nShovel ($ 50)\nPool cue ($ 50)\nKatana ($ 50)\nChainsaw ($ 50)\nPurple dildo ($ 50)\nShort dildo ($ 50)\nLong vibrator ($ 50)\nLong vibrator ($ 50)\nFlowers ($ 50)\nCane ($ 50)", "Избери", "Откажи");
                    case 1: ShowPlayerDialog(playerid, 27, 2, "Thrown ($ 450)", "Grenades ($ 450)\nTear Gas ($ 450)\nMolotov cocktail ($ 450)", "Избери", "Откажи");
                    case 2: ShowPlayerDialog(playerid, 28, 2, "Pistols ($ 150)", "9mm Pistol ($ 150)\nSilenced pistol ($ 150)\nDesert eagle ($ 150)", "Избери", "Откажи");
                    case 3: ShowPlayerDialog(playerid, 29, 2, "Shotguns ($ 700)", "Shotgun ($ 700)\nSawn-off shotgun ($ 700)\nCombat shotgun ($ 700)", "Избери", "Откажи");
                    case 4: ShowPlayerDialog(playerid, 30, 2, "Sub-machine guns ($ 300)", "Micro Uzi ($ 300)\nMP5 ($ 300)\nTEC9 ($ 300)", "Избери", "Откажи");
                    case 5: ShowPlayerDialog(playerid, 31, 2, "Rifles ($ 500)", "AK47 ($ 500)\nM4 ($ 500)\nCountry rifle ($ 500)\nSniper rifle ($ 500)", "Избери", "Откажи");
                    case 6: ShowPlayerDialog(playerid, 32, 2, "Hand held ($ 100)", "Spray can ($ 100)\nFire extinguisher ($ 100)\nCamera ($ 100)", "Избери", "Откажи");
                    case 7: ShowPlayerDialog(playerid, 33, 2, "Apparel ($ 100)", "Night vision ($ 100)\nThermal goggles ($ 100)\nParachute ($ 100)", "Избери", "Откажи");
                    case 8: ShowPlayerDialog(playerid, 34, 2, "Special ($ 250)", "Satchel charges ($ 250)\nDetonator ($ 250)", "Избери", "Откажи");
                }
            }
            case 26:
            {
                new weapons[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
                GivePlayerMoney(playerid, -50);
                SendClientMessage(playerid, COLOR_YELLOW, "BLALBLALBLALBLQALBPALBLALBLA");
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 27:
            {
                new weapons[] = {16,17,18};
                GivePlayerMoney(playerid, -450);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 28:
            {
                new weapons[] = {22,23,24};
                GivePlayerMoney(playerid, -150);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 29:
            {
                new weapons[] = {25,26,27};
                GivePlayerMoney(playerid, -700);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 30:
            {
                new weapons[] = {28,29,32};
                GivePlayerMoney(playerid, -300);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 31:
            {
                new weapons[] = {30,31,33,34};
                GivePlayerMoney(playerid, -500);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 32:
            {
                new weapons[] = {41,42,43,44};
                GivePlayerMoney(playerid, -100);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 33:
            {
                new weapons[] = {44,45,46};
                GivePlayerMoney(playerid, -100);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 34:
            {
                new weapons[] = {39,40};
                GivePlayerMoney(playerid, -250);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
        }
    }
}
Reply
#2

I am sorry for the double post but please can someone help me, it is important for me.
Reply
#3

Quote:
Originally Posted by martoivanov
Посмотреть сообщение
When i type /w everything works, I select one of the weapons group and when i select the weapon name nothing happens(it doesn't give it to me). Here is the code
pawn Код:
if(dialogid == DIALOG_WEAPONS) {
        if(response == 1)
    {
        switch(dialogid)
        {
            case 25:
            {
                switch(listitem)
                {
                    case 0: ShowPlayerDialog(playerid, 26, 2, "Melee ($ 50)", "Brass knuckles ($ 50)\nGolf club ($ 50)\nNite stick ($ 50)\nKnife ($ 50)\nBaseball bat ($ 50)\nShovel ($ 50)\nPool cue ($ 50)\nKatana ($ 50)\nChainsaw ($ 50)\nPurple dildo ($ 50)\nShort dildo ($ 50)\nLong vibrator ($ 50)\nLong vibrator ($ 50)\nFlowers ($ 50)\nCane ($ 50)", "Избери", "Откажи");
                    case 1: ShowPlayerDialog(playerid, 27, 2, "Thrown ($ 450)", "Grenades ($ 450)\nTear Gas ($ 450)\nMolotov cocktail ($ 450)", "Избери", "Откажи");
                    case 2: ShowPlayerDialog(playerid, 28, 2, "Pistols ($ 150)", "9mm Pistol ($ 150)\nSilenced pistol ($ 150)\nDesert eagle ($ 150)", "Избери", "Откажи");
                    case 3: ShowPlayerDialog(playerid, 29, 2, "Shotguns ($ 700)", "Shotgun ($ 700)\nSawn-off shotgun ($ 700)\nCombat shotgun ($ 700)", "Избери", "Откажи");
                    case 4: ShowPlayerDialog(playerid, 30, 2, "Sub-machine guns ($ 300)", "Micro Uzi ($ 300)\nMP5 ($ 300)\nTEC9 ($ 300)", "Избери", "Откажи");
                    case 5: ShowPlayerDialog(playerid, 31, 2, "Rifles ($ 500)", "AK47 ($ 500)\nM4 ($ 500)\nCountry rifle ($ 500)\nSniper rifle ($ 500)", "Избери", "Откажи");
                    case 6: ShowPlayerDialog(playerid, 32, 2, "Hand held ($ 100)", "Spray can ($ 100)\nFire extinguisher ($ 100)\nCamera ($ 100)", "Избери", "Откажи");
                    case 7: ShowPlayerDialog(playerid, 33, 2, "Apparel ($ 100)", "Night vision ($ 100)\nThermal goggles ($ 100)\nParachute ($ 100)", "Избери", "Откажи");
                    case 8: ShowPlayerDialog(playerid, 34, 2, "Special ($ 250)", "Satchel charges ($ 250)\nDetonator ($ 250)", "Избери", "Откажи");
                }
            }
            case 26:
            {
                new weapons[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
                GivePlayerMoney(playerid, -50);
                SendClientMessage(playerid, COLOR_YELLOW, "BLALBLALBLALBLQALBPALBLALBLA");
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 27:
            {
                new weapons[] = {16,17,18};
                GivePlayerMoney(playerid, -450);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 28:
            {
                new weapons[] = {22,23,24};
                GivePlayerMoney(playerid, -150);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 29:
            {
                new weapons[] = {25,26,27};
                GivePlayerMoney(playerid, -700);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 30:
            {
                new weapons[] = {28,29,32};
                GivePlayerMoney(playerid, -300);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 31:
            {
                new weapons[] = {30,31,33,34};
                GivePlayerMoney(playerid, -500);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 32:
            {
                new weapons[] = {41,42,43,44};
                GivePlayerMoney(playerid, -100);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 33:
            {
                new weapons[] = {44,45,46};
                GivePlayerMoney(playerid, -100);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 34:
            {
                new weapons[] = {39,40};
                GivePlayerMoney(playerid, -250);
                return GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
        }
    }
}
pawn Код:
if(dialogid == DIALOG_WEAPONS) {
    if(response == 1)
    {
        switch(dialogid)
        {
            case 25:
            {
                switch(listitem)
                {
                    case 0: ShowPlayerDialog(playerid, 26, 2, "Melee ($ 50)", "Brass knuckles ($ 50)\nGolf club ($ 50)\nNite stick ($ 50)\nKnife ($ 50)\nBaseball bat ($ 50)\nShovel ($ 50)\nPool cue ($ 50)\nKatana ($ 50)\nChainsaw ($ 50)\nPurple dildo ($ 50)\nShort dildo ($ 50)\nLong vibrator ($ 50)\nLong vibrator ($ 50)\nFlowers ($ 50)\nCane ($ 50)", "Избери", "Откажи");
                    case 1: ShowPlayerDialog(playerid, 27, 2, "Thrown ($ 450)", "Grenades ($ 450)\nTear Gas ($ 450)\nMolotov cocktail ($ 450)", "Избери", "Откажи");
                    case 2: ShowPlayerDialog(playerid, 28, 2, "Pistols ($ 150)", "9mm Pistol ($ 150)\nSilenced pistol ($ 150)\nDesert eagle ($ 150)", "Избери", "Откажи");
                    case 3: ShowPlayerDialog(playerid, 29, 2, "Shotguns ($ 700)", "Shotgun ($ 700)\nSawn-off shotgun ($ 700)\nCombat shotgun ($ 700)", "Избери", "Откажи");
                    case 4: ShowPlayerDialog(playerid, 30, 2, "Sub-machine guns ($ 300)", "Micro Uzi ($ 300)\nMP5 ($ 300)\nTEC9 ($ 300)", "Избери", "Откажи");
                    case 5: ShowPlayerDialog(playerid, 31, 2, "Rifles ($ 500)", "AK47 ($ 500)\nM4 ($ 500)\nCountry rifle ($ 500)\nSniper rifle ($ 500)", "Избери", "Откажи");
                    case 6: ShowPlayerDialog(playerid, 32, 2, "Hand held ($ 100)", "Spray can ($ 100)\nFire extinguisher ($ 100)\nCamera ($ 100)", "Избери", "Откажи");
                    case 7: ShowPlayerDialog(playerid, 33, 2, "Apparel ($ 100)", "Night vision ($ 100)\nThermal goggles ($ 100)\nParachute ($ 100)", "Избери", "Откажи");
                    case 8: ShowPlayerDialog(playerid, 34, 2, "Special ($ 250)", "Satchel charges ($ 250)\nDetonator ($ 250)", "Избери", "Откажи");
                }
            }
            case 26:
            {
                new weapons[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
                GivePlayerMoney(playerid, -50);
                SendClientMessage(playerid, COLOR_YELLOW, "BLALBLALBLALBLQALBPALBLALBLA");
                GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 27:
            {
                new weapons[] = {16,17,18};
                GivePlayerMoney(playerid, -450);
                GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 28:
            {
                new weapons[] = {22,23,24};
                GivePlayerMoney(playerid, -150);
                GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 29:
            {
                new weapons[] = {25,26,27};
                GivePlayerMoney(playerid, -700);
                GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 30:
            {
                new weapons[] = {28,29,32};
                GivePlayerMoney(playerid, -300);
                GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 31:
            {
                new weapons[] = {30,31,33,34};
                GivePlayerMoney(playerid, -500);
                GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 32:
            {
                new weapons[] = {41,42,43,44};
                GivePlayerMoney(playerid, -100);
                GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 33:
            {
                new weapons[] = {44,45,46};
                GivePlayerMoney(playerid, -100);
                GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
            case 34:
            {
                new weapons[] = {39,40};
                GivePlayerMoney(playerid, -250);
                GivePlayerWeapon(playerid, weapons[listitem], 15000);
            }
        }
    }
}
try this
Reply
#4

It doesn't work again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)