Need help in /switchclass
#9

Below your includes:
pawn Код:
new ClassSelected[playerid];
under OnPlayerConnect callback:
pawn Код:
ClassSelected[playerid] = 0;
The command:
pawn Код:
CMD:resetclass(playerid, params[])
{
    ClassSelected[playerid] = 0;
    SendClientMessage(playerid, C_LBLUE, "Class selection when you spawn!");
    return 1;
}
under OnPlayerSpawn callback:

pawn Код:
if(ClassSelected[playerid] == 0)
{
    ClassSelected[playerid] = 1;
    ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2) \nMedic Class  (Need Rank 3)  \nEngineer Class  (Need Rank 4) \nMercenary Class  (Need Rank 5 )  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8) ", "Choose","");;
}
E:// Sorry, I misunderstood. If you want the player to respawn at his base after that, then just use SpawnPlayer(playerid); Although I wouldn't use it, because it would get abused (teleporting away when low HP).
Reply


Messages In This Thread
Need help in /switchclass - by iOmar - 16.08.2012, 20:19
Re: Need help in /switchclass - by Sandiel - 16.08.2012, 20:28
Re: Need help in /switchclass - by iOmar - 16.08.2012, 23:13
Re: Need help in /switchclass - by CROSS_Hunter - 16.08.2012, 23:58
Re: Need help in /switchclass - by iOmar - 17.08.2012, 01:15
Re: Need help in /switchclass - by CROSS_Hunter - 17.08.2012, 01:28
Re: Need help in /switchclass - by iOmar - 17.08.2012, 07:15
Re: Need help in /switchclass - by iOmar - 17.08.2012, 07:25
Re: Need help in /switchclass - by Dan. - 17.08.2012, 08:50
Re: Need help in /switchclass - by iOmar - 17.08.2012, 09:58

Forum Jump:


Users browsing this thread: 1 Guest(s)