29.11.2011, 17:14
I'd suggest PVars.
You can define your teams like
then you can use this for setting teams
and for checking team
I prefer PVars to normal variables because the ease of use (no need to define them) and they can also be reached from filterscripts + they are reseted automatically on disconnect, just what we want in this case. But this is just one example, there are many many ways of setting teams.
You can define your teams like
Код:
#define TEAM_X 0 #define TEAM_Y 1 #define TEAM_Z 2
Код:
SetPVarInt(playerid, "team", TEAM_X);
Код:
if(GetPVarInt(playerid, "team") == TEAM_X)