Help with Class Sytem
#1

I did this:
pawn Код:
public OnDialogsResponse(playerid, dialogid, response, listitem, inputtext[])
{
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;
        }
return 1;
}
But when i spawn my player freeze and do not Move. But it show dialogue. And it is giving warning
pawn Код:
D:\UDC Wars\gamemodes\Wars.pwn(1402) : warning 235: public function lacks forward declaration (symbol "OnDialogsResponse")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Please How to do it great. Because i need class system for my server...
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)