03.01.2016, 16:20
bits from my script - create a new label for each player
Attach label to player at the spawn (use some kind of variable to do it only once)
And update it every time it's needed.
And don't forget to destroy the label when player is leaving the server.
Код:
new PlayerText3D:PlayerLabel[SLOTS];
Код:
PlayerLabel[playerid] = Create3DTextLabel("Player's Label", 0xFFFFFFFF, x, y, z, drawdistance, vw, testlos); Attach3DTextLabelToPlayer(PlayerLabel[playerid], playerid, x, y, z); UpdatePlayerLabel(playerid); //custom function
Код:
//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);