Name Tags - 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: Name Tags (
/showthread.php?tid=553003)
Name Tags -
FaZeRs - 27.12.2014
So my name tags are fucked up. I removed default name tags, added 3D Text Label, but for some players it's duplicates. It doesnt removes after they disconect.
Code
PHP код:
public SafeLogin(playerid)
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
NameTag[playerid] = Create3DTextLabel(playername, 0xFFFFFFFF, 0, 0, 0, NAME_DRAWDISTANCE, 0, 1 );
Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, 0.2);
}
public OnPlayerDisconnect(playerid, reason)
{
Delete3DTextLabel(NameTag[playerid]);
}
And how can i set ID on ( ) after the name?
Re: Name Tags -
HY - 27.12.2014
Well, I think that has been happened because server have original tags for name and your name tag too.
Try to remove for first time tags from server with
ShowNameTags.
Re: Name Tags -
FaZeRs - 27.12.2014
I have already did this.
PHP код:
public OnGameModeInit()
{
SetNameTagDrawDistance(0.0);
ShowNameTags(false);
}
Re: Name Tags -
FaZeRs - 27.12.2014
up up up
Re: Name Tags -
Ahmad45123 - 27.12.2014
I don't get it...
Just enable the default one..
Why'd you want to create your own ?
Re: Name Tags -
FaZeRs - 27.12.2014
Cause i don't want to people see health and armour bars.
Re: Name Tags -
FaZeRs - 28.12.2014
up up up
Re: Name Tags -
UpSMaX - 28.12.2014
FaZe ?
Re: Name Tags -
Pottus - 28.12.2014
This is a pretty common issue when attaching 3d labels they bug out for some reason I would suggest using the streamer to handle 3d labels there is another thing you could try as well that is after you delete a label set it to INVALID_3DTEXT_ID then before creating make sure that the variable is INVALID_3DTEXT_ID if not delete it.
Re: Name Tags -
FaZeRs - 28.12.2014
Hmm can you explain me a bit more so i can understand how to do it?