Raised This Month: $ Target: $400
 0% 

word 3x in a row


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 01-09-2011 , 10:52   Re: word 3x in a row
Reply With Quote #5

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 
cmdSayid ) {
    new 
message[256];
    
read_argsmessagecharsmaxmessage ) );

    if( 
equalmessagegSavedSay[id] ) ) {
        
gAmountSame[id]++;
        
        if( 
gAmountSame[id] > 2  ) {
            new 
name[32]; get_user_nameidname31 );
            
            
client_print0print_chat"[Spam] %s has said the same thing 3 times in a row!"name );
        }
    }
    else {
        
gAmountSame[id] = 0
        copy
message255gSavedSay[id] );
    }
    return 
PLUGIN_HANDLED;

__________________
Retired.

Last edited by Xalus; 01-09-2011 at 10:58.
Xalus is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode