Help with Class Sytem
#4

Delete the another OnDialogResponse then put this on your OnDialogResponse

Make sure you also copy/paste the code that the other OnDialogResponse have so incase you need it you just need to put it on your OnDialogResponse

pawn Код:
if(dialogid == 1)
{
    if(response)
    {
        if(GetPlayerScore(playerid) <= 0)//Private
        {
            SetPlayerSkin(playerid, 287);
            SendClientMessage(playerid, COLOR_BLUE, "You chose the assault as your class.");
            SendClientMessage(playerid, COLOR_BLUE, "You can type /switchclass to change your class again.");
            gPlayerClass[playerid] = ASSAULT_CLASS;
            PickedClass[playerid] = 1;
            SetPlayerVirtualWorld(playerid, 0);
            TogglePlayerControllable(playerid, 1);
            GivePlayerWeapon(playerid, 24, 200);
            GivePlayerWeapon(playerid, 31, 500);
            GivePlayerWeapon(playerid, 17, 5);
        }
    }
    if(listitem == 1)//sniper DONE
    {
        if(GetPlayerScore(playerid) <= 10)//Private
        {
            SetPlayerSkin(playerid, 122);
            SendClientMessage(playerid, COLOR_BLUE, "You chose the Sniper as your class.");
            SendClientMessage(playerid, COLOR_BLUE, "You can type /switchclass to change your class again.");
            gPlayerClass[playerid] = SNIPER_CLASS;
            PickedClass[playerid] = 1;
            SetPlayerVirtualWorld(playerid, 0);
            TogglePlayerControllable(playerid, 1);
            GivePlayerWeapon(playerid, 23, 500);
            GivePlayerWeapon(playerid, 34, 100);
            GivePlayerWeapon(playerid, 29, 200);
        }
        else
        {
                SendClientMessage(playerid, COLOR_RED, "You need to be atleast Private class [/rank to see yours]");
                TogglePlayerControllable(playerid, 0);
        }
    }
    if(listitem == 3)//Engineer
    {
        if(GetPlayerScore(playerid) <= 250)//Sergeant
        {
            SetPlayerSkin(playerid, 285);
            SendClientMessage(playerid, COLOR_BLUE, "You chose the Engineer as your class.");
            SendClientMessage(playerid, COLOR_BLUE, "You can type /switchclass to change your class again.");
            gPlayerClass[playerid] = ENGINEER_CLASS;
            PickedClass[playerid] = 1;
            SetPlayerVirtualWorld(playerid, 0);
            TogglePlayerControllable(playerid, 1);
            GivePlayerWeapon(playerid, 22, 100);
            GivePlayerWeapon(playerid, 32, 500);
            GivePlayerWeapon(playerid, 35, 5);
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "You need to be atleast Sergeant class [/rank to see yours]");
            TogglePlayerControllable(playerid, 0);
        }
    }
    if(listitem == 4)//FlameThrower
    {
        if(GetPlayerScore(playerid) <= 400)//CAPTAIN
        {
            SetPlayerSkin(playerid, 144);
            SendClientMessage(playerid, COLOR_BLUE, "You chose the Jet Trooper as your class.");
            SendClientMessage(playerid, COLOR_BLUE, "You can type /switchclass to change your class again.");
            gPlayerClass[playerid] = JETTROOPER_CLASS;
            PickedClass[playerid] = 1;
            SetPlayerVirtualWorld(playerid, 0);
            TogglePlayerControllable(playerid, 1);
            GivePlayerWeapon(playerid, 24, 200);
            GivePlayerWeapon(playerid, 30, 200);
            GivePlayerWeapon(playerid, 37, 200);
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "You need to be atleast Captain class [/rank to see yours]");
            TogglePlayerControllable(playerid, 0);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Help with Class Sytem - by iOmar - 03.05.2012, 07:29
Re: Help with Class Sytem - by JaKe Elite - 03.05.2012, 07:35
Re: Help with Class Sytem - by iOmar - 03.05.2012, 07:38
Re: Help with Class Sytem - by JaKe Elite - 03.05.2012, 07:45
Re: Help with Class Sytem - by iOmar - 03.05.2012, 07:53
Re: Help with Class Sytem - by Admigo - 03.05.2012, 08:08
Re: Help with Class Sytem - by iOmar - 03.05.2012, 08:15
Re: Help with Class Sytem - by JaKe Elite - 03.05.2012, 08:20
Re: Help with Class Sytem - by Admigo - 03.05.2012, 08:21
Re: Help with Class Sytem - by $$inSane - 03.05.2012, 10:19

Forum Jump:


Users browsing this thread: 1 Guest(s)