kevenvz Posted September 7, 2013 Share Posted September 7, 2013 Hello, I am making an resource(it works fully) but the problem is you need to do like /lang [language] but then the language is case sensitive. How can I turn this off? (I am not releasing my full code cause it works just this if class) if languages[lang] then setAccountData(getPlayerAccount(player),"chat.language",lang) outputChatBox("Your Language had been set to: #FFFFFF"..lang.."#FF0000!",player,255,0,0,true) return end Link to comment
denny199 Posted September 7, 2013 Share Posted September 7, 2013 string.lower --for turning a string in this way: "nl" string.upper --for turning a string in this way: "NL" Link to comment
kevenvz Posted September 7, 2013 Author Share Posted September 7, 2013 I already did something like: lang = lang:gsub("^%l", string.upper) Cause only the first character needs to be uppercase. But my problem is if the value is nil it won't work if I add an if: if not lang == nil then lang = lang:gsub("^%l", string.upper) end it won't work Link to comment
kevenvz Posted September 7, 2013 Author Share Posted September 7, 2013 Nevermind it is fixed. Thanks for the help anyways! 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