Jump to content

[Mute Script]


Tando

Recommended Posts

  1. addCommandHandler("muteall", 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, true)
    			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

     

  2. 
Link to comment
7 minutes ago, AncienT said:
  1. 
    addCommandHandler("muteall", 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, true)
    			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
    

     

  2. 

What about unmute?

 

Link to comment
1 minute ago, (SAUG)Tando said:

What about unmute?

 

 

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

 

Link to comment
11 hours ago, AncienT said:

 


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

 

what about acses Denied?

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...