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
#2

classid is not defined in OnPlayerRequestSpawn
Reply
#3

but i need one help if some use classid 6 or 7 and they cant be allowed to use them, can someone help me with i, ill rep him
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)