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

Chat Mute - 08/18/08


Post New Thread Reply   
 
Thread Tools Display Modes
alexinno
Senior Member
Join Date: Mar 2007
Location: C:\
Old 01-13-2009 , 10:39   Re: Chat Mute - 08/18/08
Reply With Quote #31

can someone make this plugin , so an admin can close chating on server ?
like mute all , only admins to be able to chat
thx
alexinno is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 01-13-2009 , 13:45   Re: Chat Mute - 08/18/08
Reply With Quote #32

Sure thing!

Here ya go:

CVARS
adminchat 1/0 - turns this plugin on/off
Change "ADMIN_IMMUNITY" to your preference below:

Code:
#define ADMIN_ALL		0	/* everyone */
#define ADMIN_IMMUNITY		(1<<0)	/* flag "a" */
#define ADMIN_RESERVATION	(1<<1)	/* flag "b" */
#define ADMIN_KICK		(1<<2)	/* flag "c" */
#define ADMIN_BAN		(1<<3)	/* flag "d" */
#define ADMIN_SLAY		(1<<4)	/* flag "e" */
#define ADMIN_MAP		(1<<5)	/* flag "f" */
#define ADMIN_CVAR		(1<<6)	/* flag "g" */
#define ADMIN_CFG		(1<<7)	/* flag "h" */
#define ADMIN_CHAT		(1<<8)	/* flag "i" */
#define ADMIN_VOTE		(1<<9)	/* flag "j" */
#define ADMIN_PASSWORD		(1<<10)	/* flag "k" */
#define ADMIN_RCON		(1<<11)	/* flag "l" */
#define ADMIN_LEVEL_A		(1<<12)	/* flag "m" */
#define ADMIN_LEVEL_B		(1<<13)	/* flag "n" */
#define ADMIN_LEVEL_C		(1<<14)	/* flag "o" */
#define ADMIN_LEVEL_D		(1<<15)	/* flag "p" */
#define ADMIN_LEVEL_E		(1<<16)	/* flag "q" */
#define ADMIN_LEVEL_F		(1<<17)	/* flag "r" */
#define ADMIN_LEVEL_G		(1<<18)	/* flag "s" */
#define ADMIN_LEVEL_H		(1<<19)	/* flag "t" */
#define ADMIN_MENU		(1<<20)	/* flag "u" */
#define ADMIN_ADMIN		(1<<24)	/* flag "y" */
#define ADMIN_USER		(1<<25)	/* flag "z" */
PHP Code:
#include <amxmodx>

#define PLUGIN "AdminOnlyChat"
#define VERSION "1.0"
#define AUTHOR "stupok"

new cvar_AdminChat

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
cvar_AdminChat register_cvar("adminchat""1"// should chat be for admins only?
    
    
register_message(get_user_msgid("SayText"), "message_SayText")
}

public 
message_SayText(iMsgidiDestreceiver)
{
    new 
sender get_msg_arg_int(1)
    
    if(!
get_pcvar_num(cvar_AdminChat) || get_user_flags(sender) & ADMIN_IMMUNITY)
        return 
PLUGIN_CONTINUE
    
    client_print
(senderprint_chat"* You are muted. Only admins can chat.")
    
    return 
PLUGIN_HANDLED

__________________
stupok is offline
deadman909
Veteran Member
Join Date: Oct 2008
Old 08-03-2009 , 21:17   Re: Chat Mute - 08/18/08
Reply With Quote #33

Gonna tRy it out
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
newcomer
Member
Join Date: Aug 2011
Old 03-12-2013 , 04:13   Re: Chat Mute - 08/18/08
Reply With Quote #34

Can you support mute teammates and dead person while chatting?
newcomer is offline
TeddiBer
Senior Member
Join Date: Oct 2011
Old 07-04-2013 , 18:33   Re: Chat Mute - 08/18/08
Reply With Quote #35

can someone add to this plugin an option that can mute voice too ?
I mean that in the menu the player can choose if it's chat/voice/chat+voice. thanks
TeddiBer is offline
Reply



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 02:34.


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