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

autobuyfix edit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hypheni
Senior Member
Join Date: Jul 2011
Location: India
Old 07-12-2011 , 11:32   autobuyfix edit
Reply With Quote #1

I use autobuyfix plugin to protect my server from being crashed. Many servers kicks players if they use autobuy bug in their server.

Where to get that plugin and I couldn't find the original sma for editing.
hypheni is offline
Send a message via Skype™ to hypheni
hypheni
Senior Member
Join Date: Jul 2011
Location: India
Old 07-12-2011 , 13:40   Re: autobuyfix edit
Reply With Quote #2

okay. here is the code and modified by me a bit..

Code:
#include <amxmodx> 

#define PLUGIN_NAME      "AutoBuy Fix" 
#define PLUGIN_VERSION   "0.7" 
#define PLUGIN_AUTHOR    "hypheni" 

new g_logfile    [64] 

public plugin_init( ) 
{ 
    register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR ) 
 
    register_clcmd( "cl_setautobuy", "cmd_check" ) 
    register_clcmd( "cl_setrebuy", "cmd_check" ) 

    get_time ( "autobuy_%Y%m.log", g_logfile, charsmax ( g_logfile ) ) 
} 

public cmd_check( id ) 
{ 
    static arg[512], args, i 
    args = read_argc( ) 

    for( i = 1; i < args; ++i ) 
    { 
        read_argv( i, arg, charsmax( arg ) ) 

        if( is_cmd_long( arg, charsmax( arg ) ) ) 
        { 
	    log_autobuy( id, "Autobuy bug use:" ) 
            server_cmd( "kick #%d You FOOL, Don't use autobuy bug to crash server", get_user_userid( id ) ) 
            return PLUGIN_HANDLED
        }  
    } 
    return PLUGIN_CONTINUE 
} 

stock log_autobuy( id, reason[] ) 
{ 
    static name[32], steamid[44], ip[16] 
    get_user_ip( id, ip, charsmax( ip ), 1 ) 
    get_user_authid( id, steamid, charsmax( steamid ) ) 
    get_user_name( id, name, charsmax( name ) ) 

    log_to_file( g_logfile, "%s %s [%s] <%s>", reason, name, ip, steamid ) 
} 

stock bool:is_cmd_long( string[], const len ) 
{ 
    static cmd[512] 

    while( strlen( string ) ) 
    { 
        strtok( string, cmd, charsmax( cmd ), string, len , ' ', 1 ) 

        if( strlen( cmd ) > 31 ) return true 
    } 

    return false 
}

Last edited by hypheni; 07-12-2011 at 13:50.
hypheni is offline
Send a message via Skype™ to hypheni
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 07-13-2011 , 02:50   Re: autobuyfix edit
Reply With Quote #3

PHP Code:
#define PLUGIN_AUTHOR    "hypheni" 
LOL that's not your plugin, it's PamanoB plugin. By the way you can update your hlds to the latest beta hlds to fix 2 new known bug.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
hypheni
Senior Member
Join Date: Jul 2011
Location: India
Old 07-13-2011 , 11:33   Re: autobuyfix edit
Reply With Quote #4

Quote:
Originally Posted by yokomo View Post
PHP Code:
#define PLUGIN_AUTHOR    "hypheni" 
LOL that's not your plugin, it's PamanoB plugin. By the way you can update your hlds to the latest beta hlds to fix 2 new known bug.
Yes I shouldn't modify the original author. All credit goes to him. Just put to maintion that I edited.

Anyways. What are 2 known bugs ?.
hypheni is offline
Send a message via Skype™ to hypheni
vikassharma
BANNED
Join Date: Dec 2011
Location: INDIA
Old 05-27-2013 , 07:23   Re: autobuyfix edit
Reply With Quote #5

Quote:
Originally Posted by hypheni View Post
Yes I shouldn't modify the original author. All credit goes to him. Just put to maintion that I edited.

Anyways. What are 2 known bugs ?.
Epic message lol,
you foll dont try to crash server
vikassharma is offline
hypheni
Senior Member
Join Date: Jul 2011
Location: India
Old 05-27-2013 , 07:48   Re: autobuyfix edit
Reply With Quote #6

^^ LAWL.

You are digging 2 yr old thread. Useless.
hypheni is offline
Send a message via Skype™ to hypheni
vikassharma
BANNED
Join Date: Dec 2011
Location: INDIA
Old 05-27-2013 , 12:20   Re: autobuyfix edit
Reply With Quote #7

Quote:
Originally Posted by hypheni View Post
^^ LAWL.

You are digging 2 yr old thread. Useless.
i did'nt saw that
vikassharma is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 05-28-2013 , 11:51   Re: autobuyfix edit
Reply With Quote #8

Update your server.
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
hypheni
Senior Member
Join Date: Jul 2011
Location: India
Old 05-29-2013 , 01:53   Re: autobuyfix edit
Reply With Quote #9

^^

One more to digg 2 year old thread.
hypheni is offline
Send a message via Skype™ to hypheni
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 12:27.


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