crismar Posted May 20, 2014 Share Posted May 20, 2014 Howdy, I was wondering if there is a function to detect if a name is using Hex color codes ? I want to automatically change names when they have colorcodes. F.e: #FF0000TestName will become TestName Link to comment
MIKI785 Posted May 20, 2014 Share Posted May 20, 2014 You can use string.gsub for that. Link to comment
crismar Posted May 20, 2014 Author Share Posted May 20, 2014 You can use string.gsub for that. Yes but I would search for a '#' in the name then 6 follwing characters, what if I just have a name like #BaNaNa and I'd remove his entire name ? Link to comment
MIKI785 Posted May 20, 2014 Share Posted May 20, 2014 You use #%x%x%x%x%x%x, x = hexadecimal character. So string.gsub(name, "#%x%x%x%x%x%x", "") will do. 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