Raised This Month: $ Target: $400
 0% 

Restrict SAY Command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
The_Ghost
Senior Member
Join Date: Jun 2006
Location: RoMaNiA
Old 03-04-2007 , 13:17   Restrict SAY Command
Reply With Quote #1

Hey guys... I was wondering if someone could make a plug in to restrict SAY command, so everybody can use ONLY say_team. Can somebody create this ?
__________________
We live in a world where PIZZA arrives faster than the Police !
The_Ghost is offline
Send a message via Skype™ to The_Ghost
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 03-04-2007 , 13:33   Re: Restrict SAY Command
Reply With Quote #2

Code:
#include <amxmodx> public plugin_init()     {     register_plugin("No Say Chat", "0.1", "Author")     register_clcmd("say", "cmd_say") } public cmd_say(id)     {     return PLUGIN_HANDLED }
organizedKaoS is offline
The_Ghost
Senior Member
Join Date: Jun 2006
Location: RoMaNiA
Old 03-04-2007 , 13:41   Re: Restrict SAY Command
Reply With Quote #3

Quote:
/home/groups/amxmodx/tmp3/phpXS6HzU.sma(3) : error 017: undefined symbol "register_plugin"
/home/groups/amxmodx/tmp3/phpXS6HzU.sma(4) : error 017: undefined symbol "register_clcmd"
/home/groups/amxmodx/tmp3/phpXS6HzU.sma( : error 017: undefined symbol "PLUGIN_HANDLED"

3 Errors.
Could not locate output file /home/groups/amxmodx/public_html/websc3/phpXS6HzU.amx (compile failed).
...
__________________
We live in a world where PIZZA arrives faster than the Police !

Last edited by The_Ghost; 03-05-2007 at 09:09.
The_Ghost is offline
Send a message via Skype™ to The_Ghost
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 03-04-2007 , 13:42   Re: Restrict SAY Command
Reply With Quote #4

you didnt copy everything.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
The_Ghost
Senior Member
Join Date: Jun 2006
Location: RoMaNiA
Old 03-04-2007 , 13:58   Re: Restrict SAY Command
Reply With Quote #5

Ooops, my bad, Thank You, organizedKaoS!
__________________
We live in a world where PIZZA arrives faster than the Police !
The_Ghost is offline
Send a message via Skype™ to The_Ghost
Reaper2331
Veteran Member
Join Date: Nov 2006
Location: Columbus,Ohio
Old 03-04-2007 , 20:46   Re: Restrict SAY Command
Reply With Quote #6

can you make it so there is a command to turn it off and on and if its off only admins with immunity(ADMIN_IMMUNITY) can talk
__________________

Reaper2331 is offline
Send a message via AIM to Reaper2331 Send a message via MSN to Reaper2331 Send a message via Yahoo to Reaper2331
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 03-04-2007 , 23:57   Re: Restrict SAY Command
Reply With Quote #7

Code:
#include <amxmodx> new option_chat public plugin_init()     {     register_plugin("No Say Chat", "0.2", "Author")     register_clcmd("say", "cmd_say")     option_chat = register_cvar("toggle_chat", "0") } public cmd_say(id)     {     if(!get_pcvar_num(option_chat))         {         if(get_user_flags(id) & ADMIN_IMMUNITY)             {             return PLUGIN_CONTINUE         }         else             {             return PLUGIN_HANDLED         }     }     else         {         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE }

Type in console amx_rcon toggle_chat 1|0 or rcon toggle_chat 1|0.

Default is 0...public chat is off, admin with immunity flag not affected.

1 is on...all players can public chat.
organizedKaoS is offline
The_Ghost
Senior Member
Join Date: Jun 2006
Location: RoMaNiA
Old 03-05-2007 , 08:33   Re: Restrict SAY Command
Reply With Quote #8

But can you add a cvar so I can let somebody chat ? Something like amx_cansay X
__________________
We live in a world where PIZZA arrives faster than the Police !
The_Ghost is offline
Send a message via Skype™ to The_Ghost
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 03-05-2007 , 14:03   Re: Restrict SAY Command
Reply With Quote #9

Code:
#include <amxmodx> #include <amxmisc> new option_chat new bool:PlayerChat[33] public plugin_init()     {     register_plugin("No Say Chat", "0.3", "Author")     register_clcmd("say", "cmd_say")     register_concmd("amx_allowchat", "cmdchat", ADMIN_IMMUNITY, "<Name> - Allow individual players to chat")     option_chat = register_cvar("toggle_chat", "0") } public client_putinserver(id)     {     PlayerChat[id] = false } public client_disconnect(id)     {     PlayerChat[id] = false } public cmdchat(id, level, cid)     {     if(!cmd_access(id, level, cid, 1))         return PLUGIN_HANDLED         new arg[32]     read_argv(1, arg, 31)     new target = cmd_target(id, arg, 2)     new admin[32], pname[32]         if(!is_user_connected(target))         return PLUGIN_CONTINUE         get_user_name(id, admin, 31)     get_user_name(target, pname, 31)         client_print(0, print_chat, "[Chat] [%s] has allowed [%s] to use public chat", admin, pname)         PlayerChat[target] = true     return PLUGIN_CONTINUE } public cmd_say(id)     {     if(!get_pcvar_num(option_chat))         {         if(get_user_flags(id) & ADMIN_IMMUNITY || PlayerChat[id])             {             return PLUGIN_CONTINUE         }         else             {             return PLUGIN_HANDLED         }     }     else         {         return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE }
organizedKaoS is offline
The_Ghost
Senior Member
Join Date: Jun 2006
Location: RoMaNiA
Old 03-05-2007 , 14:30   Re: Restrict SAY Command
Reply With Quote #10

Thanks man! +Karma for ya!
__________________
We live in a world where PIZZA arrives faster than the Police !
The_Ghost is offline
Send a message via Skype™ to The_Ghost
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 03:46.


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