OnPlayerRequestSpawn, some helps
#1

Код:
public OnPlayerRequestSpawn(playerid)
{
	new team1count = GetPlayersCountInTeam(TEAM_TERRORIST);
	new team2count = GetPlayersCountInTeam(TEAM_ARMY);
    if(GetPlayerTeam(playerid) == TEAM_TERRORIST)
	{
       if(team1count > team2count)
	   {
	      SendClientMessage(playerid, TEAM_TERRORIST_COLOR,"Terrorist team is full");
	      return 0;
	   }
	}
	if(GetPlayerTeam(playerid) == TEAM_ARMY)
	{
       if(team2count > team1count)
	   {
	      SendClientMessage(playerid, TEAM_ARMY_COLOR,"Army team is full");
	      return 0;
	   }
    }
	if(classid == 6)
	{
	   if(PlayerInfo[playerid][pMafia] == 0)
	   {
		  SendClientMessage(playerid, TEAM_TERRORIST_COLOR,"You need to be mafia member to use this class");
		  return 0;
	   }
	}
	if(classid == 7)
	{
	   if(PlayerInfo[playerid][pOptic] == 0)
	   {
		  SendClientMessage(playerid, TEAM_ARMY_COLOR,"You need to be optic member to use this class");
		  return 0;
	   }
	}
   	return 1;
}
i need help with classid its getting error, i know i cant use but, if is there a chance to do it?
Reply


Messages In This Thread
OnPlayerRequestSpawn, some helps - by ReD_HunTeR - 27.01.2014, 17:15
Re: OnPlayerRequestSpawn, some helps - by amirab - 27.01.2014, 17:48
Re: OnPlayerRequestSpawn, some helps - by ReD_HunTeR - 27.01.2014, 17:51

Forum Jump:


Users browsing this thread: 1 Guest(s)