Jump to content

change elementdata


King12

Recommended Posts

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

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...