25.07.2009, 00:36
Hey there, here is a good idea for doing what you are trying to:
At the top of the file
Inside the middle
When a player dies, this will tell a player that they have been switched to whatever team opposite from their current team, and set their name color to the team color. Pretty basic system, but its what you wanted! Good Luck!
At the top of the file
Код:
#define TEAM_RED 0xFF0000AA #define TEAM_BLUE 0x375FFFFF new gTeam[MAX_PLAYERS];
Код:
OnPlayerDeath(playerid, killerid, reason) { if(gTeam[playerid] == TEAM_RED) { gTeam[playerid] = TEAM_BLUE; SetPlayerColor(playerid, TEAM_BLUE); GameTextForPlayer(playerid, "~w~You have been switched to team~n~~b~Blue",2500,6); } else if(gTeam[playerid] == TEAM_BLUE) { gTeam[playerid] = TEAM_RED; SetPlayerColor(playerid, TEAM_RED); GameTextForPlayer(playerid, "~w~You have been switched to team~n~~r~Red",2500,6); } }