AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   NEED A CODE (https://forums.alliedmods.net/showthread.php?t=75282)

Pepe.argento 08-02-2008 13:41

NEED A CODE
 
I need a code for this:
someone says a word that I choose, and the plug replaced by a text that I want.
For example, someone says XJ and replaced the plug XJ SPAM.
Someone writes XJ but in the chat look the text "SPAM"

Exolent[jNr] 08-02-2008 15:04

Re: NEED A CODE
 
Use a swear filter plugin.

Pepe.argento 08-02-2008 15:55

Re: NEED A CODE
 
I need a code... no a plugin for that.. a code.

grimvh2 08-02-2008 16:27

Re: NEED A CODE
 
Hmm , try to explain better what you want . I dont understand it quite good .
You can always download the source code of the spam filter

[X]-RayCat 08-02-2008 19:40

Re: NEED A CODE
 
Code:
#include <amxmodx>   public plugin_init() {      register_plugin("Spamblock", "1.0", "unknown");      register_clcmd("say", "cmd_say");      register_clcmd("say_team", "cmd_say"); }   public cmd_say(id) {      new arg[17];      read_argv(id, arg, 16);        if(equal(arg, "[XJ]"))      {          new name[33];          get_user_name(id, name, 32);          server_cmd("amx_kick %s Xj spam", name);      } }

That will kick player if they say [XJ] on chat... ^^

YamiKaitou 08-02-2008 19:58

Re: NEED A CODE
 
As per the Global Forum Rules, you need to have a descriptive topic. If you wish for this topic to stay open, please correct the topic title before you post again.

Pepe.argento 08-04-2008 18:39

Re: NEED A CODE
 
Quote:

Originally Posted by [X]-RayCat (Post 663686)
Code:
#include <amxmodx> public plugin_init() { register_plugin("Spamblock", "1.0", "unknown"); register_clcmd("say", "cmd_say"); register_clcmd("say_team", "cmd_say"); } public cmd_say(id) { new arg[17]; read_argv(id, arg, 16); if(equal(arg, "[XJ]")) { new name[33]; get_user_name(id, name, 32); server_cmd("amx_kick %s Xj spam", name); } }


That will kick player if they say [XJ] on chat... ^^

Don't like.. No kick... replace, no kiked

[X]-RayCat 08-04-2008 19:31

Re: NEED A CODE
 
Code:
#include <amxmodx>   public plugin_init() {        register_plugin("Spamblock", "1.0", "unknown");        register_clcmd("say", "cmd_say");        register_clcmd("say_team", "cmd_say"); }   public cmd_say(id) {        new arg[17];        read_argv(1, arg, 16);          if(equal(arg, "[XJ]"))        {            client_cmd(id, "say I love this server <3");            return PLUGIN_HANDLED;  // Block their chat message.        }        return PLUGIN_CONTINUE;  // Allow their chat message to be shown }

heh thanks Xasimos i forgot that myself... get user name isnt needed either :D

Xanimos 08-05-2008 08:41

Re: NEED A CODE
 
Quote:

Originally Posted by [X]-RayCat (Post 664751)
Code:
#include <amxmodx>   public plugin_init() {        register_plugin("Spamblock", "1.0", "unknown");        register_clcmd("say", "cmd_say");        register_clcmd("say_team", "cmd_say"); }   public cmd_say(id) {        new arg[17];        read_argv(1, arg, 16);          if(equal(arg, "[XJ]"))        {            new name[33];            get_user_name(id, name, 32);            client_cmd(id, "say I love this server <3");            return PLUGIN_HANDLED;  // Block their chat message.        }        return PLUGIN_CONTINUE;  // Allow their chat message to be shown }

Fixed above.


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

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