SA-MP Forums Archive
Team deathmatch question. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Team deathmatch question. (/showthread.php?tid=122405)



Team deathmatch question. - [dN]Eagle - 21.01.2010

Hey, my first post here

I have a question, I want specific classes to be assigned to the correct team ( #define TEAM_LAW & #define TEAM_MAFIA )

I just followed the tutorial on wiki but it didn't helped me

Код:
// TEAM COLOR SET-UP
SetPlayerToTeamColor(playerid)
{
	if (gTeam[playerid] == TEAM_MAFIA)
	{
		SetPlayerColor(playerid, TEAM_MAFIA_COLOR);
	}
	else if (gTeam[playerid] == TEAM_LAW)
	{
		SetPlayerColor(playerid, TEAM_LAW_COLOR);
	}
}
// END OF TEAM COLOR SET-UP <---->

Код:
// TEAM SET-UP

SetPlayerTeamFromClass(playerid, classid)
{
	if (classid >= 112)
	{
		gTeam[playerid] = TEAM_MAFIA;
	}
	else
	{
		gTeam[playerid] = TEAM_LAW;
	}
}
// END OF TEAM SET-UP <---->
Код:
	
// MAFIA SKINS	<---->
	AddPlayerClass(126, 1958.3783, 1343.1572, 15.3746, 269.1425,0, 0, 0, 0, 0, 0); // Blue Jacket & Golden Necklace
	AddPlayerClass(127, 1958.3783, 1343.1572, 15.3746, 269.1425,0, 0, 0, 0, 0, 0); // Brown Jacket
	AddPlayerClass(112, 1958.3783, 1343.1572, 15.3746, 269.1425,0, 0, 0, 0, 0, 0); // Bald guy