Quote:
Originally Posted by Natsheh
Show plugin_init
|
Thanks for reply
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "work"
#define VERSION "1.0"
#define AUTHOR "RateX"
new BAD_WORDS[][] =
{
// Add the bad words here. Ex:
"Today is Gang War Day, Given By",
"ass"
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say ", "ChatGlobalCommand")
}
public ChatGlobalCommand(id)
{
static lastsaid[512], said[512]
read_args(said, 512)
if(equal(said, lastsaid))
return PLUGIN_CONTINUE
for(new i = 0; i < sizeof BAD_WORDS; i++)
{
if(containi(said, BAD_WORDS[i]))
replace_all(said, charsmax(said), BAD_WORDS[i], "***")
}
formatex(lastsaid, charsmax(lastsaid), "%s", said)
client_cmd(id, "say %s", said)
return PLUGIN_HANDLED
}