08.09.2011, 19:00
pawn Code:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerTeamFromClass(playerid, classid);
}
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0) {
gTeam[playerid] = TEAM_WORKERS;
SetPlayerTeam(playerid,TEAM_WORKERS);//You can delete this line if you want to allow team killing...
GameTextForPlayer(playerid,"~g~Workers",10,0);
}
else if(classid == 1) {
gTeam[playerid] = TEAM_AGENTS;
SetPlayerTeam(playerid,TEAM_AGENTS);//Same for this!
GameTextForPlayer(playerid,"~r~Agents",10,0);
}
return 1;
}