17.08.2012, 08:50
Below your includes:
under OnPlayerConnect callback:
The command:
under OnPlayerSpawn callback:
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).
pawn Код:
new ClassSelected[playerid];
pawn Код:
ClassSelected[playerid] = 0;
pawn Код:
CMD:resetclass(playerid, params[])
{
ClassSelected[playerid] = 0;
SendClientMessage(playerid, C_LBLUE, "Class selection when you spawn!");
return 1;
}
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","");;
}