Raised This Month: $51 Target: $400
 12% 

Improve Autobuy bug fixer?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kbr
Member
Join Date: Sep 2011
Old 06-15-2012 , 08:25   Improve Autobuy bug fixer?
Reply With Quote #1

Here i have the autobuy bug fixer, is there a way to improve it by telling everybody in the server with a large coloured message when someone is trying to crash the server by using this bug?

I'm sure if something like this happens, lammers won't try it again...

PHP Code:
#include <amxmodx>

#define PLUGIN_NAME    "Fix AutoBuy Bug"
#define PLUGIN_VERSION    "1.1"
#define PLUGIN_AUTHOR    "PomanoB & UFPS.Team"

new g_logfile[64]

public 
plugin_init( )
{
    
register_pluginPLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR )

    
register_clcmd"cl_setautobuy""cmd_check" )
    
register_clcmd"cl_setrebuy""cmd_check" )

    
get_time "autobuy_%Y%m.log"g_logfilecharsmax g_logfile ) )
}

public 
plugin_cfg() 

    if(
is_plugin_loaded("Pause Plugins") > -1
        
server_cmd("amx_pausecfg add ^"Fix AutoBuy Bug^""); 
}

public 
cmd_checkid )
{
    static 
arg[512], argsi
    args 
read_argc( )

    for( 
1args; ++)
    {
        
read_argviargcharsmaxarg ) )

        if( 
is_cmd_longargcharsmaxarg ) ) )
        {
            
log_autobuyid )
            return 
PLUGIN_HANDLED
        
}
    }

    return 
PLUGIN_CONTINUE
}

stock bool:is_cmd_longstring[], const len )
{
    static 
cmd[512]

    while( 
strlen( string ) )
    {
        
strtokstringcmdcharsmaxcmd ), stringlen ' ')

        if( 
strlencmd ) > 31 ) return true
    
}

    return 
false
}

stock log_autobuyid )
{
    static 
name[32], steamid[44], ip[16]
    
get_user_ipidipcharsmaxip ), )
    
get_user_authididsteamidcharsmaxsteamid ) )
    
get_user_nameidnamecharsmaxname ) )

    
log_to_fileg_logfile"AutoBuyBug used by: %s [%s] [%s]"nameipsteamid )
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang3082\\ f0\\ fs16 \n\\ par }
*/ 

Last edited by kbr; 06-15-2012 at 08:28.
kbr is offline
DreamWorks
Senior Member
Join Date: Mar 2012
Old 06-15-2012 , 09:59   Re: Improve Autobuy bug fixer?
Reply With Quote #2

Here you go ;)
PHP Code:
#include <amxmodx>

#define PLUGIN_NAME    "Fix AutoBuy Bug"
#define PLUGIN_VERSION    "1.1"
#define PLUGIN_AUTHOR    "PomanoB & UFPS.Team"

new g_logfile[64]

public 
plugin_init( )
{
    
register_pluginPLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR )

    
register_clcmd"cl_setautobuy""cmd_check" )
    
register_clcmd"cl_setrebuy""cmd_check" )

    
get_time "autobuy_%Y%m.log"g_logfilecharsmax g_logfile ) )
}

public 
plugin_cfg() 

    if(
is_plugin_loaded("Pause Plugins") > -1
        
server_cmd("amx_pausecfg add ^"Fix AutoBuy Bug^""); 
}

public 
cmd_checkid )
{
    static 
arg[512], argsi
    args 
read_argc( )

    for( 
1args; ++)
    {
        
read_argviargcharsmaxarg ) )

        if( 
is_cmd_longargcharsmaxarg ) ) )
        {
            
log_autobuyid )
            return 
PLUGIN_HANDLED
        
}
    }

    return 
PLUGIN_CONTINUE
}

stock bool:is_cmd_longstring[], const len )
{
    static 
cmd[512]

    while( 
strlen( string ) )
    {
        
strtokstringcmdcharsmaxcmd ), stringlen ' ')

        if( 
strlencmd ) > 31 ) return true
    
}

    return 
false
}

stock log_autobuyid )
{
    static 
name[32], steamid[44], ip[16]
    
get_user_ipidipcharsmaxip ), )
    
get_user_authididsteamidcharsmaxsteamid ) )
    
get_user_nameidnamecharsmaxname ) )


    
set_hudmessage(255000.600.6026.012.00.10.52)
    
show_hudmessage(0"%s is using Autobuy ! Get lost lammer"name

    
log_to_fileg_logfile"AutoBuyBug used by: %s [%s] [%s]"nameipsteamid )

DreamWorks is offline
kbr
Member
Join Date: Sep 2011
Old 06-16-2012 , 03:53   Re: Improve Autobuy bug fixer?
Reply With Quote #3

Quote:
Originally Posted by DreamWorks View Post
Here you go ;)
PHP Code:
#include <amxmodx>

#define PLUGIN_NAME    "Fix AutoBuy Bug"
#define PLUGIN_VERSION    "1.1"
#define PLUGIN_AUTHOR    "PomanoB & UFPS.Team"

new g_logfile[64]

public 
plugin_init( )
{
    
register_pluginPLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR )

    
register_clcmd"cl_setautobuy""cmd_check" )
    
register_clcmd"cl_setrebuy""cmd_check" )

    
get_time "autobuy_%Y%m.log"g_logfilecharsmax g_logfile ) )
}

public 
plugin_cfg() 

    if(
is_plugin_loaded("Pause Plugins") > -1
        
server_cmd("amx_pausecfg add ^"Fix AutoBuy Bug^""); 
}

public 
cmd_checkid )
{
    static 
arg[512], argsi
    args 
read_argc( )

    for( 
1args; ++)
    {
        
read_argviargcharsmaxarg ) )

        if( 
is_cmd_longargcharsmaxarg ) ) )
        {
            
log_autobuyid )
            return 
PLUGIN_HANDLED
        
}
    }

    return 
PLUGIN_CONTINUE
}

stock bool:is_cmd_longstring[], const len )
{
    static 
cmd[512]

    while( 
strlen( string ) )
    {
        
strtokstringcmdcharsmaxcmd ), stringlen ' ')

        if( 
strlencmd ) > 31 ) return true
    
}

    return 
false
}

stock log_autobuyid )
{
    static 
name[32], steamid[44], ip[16]
    
get_user_ipidipcharsmaxip ), )
    
get_user_authididsteamidcharsmaxsteamid ) )
    
get_user_nameidnamecharsmaxname ) )


    
set_hudmessage(255000.600.6026.012.00.10.52)
    
show_hudmessage(0"%s is using Autobuy ! Get lost lammer"name

    
log_to_fileg_logfile"AutoBuyBug used by: %s [%s] [%s]"nameipsteamid )

Thnaks! it's perfect
kbr is offline
Reply



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 08:47.


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