Hi I need a full explain please?
#3

a team is nothing else than a collection of player classes, just look at the first parameter of AddPlayerClassEx
Quote:

AddPlayerClassEx(teamid, modelid, Float: spawn_x, Float: spawn_y, Float: spawn_z, Float: z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)

Before Set / GetPlayerTeam were introduced the teams were set in OnPlayerRequestClass by mapping the classids to teams
PHP код:
enum {
    
TEAM_BLUE,
    
TEAM_RED
}
new 
gTeam[MAX_PLAYEERS];
public 
OnPlayerRequestClass(playerid,classid)
{
    switch(
classid) {
        case 
0..2gTeam[playerid] = TEAM_BLUE;
        case 
3..7gTeam[playerid] = TEAM_RED;
    }
    return 
1;

Thats for static teams, dynamic teams like gangs or clans in freeroam modes get the teamid set in "join / accept" commands and at login
Reply


Messages In This Thread
Hi I need a full explain please? - by Man43 - 11.07.2018, 22:00
Re: Hi I need a full explain please? - by GangstaSunny. - 12.07.2018, 00:55
Re: Hi I need a full explain please? - by Nero_3D - 12.07.2018, 01:03

Forum Jump:


Users browsing this thread: 1 Guest(s)