Jump to content

[Question]


Stranger

Recommended Posts

didn't work , you know what:

i think there are script for it, but

forget it, it's never gonna work, thank you guys.

Don't give up because you get frustrated.

1. stop server

2. put this into your ACL.xml

<right name="command.mute" access="false"></right> 
<right name="command.unmute" access="false"></right> 

3. start server

Link to comment
didn't work , you know what:

i think there are script for it, but

forget it, it's never gonna work, thank you guys.

Don't give up because you get frustrated.

1. stop server

2. put this into your ACL.xml

<right name="command.mute" access="false"></right> 
<right name="command.unmute" access="false"></right> 

3. start server

but like that ,i can't mute someone or unmute someone,

i want it can mute someone but can't unmuted

Link to comment

Thats not possible. the command mute alone mute and unmutes. you will have to use a custom command for that.

  
function MutePlayer(player, victimName, command) 
if victimName then 
victimName = getPlayerName(victimName) 
 if victim then 
  if (not isPlayerMuted(victim)) then 
   setPlayerMuted(victim, true) 
   else 
   outputChatBox("You have been muted by".. player .."", victim, 255, 0, 0) 
   outputChatBox("".. victim .."is already muted!", source, 255, 0, 0) 
   cancelEvent() 
   end 
  else 
  outputChatBox("Could not find player with name: "..tostring(victimName),player, 255, 0, 0)  
end 
else 
outputChatBox("Usage: /m ",player, 255, 0, 0) 
addCommandHandler("m", MutePlayer) 

Link to comment
admin/server/admin_server.lua

find this line:

if ( isPlayerMuted ( player ) ) then action = "un"..action end 

replace it:

if ( isPlayerMuted ( player ) ) then return end 

thank you but this is for all groups i want it only console can unmute

i tried to do this:

if ( hasObjectPermissionTo ( player, "general.tab_resources" ) ) then 

but didn't work

else

if the time of mute end, the mute will not removed, this is a big problem

so i have to put this

if ( isPlayerMuted ( player ) ) then action = "un"..action end 

Link to comment
  local console = getElementByIndex("console", 0) 
    if source and source ~= console then 
        if isPlayerMuted ( player ) then 
            if not ( hasObjectPermissionTo ( source, "command.aexec" ) ) then 
                -- you can add a message here or something 
                return 
            end 
        end 
    end  

Add it after ( original file )

elseif ( action == "mute" )  then 

Link to comment
thank you but this is for all groups i want it only console can unmute

i tried to do this:

if ( hasObjectPermissionTo ( player, "general.tab_resources" ) ) then 

but didn't work

else

if the time of mute end, the mute will not removed, this is a big problem

so i have to put this

if ( isPlayerMuted ( player ) ) then 
    if isObjectInACLGroup ( "user." .. getPlayerAccountName ( source ), aclGetGroup ( "Console" ) ) then 
        action = "un"..action  
    else return end 
end 

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...