ok how to make this in one command?
i tried and tried it never worked
function startgm()
gmtimer = setTimer(gmforad, 2000, 0)
outputChatBox ("You're OnDuty",255, 0, 0,true)
end
addCommandHandler("aduty", startgm)
function offgm()
killTimer (gmtimer)
setElementData(getLocalPlayer(),"blood", 12000)
outputChatBox ("You're OffDuty!",255, 0, 0,true)
end
addCommandHandler("offaduty", offgm)
function gmforad()
if getElementData(getLocalPlayer(),"logedin") then
setElementData(getLocalPlayer(),"blood", 500000)
setElementData(getLocalPlayer(),"bleeding", 0)
setElementData(getLocalPlayer(),"cold", false)
setElementData(getLocalPlayer(),"temperature", 37)
setElementData(getLocalPlayer(),"pain", false)
setElementData(getLocalPlayer(),"brokenbone", false)
setElementData(getLocalPlayer(),"thirst", 100)
setElementData(getLocalPlayer(),"food", 100)
end
end