King12 Posted September 22, 2014 Share Posted September 22, 2014 Hey there, I'm really pissed off of this code, I couldn't check if the last parameter is true or false ( data ) addCommandHandler ("chgdata", function (player, cmd, target, data) local ThePlayer = getPlayerFromPartialName(tostring(target)) local value = setElementData(player, "AdminGroup", data) if data == "true" or "false" then outputChatBox("data of " ..getPlayerName(ThePlayer).." #ffffffhave been changed to "..data..".",source, 255,255,255, true) else outputChatBox("Wrong Syntax! use /chgdata = #00ff00true #ffffffor #ff0000false.",source, 255,0,0, true) end end ) Link to comment
Castillo Posted September 23, 2014 Share Posted September 23, 2014 Do: if ( data == "true" ) then Link to comment
King12 Posted September 23, 2014 Author Share Posted September 23, 2014 Do: if ( data == "true" ) then Thanks! 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