SA-MP Forums Archive
Nametag doubled ? - 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: Nametag doubled ? (/showthread.php?tid=612538)



Nametag doubled ? - Zeus666 - 19.07.2016

Why nametags are getting oversized?

One player has two different nametags. (His and another player's)



http://i.imgur.com/jfDGjTv.jpg


http://i.imgur.com/FtTuPBb.jpg


Re: Nametag doubled ? - UltraScripter - 19.07.2016

Because you using 2 labels
If you want to change label name dont create another one just use label string!


Re: Nametag doubled ? - Zeus666 - 19.07.2016

Can you explain what should I delete?


Re: Nametag doubled ? - Sew_Sumi - 19.07.2016

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
Can you explain what should I delete?
What other 3DText have you copied and pasted to make, because that's what it is.

You've got the name shown, but there is something else, and what seems to be the case is that you haven't changed it's co-ordinates when you've pasted it.


Re: Nametag doubled ? - Zeus666 - 19.07.2016

I have searched for 3DText and I did not find anything.

But problem is that

if ID 0 enters with name " ABCD"

then quits

and some other id 0 enters with name " YACWD", his nametag is puttin over ABCD and it's shows weird.


PHP код:
ShowNameTags(0);
SetNameTagDrawDistance(25.0);
DisableNameTagLOS(); 

in the onplayerconnect i have

PHP код:
PlayerLabel[playerid] = CreateDynamic3DTextLabel("" 0xADFF2FAA0.00.00.215.0playeridINVALID_VEHICLE_ID1, -1, -1, -1100.0);
           
PlayersAlive++;
           
CreatePlayerTD(playerid);
           
ConnectVars(playerid);
        
ClearChatPlayer(playerid);
        
ResetVars(playerid);
        
CheckVersion(playerid);
        
SetPlayerTeam(playerid0);
        
playertimer[playerid] = -1;
    } 



Re: Nametag doubled ? - Stinged - 19.07.2016

Are you destroying the label when a player disconnects?


Re: Nametag doubled ? - Zeus666 - 19.07.2016

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    if(!
IsPlayerNPC(playerid))
    {
        if(
pInfo[playerid][pLogged] == 1) { SaveStats(playerid); }
        
DestroyDynamic3DTextLabel(PlayerLabel[playerid]);
         
PlayersAlive--;
          
ResetVars(playerid);
        
DisconnectVars(playerid);
        
DeletePlayerTD(playerid); 

No, I don't. I see that I do only for NPC.


Re: Nametag doubled ? - Fairuz - 19.07.2016

You do.
Read carefully,you using !IsPlayerNPC.


Re: Nametag doubled ? - Zeus666 - 19.07.2016

And why it's showing in that way ?


Re: Nametag doubled ? - Sew_Sumi - 19.07.2016

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
And why it's showing in that way ?
Ignore him, he doesn't understand.


It doesn't seem like it should be giving you any trouble in this area. Check the attachment and the updating portions, and maybe look for anything you may have left in before implementing the streamer maybe.

Did you make a Filterscript with the code prior, and still have it loading?


-Edit- Well, so much for that, but could you let us know where the bug was coming from in your code?