Raised This Month: $ Target: $400
 0% 

[Problem] Anti-Spam Lite (Edited version) BUG


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 05-10-2015 , 06:58   Re: [Problem] Anti-Spam Lite (Edited version) BUG
Reply With Quote #5

This is my fast edit :

Code:
#include <amxmodx> #include <amxmisc> #define skipOthers(%0)   ( is_user_bot(%0) || is_user_hltv(%0) || is_user_admin(%0) ) /*  Equal is the same as cotain so it could be like this also     ( contain( string , %0 )  != 0x01) ... */ #define isEqual(%0)   contain(  string , %0 ) // remember that its declare by the name of string public plugin_init() {     register_plugin( "Anti ..." , "0.1" , "Freezo" )         register_clcmd( "say" , "hookSay")     register_clcmd( "say_team" , "hookSay")     } public client_infochanged( id ) {         if ( skipOthers(id) ) return 1         if (_IsValid( getUsername(id) ) )   server_cmd ("kick #%d Disallowed nickname!" , get_user_userid(id) )         return 0     } public client_putinserver( id ){         if( skipOthers(id) ) return 1         if (_IsValid( getUsername(id) ) ) server_cmd ("kick #%d Disallowed nickname!" , get_user_userid(id) )         set_task ( 20.0 , "showWarnings" , id )     return 0 } public hookSay( id ){     new args[ 168 ]     read_args(  args , charsmax(args) )         if( _IsValid( args ) ) return 1     return 0 } public showWarnings( id ) client_print ( id , print_chat , "Advertising other servers or websites is strictly prohibited!") stock bool:_IsValid( const string[] ) {         for (new i = 0; string[i] ; i++ ){         if ( ('0' <= string[i] <= '9') && ( spaceCheck( string ) || ~isEqual(".") || ~isEqual(",") || ~isEqual("-") ) ){             return true         }     }     return false } stock bool:spaceCheck ( const string[] ){     new a     while (  a < strlen ( string ) ){         if (string[a++] == ' ') return true     }       return false } stock getUsername( index ){     new szName[32]     get_user_name ( index , szName , charsmax ( szName ))         return szName }
Freezo Begin 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 20:05.


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