ULX

Author Topic: Client Mute  (Read 7977 times)

0 Members and 2 Guests are viewing this topic.

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Client Mute
« on: June 30, 2016, 11:41:27 PM »
I have people on my server who complain cause people are talking im wondering if its possible to make a command that allows them mute all/some players (preferably not admins and above)
~ Undercover Orange

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Client Mute
« Reply #1 on: July 01, 2016, 02:47:01 AM »
Do you want a command like ULX's !mute, where it mutes the targeted player(s) for everyone, or do you want a command that only mutes the targeted player(s) for the player who ran the command?

The first option can be accomplished by setting can_target. I'll go figure out how that works again now, and report back.

edit: If you want to prevent users from muting admins and above (assuming "above" groups inherit from admin), set can_target to !%admin.
Stickly Man! also made a post about it: http://forums.ulyssesmod.net/index.php/topic,5346.0.html

For the second option, you're going to need a custom command. I think there's a Garry's Mod function to mute someone client side, so that shouldn't be too difficult.

edit: Player:SetMuted
« Last Edit: July 01, 2016, 03:04:56 AM by roastchicken »
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Re: Client Mute
« Reply #2 on: July 01, 2016, 11:40:21 AM »
im talking the second. but without being able to mute admins.
~ Undercover Orange

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Client Mute
« Reply #3 on: July 01, 2016, 10:17:50 PM »
ULX already has this capability.
Use can_target as recommended.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Re: Client Mute
« Reply #4 on: July 01, 2016, 11:47:05 PM »
ULX already has this capability.

so it doesnt mute that person for everyone? if not why would it be only available to admins and above when first installed?
also how exactly does can target work? if i type admin does that mean they can target admins or only whats below admin?
~ Undercover Orange

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Client Mute
« Reply #5 on: July 02, 2016, 07:05:28 AM »
My apologies. I now understand what you are asking.
You want a player to have a "Ignore this player" command.
No, ULX does not have that ability, but as stated by Roastchicken, is likely already in Gmod (sorry, I don't know where)

Roastchicken has already answered your question. See his referenced link for how can_target works.
Unfortunately, the default Gmod mute command would not prevent a player from doing what you wish it not to do, mute admins.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Re: Client Mute
« Reply #6 on: July 02, 2016, 03:09:31 PM »
ok. i guess its volume don or suck it up then
~ Undercover Orange

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Re: Client Mute
« Reply #7 on: July 03, 2016, 09:13:31 PM »

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Re: Client Mute
« Reply #8 on: July 05, 2016, 12:59:43 AM »
no not really   :P its OK. people stopped being winy
~ Undercover Orange

Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Re: Client Mute
« Reply #9 on: July 05, 2016, 10:29:21 PM »
Guess I'm not sure what the original request was, then.  You had asked for the ability to allow players to mic mute other players (presumably for gamemodes that don't already provide that functionality in the scoreboard).  That's precisely what that addon does.

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Client Mute
« Reply #10 on: July 06, 2016, 12:49:34 AM »
Guess I'm not sure what the original request was, then.  You had asked for the ability to allow players to mic mute other players (presumably for gamemodes that don't already provide that functionality in the scoreboard).  That's precisely what that addon does.

It might be because he wants to be able to restrict it to target only non-admins. Although that could be accomplished with can_target.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Re: Client Mute
« Reply #11 on: July 06, 2016, 09:18:14 PM »
ill try it out with can target
~ Undercover Orange