Ulysses

Ulysses Stuff => Releases => Topic started by: LuaTenshi on March 30, 2013, 05:51:45 PM

Title: Client Side Mute
Post by: LuaTenshi on March 30, 2013, 05:51:45 PM
I got tired of having to rely on an admin to mute some one because they are mic spamming so I made this little script...

Code: [Select]
-- Client Side Player Muting --
concommand.Add( "mute", function(ply,_,args)
for _,v in pairs(player.GetAll()) do
if( (string.find( string.lower(v:Nick()), string.lower(tostring(args[1]))) ~= nil and args[1] != "_") or tostring(v:SteamID()) == tostring(args[2]) ) then
v:SetMuted(true)
                        chat.AddText(Color(0,0,0), "", Color(168,168,168), v:Nick() .. " has been muted!")
end
end
end)
concommand.Add( "unmute", function(ply,_,args)
for _,v in pairs(player.GetAll()) do
if( (string.find( string.lower(v:Nick()), string.lower(tostring(args[1]))) ~= nil and args[1] != "_") or tostring(v:SteamID()) == tostring(args[2]) ) then
v:SetMuted(false)
chat.AddText(Color(0,0,0), "", Color(168,168,168), v:Nick() .. " has been unmuted!")
end
end
end)

I guess I should now work on a command that lets you list who is currently muted or not. :P
Title: Re: Client Side Mute
Post by: Bizzclaw on April 13, 2013, 05:11:55 PM
It would be nice if it wouldn't let you mute admins. Just return false if target.isadmin?
Title: Re: Client Side Mute
Post by: ChaosWolf on August 23, 2014, 08:06:44 PM
I really hate Reviving old topics especially being so new to the forum but I have to express my appreciation, +1 karma cause my script is broken, however muting admins IS a good idea.

may want to edit OP in regards to where to place the script for those who don't know.
now that its kind of sorta unintentionally been bumped. its going to get somebody's attention. let's face it old scripts might need a good bump now and then cause who really goes through all the script pages just to browse.
Title: Re: Client Side Mute
Post by: JamminR on August 24, 2014, 12:03:02 AM
Considering there's only a few pages of Release topics, it's not that difficult.
Title: Re: Client Side Mute
Post by: ChaosWolf on August 24, 2014, 01:35:43 AM
refer to your statement once more when considering how many people even look at page 2 of google searches.