27.08.2011, 21:27
pawn Code:
public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pSClass] == 0) //player doesnt have a class
{
ShowPlayerDialog(playerid,DIALOG_CLASS,DIALOG_STYLE_LIST,"Class Selection","Assualt\nSniper\nSpy\nPilot\n","Select"," ");
}
//player has a class, checking which one is it
else if(PlayerInfo[playerid][pClass] == 1)
{
SendClientMessage(playerid,COLOR_YELLOW,"Your Have The Assualt Class!");
SendClientMessage(playerid,COLOR_RED,"Note* You Can Change Your Class By Type /ClassSelection");
SendClientMessage(playerid,COLOR_LIMEGREEN,"Kill Anyone That Is NOT On Your Team!");
GivePlayerWeapon(playerid,31,500);
GivePlayerWeapon(playerid,29,500);
GivePlayerWeapon(playerid,25,250);
}
else if(PlayerInfo[playerid][pClass] == 2)
{
SendClientMessage(playerid,COLOR_YELLOW,"Your Have Selected Sniper Class!");
SendClientMessage(playerid,COLOR_RED,"Note* You Can Change Your Class By Type /ClassSelection");
SendClientMessage(playerid,COLOR_LIMEGREEN,"Kill Anyone That Is NOT On Your Team!");
GivePlayerWeapon(playerid,34,500);
GivePlayerWeapon(playerid,29,500);
GivePlayerWeapon(playerid,25,250);
}
else if(PlayerInfo[playerid][pClass] == 3)
{
SendClientMessage(playerid,COLOR_YELLOW,"Your Have Selected Spy Class!");
SendClientMessage(playerid,COLOR_RED,"Note* You Can Change Your Class By Type /ClassSelection");
SendClientMessage(playerid,COLOR_LIMEGREEN,"Kill Anyone That Is NOT On Your Team!");
GivePlayerWeapon(playerid,31,500);
GivePlayerWeapon(playerid,29,500);
GivePlayerWeapon(playerid,23,250);
}
else if(PlayerInfo[playerid][pClass] == 1)
{
SendClientMessage(playerid,COLOR_YELLOW,"Your Have Selected Pilot Class!");
SendClientMessage(playerid,COLOR_RED,"Note* You Can Change Your Class By Type /ClassSelection");
SendClientMessage(playerid,COLOR_LIMEGREEN,"Kill Anyone That Is NOT On Your Team!");
GivePlayerWeapon(playerid,31,500);
GivePlayerWeapon(playerid,29,500);
GivePlayerWeapon(playerid,22,250);
}
return 1;
}