addCommandHandler("unmuteall", function(thePlayer, _, ...)
if(isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Staff"))) then
for ID,player in ipairs(getElementsByType("player")) do
if not isPlayerInACL(player, "Staff") then
setPlayerMuted (player, false)
end
end
end
end)
function isPlayerInACL(player, acl)
local accountName = getAccountName( getPlayerAccount(player) )
if accountName ~= "guest" and type( aclGetGroup(acl) ) == "userdata" then
return isObjectInACLGroup( "user."..accountName, aclGetGroup(acl) )
end
return false
end