04.11.2010, 00:33
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.
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); } }