Raised This Month: $32 Target: $400
 8% 

[REQ] is it possible to disable or block use chat ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dyxL
Senior Member
Join Date: Jul 2010
Old 11-06-2017 , 14:00   [REQ] is it possible to disable or block use chat ?
Reply With Quote #1

GAME: CSGO

is it possible to disable or block use chat also with this player can use team chat ? maybe with command or plugin ?

Last edited by dyxL; 11-06-2017 at 14:05.
dyxL is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-06-2017 , 14:30   Re: [REQ] is it possible to disable or block use chat ?
Reply With Quote #2

sm_gag?
Mitchell is offline
dyxL
Senior Member
Join Date: Jul 2010
Old 11-10-2017 , 21:01   Re: [REQ] is it possible to disable or block use chat ?
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
sm_gag?
players have to use team chat
dyxL is offline
MrMith
New Member
Join Date: Nov 2016
Old 11-10-2017 , 22:09   Re: [REQ] is it possible to disable or block use chat ?
Reply With Quote #4

Code:
public OnPluginStart()
{
	RegConsoleCmd("say", Command_Say);
}

public Action:Command_Say(client, args)
{
	return Plugin_Handled;
}
MrMith is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 11-11-2017 , 01:08   Re: [REQ] is it possible to disable or block use chat ?
Reply With Quote #5

Quote:
Originally Posted by MrMith View Post
Code:
public OnPluginStart()
{
	RegConsoleCmd("say", Command_Say);
}

public Action:Command_Say(client, args)
{
	return Plugin_Handled;
}
Except use AddCommandListener instead of RegConsoleCmd.
__________________
ThatOneGuy is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-11-2017 , 11:51   Re: [REQ] is it possible to disable or block use chat ?
Reply With Quote #6

Quote:
Originally Posted by ThatOneGuy View Post
Except use AddCommandListener instead of RegConsoleCmd.
Except use OnClientSayCommand instead of AddCommandListener

Last edited by Mitchell; 11-11-2017 at 11:52.
Mitchell is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 11-11-2017 , 12:47   Re: [REQ] is it possible to disable or block use chat ?
Reply With Quote #7

Quote:
Originally Posted by Mitchell View Post
Except use OnClientSayCommand instead of AddCommandListener
lol

I was just trying to get at that RegConsoleCmd is bad practice for hooking commands as it doesnt fire as early as AddCommandListener and adds another command in the server memory (or so I seem to recall).

I forgot about OnClientSayCommand though. They are both doing a similar hook and have similar capabilities (as far as I can see), but since that one is already hooked, it might be more preferential. Are the main advantages to its use not needing the hook in OnPluginStart and having some info already stored in easy variables that dont require natives (GetCmdArg, GetCmdArgString) to get?
__________________
ThatOneGuy is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-11-2017 , 13:09   Re: [REQ] is it possible to disable or block use chat ?
Reply With Quote #8

Just think of OnClientSayCommand as being the forward for an already hooked "say". So adding a command listener again would be repetitive, right? Plus makes it easy to control for other plugins doing the same hook.
Mitchell is offline
91346706501435897134
Member
Join Date: Oct 2017
Old 11-12-2017 , 13:31   Re: [REQ] is it possible to disable or block use chat ?
Reply With Quote #9

Quote:
Originally Posted by dyxL View Post
GAME: CSGO

is it possible to disable or block use chat also with this player can use team chat ? maybe with command or plugin ?
This blocks chat aswell as teamchat.
You can still send messages via the master console of the server.
Attached Files
File Type: sp Get Plugin or Get Source (block_chat.sp - 196 views - 402 Bytes)
91346706501435897134 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 13:21.


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