Posts: 6
Threads: 3
Joined: Jun 2017
i want like this 3dtextdraw only the playername show and the healthbar was hidden
anyone help me?
PS: Sorry for bad english
https://imgur.com/a/V9znCmt
Posts: 6
Threads: 3
Joined: Jun 2017
i'm beginner in scripting
new Text3D:label = Create3DTextLabel("Hello, I am new here!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
can you set that as to show a player name and the player id?
getplayernamex
Posts: 716
Threads: 92
Joined: May 2018
pawn Код:
public OnGameModeInit()
{
ShowNameTags(0);
}
pawn Код:
new Text3D:NameLabel[MAX_PLAYERS];
OnPlayerConnect:
pawn Код:
NameLabel[playerid] = CreateDynamic3DTextLabel("_", 0xFFFFFFFF, 0.0, 0.0, 0.1, 20, .attachedplayer = playerid, .testlos = 1);
OnPlayerDisconnect:
pawn Код:
if(IsValidDynamic3DTextLabel(NameLabel[playerid])) DestroyDynamic3DTextLabel(NameLabel[playerid]);
OnPlayerSpawn:
pawn Код:
new info[70], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(info, sizeof(info), "%s (%d)", pName, playerid);
UpdateDynamic3DTextLabelText(NameLabel[playerid], 0xFFFFFFFF, info);
*Consider using Attach3DTextLabelToPlayer instead of UpdateDynamic3DTextLabelText, just edit it as you wish.
Posts: 6
Threads: 3
Joined: Jun 2017