06.08.2012, 12:33
This is easier.
Код:
new Text3D:teamlabel[MAX_PLAYERS]; new TeamNames[][]= { "Team 1", "Team 2", "Team 3"//the last one must not have a comma "," }; public OnGameModeInit() { for(new i = 0; i < MAX_PLAYERS; i++) { teamlabel[i]=Create3DTextLabel("TeamLabel",0x008080FF,30.0,40.0,50.0,40.0, 0); } return 1; } public OnPlayerConnect(playerid) { Update3DTextLabelText(teamlabel[playerid], 0x008080FF, " ");//making it invisible return 1; } public OnPlayerSpawn(playerid) { new string[60]; format(string,60,"%s",TeamNames[gClass[playerid]]); Update3DTextLabelText(teamlabel[playerid], 0x008080FF, string); Attach3DTextLabelToPlayer(teamlabel[playerid], playerid, 0.0, 0.0, 0.6); return 1; } public OnPlayerDeath(playerid....) { Update3DTextLabelText(teamlabel[playerid], 0x008080FF, " ");//making it invisible return 1; }