Make team - 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: Make team (
/showthread.php?tid=128327)
Make team -
whitedragon - 17.02.2010
i make a new gamemode and i want to make teams how do to tams?
Re: Make team -
aircombat - 17.02.2010
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
Re: Make team -
whitedragon - 17.02.2010
why i have to use new gTeam[MAX_PLAYERS];??
Re: Make team -
VonLeeuwen - 17.02.2010
You don't, it's also possible to use 'SetPlayerTeam' (
https://sampwiki.blast.hk/wiki/SetPlayerTeam)