Jump to content

Remove casesensitive?


kevenvz

Recommended Posts

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

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 :S

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...