thePlayer - the person who wrote the command [server side script btw]
cmd - a STRING of what the cmd is (this currently is "health")
amount - (any variables after cmd are the variables a user type in after command)
We convert amount to number and stop if not a number
We check if its <0 or >255 and stopif so
We set the health
function setHealth(thePlayer, cmd, amount)
amount=tonumber(amount);
if not amount then return end
if (amount<0) or (amount>255) then return end
setElementHealth(thePlayer, amount)
end
addCommandHandler("health", setHealth)