Jump to content

Nametags bug :3


K4stic

Recommended Posts

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 
  

:)

Link to comment

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...