Some fixes,
and added: If he says another word, it saves that..
PHP Code:
#include <amxmodx>
#include <amxmisc>
new gSavedSay[33][256];
new gAmountSame[33];
public plugin_init() {
register_clcmd( "say", "cmdSay" );
register_clcmd( "say_team", "cmdSay" );
}
public cmdSay( id ) {
new message[256];
read_args( message, charsmax( message ) );
if( equal( message, gSavedSay[id] ) ) {
gAmountSame[id]++;
if( gAmountSame[id] > 2 ) {
new name[32]; get_user_name( id, name, 31 );
client_print( 0, print_chat, "[Spam] %s has said the same thing 3 times in a row!", name );
}
}
else {
gAmountSame[id] = 0
copy( message, 255, gSavedSay[id] );
}
return PLUGIN_HANDLED;
}
__________________