How to make 3PlayerTextLabel NameTag System
#2

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.
Reply


Messages In This Thread
How to make 3PlayerTextLabel NameTag System - by Barnwell - 03.01.2016, 15:58
Re: How to make 3PlayerTextLabel NameTag System - by lucamsx - 03.01.2016, 16:20
Re: How to make 3PlayerTextLabel NameTag System - by Barnwell - 03.01.2016, 16:22
Re: How to make 3PlayerTextLabel NameTag System - by lucamsx - 03.01.2016, 16:25
Re: How to make 3PlayerTextLabel NameTag System - by HarrisonC - 03.01.2016, 17:10

Forum Jump:


Users browsing this thread: 1 Guest(s)