crismar Posted May 20, 2014 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 Contact me if you are looking for a Web Developer. 3rd of October 2014 - Founder of RomaniaZ
MIKI785 Posted May 20, 2014 Posted May 20, 2014 You can use string.gsub for that. Lua Scripter Owner of mshost.cz MTA portal.
crismar Posted May 20, 2014 Author 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 ? Contact me if you are looking for a Web Developer. 3rd of October 2014 - Founder of RomaniaZ
MIKI785 Posted May 20, 2014 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. Lua Scripter Owner of mshost.cz MTA portal.
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