bits from my script - create a new label for each player
Код:
new PlayerText3D:PlayerLabel[SLOTS];
Attach label to player at the spawn (use some kind of variable to do it only once)
Код:
PlayerLabel[playerid] = Create3DTextLabel("Player's Label", 0xFFFFFFFF, x, y, z, drawdistance, vw, testlos);
Attach3DTextLabelToPlayer(PlayerLabel[playerid], playerid, x, y, z);
UpdatePlayerLabel(playerid); //custom function
And update it every time it's needed.
Код:
//UpdatePlayerLabel
GetPlayerHealth(playerid, pHealth);
GetPlayerArmour(playerid, pArmour);
format(stc,sizeof(stc),"\n\n\n{BFBFBF}%s\n{FFFFFF}%.0f hp, %.0f armour", RemoveUnderScore(playerid), pHealth, pArmour);
Update3DTextLabelText(PlayerLabel[playerid], 0xFFFFFFFF, stc);
And don't forget to destroy the label when player is leaving the server.