function bless (spurceplayer)
if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(sourceplayer)), aclGetGroup("Admin")) then
for id, player in ipairs(getElementsByType("player")) do
setElementData(player,"blood", 12000)
setElementData(player,"bleeding", 0)
setElementData(player,"cold", false)
setElementData(player,"temperature", 37)
setElementData(player,"pain", false)
setElementData(player,"brokenbone", false)
setElementData(player,"thirst", 100)
setElementData(player,"food", 100)
end
outputChatBox("#6495ED[DVOORN]#C0C0C0All players were cured.!", thePlayer, 255, 255, 255, true)
end
end
addCommandHandler("aheall", bless)
or
for only players who you have added to /add admin player
function bless (spurceplayer)
if getElementData(playersource,"admin") then
for id, player in ipairs(getElementsByType("player")) do
setElementData(player,"blood", 12000)
setElementData(player,"bleeding", 0)
setElementData(player,"cold", false)
setElementData(player,"temperature", 37)
setElementData(player,"pain", false)
setElementData(player,"brokenbone", false)
setElementData(player,"thirst", 100)
setElementData(player,"food", 100)
end
outputChatBox("#6495ED[DVOORN]#C0C0C0All players were cured.!", thePlayer, 255, 255, 255, true)
end
end
addCommandHandler("aheall", bless)