AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hooking say and say_team (https://forums.alliedmods.net/showthread.php?t=143511)

Mlk27 11-20-2010 21:32

Hooking say and say_team
 
Any idea how to catch all say and say_team chat messages which are not being blocked by return plugin_handled?

fysiks 11-20-2010 21:42

Re: Hooking say and say_team
 
Code:

register_clcmd("say", "cmd")
register_clcmd("say_team", "cmd")


ConnorMcLeod 11-21-2010 04:16

Re: Hooking say and say_team
 
PHP Code:

register_event("SayText""Event_SayText_Chat""bc""2&#Cstrike_Chat_"

PHP Code:

public Event_SayText_ChatiReceiver )
{
    new 
iSender read_data(1)
    new 
szMessage[256]
    
read_data(4szMessagecharsmax(szMessage))



What are you trying to do ?


If you use fysiks way, then you have to declare your plugin at the bottom of plugins.ini (and make sure there is not any plugins-XXX.ini in configs folder).


My way catch chat that is not blocked by plugin via PLUGIN_HANDLED or PLUGIN_HANDLED_MAIN
fysiks way will also catch chat blocked with PLUGIN_HANDLED_MAIN.


All times are GMT -4. The time now is 23:38.

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