06-02-2008, 11:54 AM
You havn't defined your teams as anything. You should define them as a number! Also, to make it much easier, providing your team starts with team id 0, and your classes are in the correct order:
Also note that your doing it under the wrong callback, OnPlayerRequestSpawn dosn't have classid parameters.
Code:
public OnPlayerRequestClass(playerid)
{
SetPlayerTeam(playerid,classid);
gTeam[playerid] = classid; //Providing your teams are in the right order according with the skins and start on 0, this will set your class to the team automatically.
return true;
}
Also note that your doing it under the wrong callback, OnPlayerRequestSpawn dosn't have classid parameters.