Raised This Month: $12 Target: $400
 3% 

[ALL]Mute/Unmute All Non-Admins


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Who_er
Junior Member
Join Date: Jan 2013
Plugin ID:
3557
Plugin Version:
1.0
Plugin Category:
Admin Commands
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This is a simple plugin which mutes all of the non-admins in a server (Including Donators).
    Old 03-04-2013 , 18:44   [ALL]Mute/Unmute All Non-Admins
    Reply With Quote #1

    WELCOME!
    Today, I bring you my very first plugin (submitted to Allied Modders that is ).

    Basically, all my plugin does it goes through and mutes all of the non-admins in the server. It's nothing special, but it's something to get me started.

    Commands:
    sm_mutenonadmins - mutes all non admins
    sm_unmutenonadmins - unmutes all non admins
    sm_mna - same as sm_mutenonadmins
    sm_umna -
    same as sm_unmutenonadmins

    Cvars:
    sm_mutenonadmins_version: "1.0" - MuteNonAdmins Version Number

    Installation:
    - Put sm_mutenonadmins.smx in "cstrike/addons/sourcemod/plugins "
    - Relaunch the server or change map

    Changelog:
    - 1.0
    First Release
    - 1.1
    Had help cleaning code (ecca)
    Added new parameters so that you can target Dead, Alive, or All
    - 1.2
    Cleaned the code, by using a switch statement, will also allow for more parameters.

    Reported Bugs:
    -Non so far
    Attached Files
    File Type: sp Get Plugin or Get Source (MuteAllButAdmins.sp - 2533 views - 5.0 KB)

    Last edited by Who_er; 03-12-2013 at 17:04. Reason: Updated Code
    Who_er is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 03-04-2013 , 21:50   Re: [CS:S] Mute/Unmute All Non-Admins
    Reply With Quote #2

    use checkcommandaccess, don't check flags/flagbits
    use replytocommand instead of printtochat for stuff like this, it's going back to 1 person anyways
    you don't need to initialize idx outside of the for loop
    you don't need autoexecconfig, you have no cvars worth saving/checking, and it would only cause problems.
    for version tracking, I think you are supposed to use these flags: FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_PLUGIN|FC VAR_SPONLY

    also, using this type of thing, you may sometimes target admins that have not fully authenticated, but that's rare, as they usually authenticated quickly/are cached.
    friagram is offline
    ilga80
    Senior Member
    Join Date: Nov 2012
    Old 03-05-2013 , 05:40   Re: [CS:S] Mute/Unmute All Non-Admins
    Reply With Quote #3

    en:why give mute all simple players?
    ru:какой смысл давать мут всем простым игрокам?
    ilga80 is offline
    ecca
    Sexy Santa
    Join Date: Jan 2011
    Old 03-05-2013 , 06:32   Re: [CS:S] Mute/Unmute All Non-Admins
    Reply With Quote #4

    This is a good idea for jailbreak servers. If you could put cvar to only mute dead on the command this would be excellent.

    Edit: Take a look at this and continue developing from it (should work). I also changed the commands to admins only since players would abuse it.
    Attached Files
    File Type: sp Get Plugin or Get Source (MuteAllButAdmins.sp - 1304 views - 1.6 KB)
    __________________

    Last edited by ecca; 03-05-2013 at 07:26.
    ecca is offline
    Who_er
    Junior Member
    Join Date: Jan 2013
    Old 03-05-2013 , 09:02   Re: [CS:S] Mute/Unmute All Non-Admins
    Reply With Quote #5

    Quote:
    Originally Posted by ecca View Post
    This is a good idea for jailbreak servers. If you could put cvar to only mute dead on the command this would be excellent.

    Edit: Take a look at this and continue developing from it (should work). I also changed the commands to admins only since players would abuse it.

    Thank you very much! it's nice to know i can get positive (In terms of help) feedback.
    Who_er is offline
    ilga80
    Senior Member
    Join Date: Nov 2012
    Old 03-05-2013 , 09:33   Re: [CS:S] Mute/Unmute All Non-Admins
    Reply With Quote #6

    Quote:
    Originally Posted by ecca View Post
    This is a good idea for jailbreak servers. If you could put cvar to only mute dead on the command this would be excellent.

    Edit: Take a look at this and continue developing from it (should work). I also changed the commands to admins only since players would abuse it.
    Delicious! You're just super scripter!
    means better to use #include <sdktools> than #include <basecomm>?
    This will lead to a good optimization?
    ilga80 is offline
    ecca
    Sexy Santa
    Join Date: Jan 2011
    Old 03-05-2013 , 11:00   Re: [CS:S] Mute/Unmute All Non-Admins
    Reply With Quote #7

    Probably not but i'm familiar with the SetClientListeningFlags and chosed to use that instead
    __________________

    Last edited by ecca; 03-05-2013 at 11:01.
    ecca is offline
    ilga80
    Senior Member
    Join Date: Nov 2012
    Old 03-05-2013 , 11:03   Re: [CS:S] Mute/Unmute All Non-Admins
    Reply With Quote #8

    Quote:
    Originally Posted by ecca View Post
    Probably not but i'm familiar with the SetClientListeningFlags and chosed to use that instead
    ok, thx
    ilga80 is offline
    Who_er
    Junior Member
    Join Date: Jan 2013
    Old 03-05-2013 , 12:32   Re: [CS:S] Mute/Unmute All Non-Admins
    Reply With Quote #9

    In terms of additions, what else could i do with this? With sourcemod, you can just do !mute @dead so i'd have no need to add that. I guess i could do a cvar for the flag to actually Apply the mute to. But ideas are always accepted =D
    Who_er is offline
    ecca
    Sexy Santa
    Join Date: Jan 2011
    Old 03-05-2013 , 13:00   Re: [CS:S] Mute/Unmute All Non-Admins
    Reply With Quote #10

    Well the built in mute system will mute dead admins aswell so.
    __________________
    ecca is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 01:54.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode