AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hook console say command? (https://forums.alliedmods.net/showthread.php?t=328202)

Mario AR. 10-30-2020 16:52

Hook console say command?
 
Hi.

I'm trying to hook a 'say' command sent from the server console. None of the methods above seemed to work (they just don't catch it).
PHP Code:

register_clcmd("say"
register_srvcmd("say"
register_concmd("say
register_message(get_user_msgid("
SayText")
register_message(get_user_msgid("
TextMsg") 

Is there a way to achieve what I want? I'm using ReHLDS + ReAPI.

Thanks!

fysiks 10-30-2020 22:23

Re: Hook console say command?
 
As a reminder, register_clcmd() is for client commands which can only be sent by a client so that would never have worked. register_concmd() should catch commands from both the server and the client.

I tried register_srvcmd() on a proper server and it also doesn't hook the say command sent via the server's console. It's possible that the engine handles all known server commands before they will be sent to MetaMod (and therefore AMX Mod X) but I don't know that for sure. I'm not able to hook any other server commands either.

It sounds more like you need to describe what you're trying to do and why because maybe there's an alternative method to achieve your goal.

Mario AR. 10-31-2020 03:04

Re: Hook console say command?
 
Thanks for your reply.

I'm trying to block EAC (Easy Anti Cheat) from printing text. It sends the rcon command "say ....".
I didn't find a way to block rcon commands neither (at least not without changing the rcon password).

JocAnis 10-31-2020 07:59

Re: Hook console say command?
 
maybe possible with orpheu (DarkPL sent sources long time ago) but not sure of just catching the message or + to delete it


All times are GMT -4. The time now is 14:10.

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