Jump to content

Nametags bug :3


K4stic

Recommended Posts

Posted

the scoreboard and Chat works good then someone change nick but no the nametags the nametags stuck to old one :3 (look picture)

mta-sc10.jpg

how fix this bug?

Posted

else you could reset the nameplayertagtext with a function but i dont know if it will work with your scripts you made which change the nametag text

try this

  
nameTag = {} 
  
function nameTag:resourceStart() 
    setTimer(function() 
        nameTag:resetAll() 
    end, 500, 0) 
end 
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), nameTag:resourceStart) 
  
function nameTag:resetAll() 
    for _,player in ipairs(getElementsByType("player")) do 
        local tempPlayerName = getPlayerName(player) 
        local tempPlayerNametagText = getPlayerNametagText(player) 
        if not (tempPlayerName == tempPlayerNametagText) then -- for performance 
            setPlayerNametagText(player, tempPlayerName) 
        end 
    end 
end 
-- Not tested at all pleas debug my faults 
  

:)

Posted
i sayd scoreboard work perfect the name on scorboard is true on nametag of player not true

Then find out where the 'setPlayerNametagText' function is used and replace it with 'setPlayerName'.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...