SA-MP Forums Archive
OnPlayerRequestSpawn, some helps - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerRequestSpawn, some helps (/showthread.php?tid=490700)



OnPlayerRequestSpawn, some helps - ReD_HunTeR - 27.01.2014

Код:
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?


Re: OnPlayerRequestSpawn, some helps - amirab - 27.01.2014

classid is not defined in OnPlayerRequestSpawn


Re: OnPlayerRequestSpawn, some helps - ReD_HunTeR - 27.01.2014

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