Help with a switch dialog
#1

I want a arms dealer job whereby when you make 50 weapons you level up how could i do it so its saves as a jobskill thing here my code.

PHP код:
command(creategunplayeridparams[])
{
        if(
Jobs[Player[playerid][Job]][JobType] == 1)
        {
    if(
Player[playerid][PrisonDuration] >= || Player[playerid][Cuffed] >= || Player[playerid][Tazed] >= 1)
        {
            
SendClientMessage(playeridWHITE"You cannot do this right now.");
        }
        else
        {
                switch(
                {
                    case 
.. 49ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)","Select""Cancel");
                    case 
50 .. 99ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm pistol (250)","Select""Cancel");
                    case 
100 .. 149ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)","Select""Cancel");
                    case 
150 .. 199ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)","Select""Cancel");
                    case 
200 .. 249ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)","Select""Cancel");
                    case 
250 .. 299ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)","Select""Cancel");
                    case 
300 .. 349ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)","Select""Cancel");
                    case 
350 .. 399ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)","Select""Cancel");
                    case 
400 .. 449ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)\nM4A1 (2000)","Select""Cancel");
                    case 
450 .. 499ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)\nM4A1 (2000)\nSniper (2450)","Select""Cancel");
                    default: 
ShowPlayerDialog(playeridDIALOG_CREATEGUNDIALOG_STYLE_LIST"Weapon Selection""Katana (30)\nCane (30)\nPool Cue (33)\nBaseball Bat (35)\nShovel (50)\n9mm Pistol (250)\nSilenced Pistol (300)\nShotgun (550)\nDesert Eagle (680)\nMP5 (850)\nMicro Uzi (900)\nAK-47 (1500)\nM4A1 (2000)\nSniper (2450)\nSPAS12 (2550)\nKevlar Vest (1750)","Select""Cancel");
                }
            }
            else 
SendClientMessage(playeridCOLOR_GREY"You must wait your reload time (30 seconds).");
        }
        else 
SendClientMessage(playeridCOLOR_GREY"You can't do this while cuffed, tazed, or frozen.");
    }
    return 
1;

Reply


Messages In This Thread
Help with a switch dialog - by arko123 - 13.10.2012, 20:51
Re: Help with a switch dialog - by _Shade. - 14.10.2012, 08:57
Re: Help with a switch dialog - by arko123 - 14.10.2012, 09:09
Re: Help with a switch dialog - by cosbraa - 14.10.2012, 13:41
Re: Help with a switch dialog - by arko123 - 14.10.2012, 13:44
Re: Help with a switch dialog - by RedFusion - 14.10.2012, 18:34
Re: Help with a switch dialog - by arko123 - 14.10.2012, 18:42
AW: Help with a switch dialog - by Johndaonee - 14.10.2012, 19:13
Re: AW: Help with a switch dialog - by arko123 - 14.10.2012, 19:24

Forum Jump:


Users browsing this thread: 2 Guest(s)