Teams problem.
#1

Hi, I've got this teams FS from a website and I've made it too what I need.
The problem with it is when I go into my server too make sure the name colors are right Team Police and Team Trucker both have the default SAMP orange, I don't think it's putting them into their teams.

TEAM_TRUCKER = Yellow
TEAM_POLICE = Blue

Thanks for your help, please give me a solution.

Код:
#include <a_samp>
#define TEAM_TRUCKER 1
#define TEAM_POLICE 2
#define TEAM_TRUCKER_COLOUR 0xFFFF00AA // Yellow
#define TEAM_POLICE_COLOUR 0x0000BBAA // Blue
new gTeam[MAX_PLAYERS];

main()
{
    print("\n----------------------------------");
    print(" Teams");
    print("----------------------------------\n");
}

public OnGameModeInit()
{
    AddPlayerClass(16,-1542.9456,-2742.9224,48.5385,70.0556,0,0,0,0,0,0); // TEAM_TRUCKER 1
	AddPlayerClass(283,-2167.1899,-2382.9033,30.6172,142.7763,0,0,0,0,0,0); // TEAM_POLICE 2
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerTeamFromClass(playerid, classid);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerToTeamColour(playerid);
    return 1;
}

SetPlayerTeamFromClass(playerid, classid)
{
    if(classid == 0)
    {
        gTeam[playerid] = TEAM_TRUCKER;
    }
    else if(classid == 0)
    {
        gTeam[playerid] = TEAM_POLICE;
    }

}

SetPlayerToTeamColour(playerid)
{
    if(gTeam[playerid] == TEAM_TRUCKER)
    {
        SetPlayerColor(playerid,TEAM_TRUCKER_COLOUR);
    }
    else if(gTeam[playerid] == TEAM_POLICE)
    {
        SetPlayerColor(playerid,TEAM_POLICE_COLOUR);
    }

}
Reply


Messages In This Thread
Teams problem. - by Welsh - 04.11.2010, 00:33
Re: Teams problem. - by cessil - 04.11.2010, 01:22
Re: Teams problem. - by Welsh - 04.11.2010, 10:39
Re: Teams problem. - by SampStunta - 04.11.2010, 13:04
Re: Teams problem. - by Welsh - 04.11.2010, 14:13
Re: Teams problem. - by OldDirtyBastard - 04.11.2010, 14:22
Re: Teams problem. - by Seven. - 04.11.2010, 15:24
Re: Teams problem. - by Welsh - 04.11.2010, 17:55
Re: Teams problem. - by DVDK - 04.11.2010, 18:12
Re: Teams problem. - by Tessar - 07.11.2010, 09:48

Forum Jump:


Users browsing this thread: 1 Guest(s)