K4stic Posted May 28, 2013 Share Posted May 28, 2013 the scoreboard and Chat works good then someone change nick but no the nametags the nametags stuck to old one :3 (look picture) how fix this bug? Link to comment
Schlammy Posted May 28, 2013 Share Posted May 28, 2013 do not use getPlayerName if you edit the nametag text with setPlayerNametagText. Use https://wiki.multitheftauto.com/wiki/Ge ... ametagText Link to comment
K4stic Posted May 28, 2013 Author Share Posted May 28, 2013 man that script is default of MTA not me script it D: that because i ask help Link to comment
DakiLLa Posted May 28, 2013 Share Posted May 28, 2013 You have to modify the scoreboard resource by replacing 'getPlayerName' with 'getPlayerNametagText'. Link to comment
Schlammy Posted May 28, 2013 Share Posted May 28, 2013 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
K4stic Posted May 28, 2013 Author Share Posted May 28, 2013 i sayd scoreboard work perfect the name on scorboard is true on nametag of player not true Link to comment
DakiLLa Posted May 28, 2013 Share Posted May 28, 2013 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'. Link to comment
Schlammy Posted May 28, 2013 Share Posted May 28, 2013 then use my script wheres the problem? Link to comment
K4stic Posted May 28, 2013 Author Share Posted May 28, 2013 thx for help i solve it :3 was IDIOT bug :3 but anyway Thx Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now