AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Removing chat if contains a certain word. (https://forums.alliedmods.net/showthread.php?t=9100)

srx 01-05-2005 18:39

Removing chat if contains a certain word.
 
Hay all. Im currently seeking an amx mod for a gaming network. I looked into making it myself but just havent had the time to learn another language.

The mod must remove all chat from normal game if it contains X-Spectate. Will help our admins track down on wall hacks =)

Any help would be apreciated. Thanks :D

TotalNoobScripter 01-05-2005 20:50

ill try it in a day or so.

XxAvalanchexX 01-05-2005 22:02

Code:
#include <amxmodx>   public plugin_init() {     register_plugin("X-Spectate Removal","0.10","Avalanche");     register_clcmd("say","cmd_say",-1);   }   public cmd_say(id) {     new text[256];     read_args(text,255);     if(containi(text,"X-Spectate") != -1) {       new authid[32];       get_user_authid(id,authid,31);       server_print("User #%d (%s) said X-Spectate string",id,authid);       return PLUGIN_HANDLED;     }     return PLUGIN_CONTINUE;   }

If they say something that contains "X-Spectate" it will block it and send a print message to the server.

srx 01-07-2005 13:01

thankyou vmuchly worked well. :lol:


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

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