3d textdraw help
#1

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
Reply
#2

https://sampwiki.blast.hk/wiki/ShowNameTags
Use ShowNameTags(0); in Gamemodeinit.

Then make 3d Texts with Create3DTextLabel and Attach to players with Attach3DTextLabelToPlayer
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
Reply
#3

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
Reply
#4

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

THANKS REP+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)