Hi... How can I make the plugin so.. it doesn't show the message if it contains "," and "." ?? Here's the code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Block symbols"
#define VERSION "1.0"
#define AUTHOR "SpeeD"
new const g_prefix[] = "[NoSymbolS]"
new const symbols[] =
{
",",
"."
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say","handle_say")
register_clcmd("say_team","handle_say")
}
public handle_say(id)
{
new arg[256]
read_args(arg,255)
remove_quotes(arg)
trim(arg)
if(arg[0] =='^0' || !strlen(arg)) return PLUGIN_HANDLED
for(new i=0;i<charsmax(symbols);i++)
if(containi(arg,symbols[i]) != -1)
{
client_print_color(id,print_chat,"^4[ZP] ^1Your message cannot contain ^"^4,^1^" and ^"^4.^1^" symbols!",g_prefix)
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
__________________