A little help with dialog [+Rep]
#6

pawn Код:
case DIALOG_CLASS_2:
        {
            if(response)
            {
                if(pInfo[playerid][SkinChanges] >= 1)
                {
                    switch(listitem)
                    {
                        case 0: if(pInfo[playerid][pXP] >= 0) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = CIVILIAN,setClass(playerid); else { SendXPError(playerid,0); }
                        case 1: if(pInfo[playerid][pXP] >= 500) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = POLICEMAN,setClass(playerid); else { SendXPError(playerid,500); }
                        case 2: if(pInfo[playerid][pXP] >= 1000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = MEDIC,setClass(playerid); else { SendXPError(playerid,1000); }
                        case 3: if(pInfo[playerid][pXP] >= 1500) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SCOUT,setClass(playerid); else { SendXPError(playerid,1500); }
                        case 4: if(pInfo[playerid][pXP] >= 5000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = HEAVYMEDIC,setClass(playerid); else { SendXPError(playerid,5000); }
                        case 5: if(pInfo[playerid][pXP] >= 6000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = FARMER,setClass(playerid); else { SendXPError(playerid,6000); }
                        case 6: if(pInfo[playerid][pXP] >= 6500) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SOLDIER,setClass(playerid); else { SendXPError(playerid,6500); }
                        case 7: if(pInfo[playerid][pXP] >= 7500) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = ENGINEER,setClass(playerid); else { SendXPError(playerid,7500); }
                        case 8: if(pInfo[playerid][pXP] >= 15000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SWAT,setClass(playerid); else { SendXPError(playerid,10000); }
                        case 9: if(pInfo[playerid][pXP] >= 20000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = HEAVYSHOTGUN,setClass(playerid); else { SendXPError(playerid,20000); }
                        case 10: if(pInfo[playerid][pXP] >= 25000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = ADVANCEDMEDIC,setClass(playerid); else { SendXPError(playerid,25000); }
                        case 11: if(pInfo[playerid][pXP] >= 30000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = ADVANCEDENGINEER,setClass(playerid); else { SendXPError(playerid,30000); }
                        case 12: if(pInfo[playerid][pXP] >= 35000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = E_ENGINEER,setClass(playerid); else { SendXPError(playerid,35000); }
                        case 13: if(pInfo[playerid][pXP] >= 50000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = FEDERALAGENT,setClass(playerid); else { SendXPError(playerid,50000); }
                        case 14: if(pInfo[playerid][pXP] >= 100000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = ADVANCEDSCOUT,setClass(playerid); else { SendXPError(playerid,100000); }
                        case 15: if(pInfo[playerid][pXP] >= 400000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = KICKBACK,setClass(playerid); else { SendXPError(playerid,400000); }
                        case 16: if(pInfo[playerid][pRank] >= 22) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = DOCTOR,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need to be rank 22+ to use this"); }
                        case 17: if(pInfo[playerid][pXP] >= 15000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = PIMP,setClass(playerid); else { SendXPError(playerid,15000); }
                        case 18: if(pInfo[playerid][pXP] >= 75000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = WEAPONSDEALER,setClass(playerid); else { SendXPError(playerid,75000); }
                        case 19: if(pInfo[playerid][pXP] >= 300000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = ASSASSIN,setClass(playerid); else { SendXPError(playerid,300000); }
                        case 20: if(pInfo[playerid][pXP] >= 250000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = COWBOY,setClass(playerid); else { SendXPError(playerid,250000); }
                        case 21: if(pInfo[playerid][pXP] >= 200000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = TRAPMASTER,setClass(playerid); else { SendXPError(playerid,200000); }
                        case 22: if(pInfo[playerid][pXP] >= 200000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = FBI,setClass(playerid); else { SendXPError(playerid,200000); }
                        case 23: if(pInfo[playerid][pXP] >= 300000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SCIENTIST,setClass(playerid); else { SendXPError(playerid,300000); }
                        case 24: if(pInfo[playerid][pXP] >= 450000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SHOTGUNSPECIAL,setClass(playerid); else { SendXPError(playerid,450000); }
                        case 25: if(pInfo[playerid][pXP] >= 1000000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = EXPERIENCEDSCOUT,setClass(playerid); else { SendXPError(playerid,1000000); }
                        case 26: if(pInfo[playerid][pRank] >= 30) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = SMOKEUP,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need to be rank 30+ to use this"); }
                        case 27: if(pInfo[playerid][pRank] >= 31) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = BOXER,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need to be rank 31+ to use this"); }
                        case 28: if(pInfo[playerid][pXP] >= 450000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = BOMBER,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 450000 xp to use this class!"); }
                        case 29: if(pInfo[playerid][pXP] >= 500000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = MASTER,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 500000 xp to use this class!"); }
                        case 30: if(pInfo[playerid][pXP] >= 600000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = GHOST,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 600000 xp to use this class!"); }
                        case 31: if(pInfo[playerid][pXP] >= 150000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = BUDDY,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 150000 xp to use this class!"); }
                        case 32: if(pInfo[playerid][pXP] >= 800000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = AKICK,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 800000 xp to use this class!"); }
                        case 33: if(pInfo[playerid][pXP] >= 900000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = TECG,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need 900000 xp to use this class!"); }
                        case 34: if(pInfo[playerid][pRank] >= 27) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][SkinChanges] -= 1,pInfo[playerid][pHumanClass] = BULL,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need to be rank 27+ to use this class!"); }
                    }
                }
                else return SendClientMessage(playerid,-1,""chat""COL_RED" You ran out of skin changes mate! What do you think you are? Shape Shifter?");
            }
        }
You must keep the else, Because you already have if.
Reply


Messages In This Thread
A little help with dialog [+Rep] - by arlindi - 03.08.2014, 15:03
Re: A little help with dialog [+Rep] - by arlindi - 03.08.2014, 15:18
Re: A little help with dialog [+Rep] - by arlindi - 03.08.2014, 15:37
Re: A little help with dialog [+Rep] - by ronyx69 - 03.08.2014, 15:50
Re: A little help with dialog [+Rep] - by arlindi - 03.08.2014, 16:11
Re: A little help with dialog [+Rep] - by Clad - 03.08.2014, 16:18
Re: A little help with dialog [+Rep] - by arlindi - 03.08.2014, 16:20
Re: A little help with dialog [+Rep] - by ViniBorn - 03.08.2014, 16:24
Re: A little help with dialog [+Rep] - by arlindi - 03.08.2014, 16:28
Re: A little help with dialog [+Rep] - by arlindi - 03.08.2014, 16:46

Forum Jump:


Users browsing this thread: 2 Guest(s)