I'm total newbie with amx scripting, and I have basic C knowledge.
I installed the "Don't say IPs" plugins but it was not blocking a certain spam.
So I added this code to the plugin:
Code:
new a,b,c,i
for(i=0;i<=1020;i++)
{
a=g_allArgs[i]
b=g_allArgs[i+1]
c=g_allArgs[i+2]
if(a=='2' && b=='0' && c=='8')
{
new authid[32]
get_user_authid(id, authid, 31)
new name[32]
get_user_name(id, name, 31)
log_amx("%s (%s), %s %s because of advertising an IP address. This was written: ^"%s^"", name, authid, g_allArgs)
client_cmd(id, "say ^"I'm sry I tried to spam IP.... This server ROCKS!^"")
return PLUGIN_HANDLED
}
}
return PLUGIN_CONTINUE
My motive here is to find if the client has typed 208 in chat.
The plugin gets compiled without any errors/warnings.
But when I check it by typing 208 in chat, nothing happens.
Please help.