16.06.2012, 00:54
Edit OnPlayerSpawn like this.
pawn Код:
public OnPlayerSpawn(playerid)
{
if( gPlayerFirstSpwn{playerid} )
{
gPlayerFirstSpwn{playerid} = false;
ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class (Need No Rank) \nSniper Class (Need Rank 2) \nEngineer Class (Need Rank 3) \nJet-Trooper Class (Need Rank 5) \nPilot Class (Need Rank 7) ", "Choose","");
TogglePlayerControllable(playerid, 0);
}
else
{
ResetPlayerWeapons( playerid );
switch(gPlayerClass[playerid])
{
case ASSAULT:
{
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 27, 400);
GivePlayerWeapon(playerid, 24, 300);
GivePlayerWeapon(playerid, 31, 600);
}
//rest of classes
}
}
SetPlayerVirtualWorld(playerid, 0);
return 1;
}