TeamBallance
#1

Hello!
Is there any way to put a restriction of maximum 5 members / team in this command? This is the only way to join a team.I don't have OnPlayerRequestClass...so...

Код:
CMD:join( playerid, params[ ] )
{
	if(GetPlayerTeam(playerid) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid,15.0,1394.8756,1185.4381,10.8203))//SouthBoys
		{
			SetPlayerTeam(playerid, 1);
			SCM(playerid,COLOR_SOUTHBOYS,"You are now a SouthBoy.");
			SetPlayerSkin(playerid,SouthBoysSkins[random(6)]);
			SetPVarInt(playerid,"Skin",SouthBoysSkins[random(6)]);
			SpawnPlayer(playerid);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 15.0,2159.3467,943.1246,10.8203))//Yakoo
		{
			SetPlayerTeam(playerid, 2);
			SCM(playerid,COLOR_YAKOO,"You are now a Yakoo.");
			SetPlayerSkin(playerid,YakooSkins[random(3)]);
			SetPVarInt(playerid,"Skin",YakooSkins[random(3)]);
			SpawnPlayer(playerid);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 15.0,1656.0500,1733.3713,10.8281))//Triads
		{
			SetPlayerTeam(playerid, 3);
			SCM(playerid,COLOR_TRIADS,"You are now a Triad.");
			SetPlayerSkin(playerid,TheTriadsSkins[random(3)]);
			SetPVarInt(playerid,"Skin",TheTriadsSkins[random(3)]);
			SpawnPlayer(playerid);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 15.0,2166.2202,1987.4426,10.8203))//Mafia
		{
			SetPlayerTeam(playerid, 4);
			SCM(playerid,COLOR_MAFIA,"You are now a Mafia Member.");
			SetPlayerSkin(playerid,MafiaSkins[random(7)]);
			SetPVarInt(playerid,"Skin",MafiaSkins[random(7)]);
			SpawnPlayer(playerid);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 15.0,1615.4381,2281.0146,10.8125))//Vagos
		{
			SetPlayerTeam(playerid, 5);
			SCM(playerid,COLOR_VAGOS,"You are now a Vagos.");
			SetPlayerSkin(playerid,VagosSkins[random(3)]);
			SetPVarInt(playerid,"Skin",VagosSkins[random(3)]);
			SpawnPlayer(playerid);
		}
		else if(IsPlayerInRangeOfPoint(playerid, 15.0,2340.3755,2457.7373,14.9688))//Cops
		{
			SetPlayerTeam(playerid, 6);
			SCM(playerid,COLOR_COPS,"You are now a Cop.");
			SetPlayerSkin(playerid,CopsSkins[random(12)]);
			SetPVarInt(playerid,"Skin",CopsSkins[random(12)]);
			SpawnPlayer(playerid);
			TogglePlayerControllable(playerid,0);
			SetTimer("StopAnim",500,false);
		}
	}
	else
	{
	    SCM(playerid,COLOR_DGREY,"You must be a Civillian if you want to join this Team.");
	}
	return 1;
}
Reply
#2

bump?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)