Lestat Posted July 10, 2015 Share Posted July 10, 2015 Whats the difference between Name and NametagText? local nameTag = getPlayerNametagText ( thePlayer ) local name = getPlayerName ( thePlayer ) They both return the same string with colorcodes. Link to comment
xXMADEXx Posted July 10, 2015 Share Posted July 10, 2015 A players nametag and name are the same default by MTA, however with a script they can be changed. The Nametag text is the 3D text on the player that other players change, which can be changed with setPlayerNametagText and the players name is the nickname that is displayed in something like the chatbox and can be changed with setPlayerName. To get a string without color codes, you can use this function: function removeColorCode ( text ) return text:gsub ( "#%x%x%x%x%x%x" ); end Link to comment
Lestat Posted July 10, 2015 Author Share Posted July 10, 2015 Makes sense, Thank you. Link to comment
xXMADEXx Posted July 10, 2015 Share Posted July 10, 2015 Makes sense, Thank you. You're welcome. 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