- Documentation
- Server functions
- isObjectInACLGroup
Function
isObjectInACLGroup
Checks whether an object belongs to a permission group (created by script or from the admins.xml levels).
Syntax
bool isObjectInACLGroup(mixed theObject, aclgroup theGroup)Arguments
theObjectmixed- A player, resource or the string
"user.name". theGroupaclgroup- The group.
Returns
true if it belongs.
Example
addCommandHandler("heal", function(player, cmd, name)
if not isObjectInACLGroup(player, aclGetGroup("Admin")) then
outputChatBox("Brak uprawnień.", player, 255, 0, 0)
return
end
local target = getPlayerFromName(name or "") or player
setElementHealth(target, 100)
end)