3d textdraw help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3d textdraw help (
/showthread.php?tid=660109)
3d textdraw help -
lemonnade - 25.10.2018
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
Re: 3d textdraw help -
Shaun8 - 25.10.2018
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
Re: 3d textdraw help -
lemonnade - 25.10.2018
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
Re: 3d textdraw help -
KinderClans - 25.10.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.
Re: 3d textdraw help -
lemonnade - 25.10.2018
THANKS REP+