Name Tags
#1

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(playeridplayernamesizeof(playername));
    
NameTag[playerid] = Create3DTextLabel(playername0xFFFFFFFF000NAME_DRAWDISTANCE0);
    
Attach3DTextLabelToPlayer(NameTag[playerid], playerid0.00.00.2);
}
public 
OnPlayerDisconnect(playeridreason)
{
    
Delete3DTextLabel(NameTag[playerid]);

And how can i set ID on ( ) after the name?
Reply
#2

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

I have already did this.

PHP код:
public OnGameModeInit()
{
    
SetNameTagDrawDistance(0.0);
    
ShowNameTags(false);

Reply
#4

up up up
Reply
#5

I don't get it...

Just enable the default one..
Why'd you want to create your own ?
Reply
#6

Cause i don't want to people see health and armour bars.
Reply
#7

up up up
Reply
#8

FaZe ?
Reply
#9

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

Hmm can you explain me a bit more so i can understand how to do it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)