gTeam (+REP)
#2

You're using a really old system. Preferably, we got new systems and we can do it ANOTHER way these days.

Take an example from my GW:
pawn Код:
#define Groves 0
#define Ballas 1
#define Vagos  2
#define Aztecas 3

#define GrovesColor GREEN
#define BallasColor PURPLE
#define VagosColor  YELLOW
#define AztecasColor CYAN

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{ ///////// rest of my code is up //////////// 
    if(classid == 0)
    {
        GameTextForPlayer(playerid,"Grove Street Families",1000, 1);
        SetPlayerTeam(playerid, Groves);
        SetPlayerPos(playerid, 2450.0981,-1661.2932,27.2448);
        SetPlayerCameraPos(playerid, 2442.6885,-1660.7346,27.4131);
        SetPlayerCameraLookAt(playerid,  2450.0981,-1661.2932,27.2448);
    }
//// I don't use gTeam, Instead I simply use SetPlayerTeam! /////

Now when the players team is already decided, all you gotta do is under OnPlayerSpawn


pawn Код:
if(GetPlayerTeam(playerid) == Groves) /// If the player team is groves or if the case is groves:
    {
        SetPlayerRandomGroveSpawn(playerid); // Setting the random spawn (CUSTOM SCRIPT)
        SetPlayerColor(playerid, GrovesColor); /// Setting the color ///
    }

Once the team is decided, You can do whatever you want OnPlayerSpawn. You're making your code a lot more complicated than it is.
Reply


Messages In This Thread
gTeam (+REP) - by Barrack - 27.05.2012, 07:53
Re: gTeam (+REP) - by Gangs_Rocks - 27.05.2012, 07:59
Re: gTeam (+REP) - by Barrack - 27.05.2012, 08:04
Re: gTeam (+REP) - by Gangs_Rocks - 27.05.2012, 08:06
Re: gTeam (+REP) - by MP2 - 27.05.2012, 08:10
Re: gTeam (+REP) - by Barrack - 31.05.2012, 18:49
Re: gTeam (+REP) - by MadeMan - 31.05.2012, 19:30
Re: gTeam (+REP) - by Barrack - 31.05.2012, 19:41
Re: gTeam (+REP) - by MadeMan - 31.05.2012, 19:53
Re: gTeam (+REP) - by Barrack - 31.05.2012, 19:58

Forum Jump:


Users browsing this thread: 1 Guest(s)