AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ALL]Mute/Unmute All Non-Admins (https://forums.alliedmods.net/showthread.php?t=209990)

Who_er 03-04-2013 18:44

[ALL]Mute/Unmute All Non-Admins
 
1 Attachment(s)
WELCOME!
Today, I bring you my very first plugin (submitted to Allied Modders that is :3).

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

friagram 03-04-2013 21:50

Re: [CS:S] Mute/Unmute All Non-Admins
 
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.

ilga80 03-05-2013 05:40

Re: [CS:S] Mute/Unmute All Non-Admins
 
en:why give mute all simple players?
ru:какой смысл давать мут всем простым игрокам?

ecca 03-05-2013 06:32

Re: [CS:S] Mute/Unmute All Non-Admins
 
1 Attachment(s)
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.

Who_er 03-05-2013 09:02

Re: [CS:S] Mute/Unmute All Non-Admins
 
Quote:

Originally Posted by ecca (Post 1906916)
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.

ilga80 03-05-2013 09:33

Re: [CS:S] Mute/Unmute All Non-Admins
 
Quote:

Originally Posted by ecca (Post 1906916)
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?

ecca 03-05-2013 11:00

Re: [CS:S] Mute/Unmute All Non-Admins
 
Probably not but i'm familiar with the SetClientListeningFlags and chosed to use that instead :)

ilga80 03-05-2013 11:03

Re: [CS:S] Mute/Unmute All Non-Admins
 
Quote:

Originally Posted by ecca (Post 1907038)
Probably not but i'm familiar with the SetClientListeningFlags and chosed to use that instead :)

ok, thx

Who_er 03-05-2013 12:32

Re: [CS:S] Mute/Unmute All Non-Admins
 
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

ecca 03-05-2013 13:00

Re: [CS:S] Mute/Unmute All Non-Admins
 
Well the built in mute system will mute dead admins aswell so.


All times are GMT -4. The time now is 11:47.

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