Make team
#1

i make a new gamemode and i want to make teams how do to tams?
Reply
#2

well i will give u an example :

if u did the "AddPlayerClass"

example :
AddPlayerClass(285,1933.3503,-2240.3979,13.5469,179.9292,0,0,0,0,0,0); // 0
AddPlayerClass(287,1593.0541,1449.8979,10.8298,72. 7448,0,0,0,0,0,0);// 1

so top of the script :

Код:
#define TEAM_MAFIA 0
#define TEAM_GANG 1
new gTeam[MAX_PLAYERS];
Код:
OnPlayerRequestClass(playerid ,classid)
{
switch (classid)
	{
		case 0:
		{
			GameTextForPlayer(playerid, "~g~Los Santos", 1000, 3);
			SetPlayerColor(playerid,COLOR_GREEN);
			gTeam[playerid] = TEAM_LS;
		}
		case 1:
		{
			GameTextForPlayer(playerid, "~Y~Las Venturas", 1000, 3);
			SetPlayerColor(playerid,COLOR_YELLOW);
			gTeam[playerid] = TEAM_LV;
		}
}
	return 1;

}
________
Indian cooking
Reply
#3

why i have to use new gTeam[MAX_PLAYERS];??
Reply
#4

You don't, it's also possible to use 'SetPlayerTeam' (https://sampwiki.blast.hk/wiki/SetPlayerTeam)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)