
Kod: Tümünü seç
/* Simple plugin to block spam/noise in server by hiding repeated messages. */
#include <amxmodx>
#define NUMOFMESSAGES 9
new messages[NUMOFMESSAGES+1][192]
public plugin_init()
{
register_plugin("Hide Repeated Messages", "0.2", "Ben")
register_clcmd("say", "check_say")
register_clcmd("say_team", "check_say")
}
public check_say(id)
{
new i
for (i=NUMOFMESSAGES; i>0; i--) messages[i] = messages[i-1]
read_args(messages[0], 191)
for (i=1; i<=NUMOFMESSAGES; i++)
if (equal(messages[0], messages[i])) {
console_cmd(id, "spk common/wpn_denyselect.wav")
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}