Raised This Month: $ Target: $400
 0% 

Overflowing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-19-2012 , 16:09   Re: Overflowing
Reply With Quote #6

Again, the method is not efficient, but if you still want to use i you can use my old plugin.
Add all cvars in a file, pay attention to not put 2 cvars twice.

Quote:
Originally Posted by amxmodx/configs/hacks_prefixes.ini
"kzh_bhop"
"zhy_bhop"
"kyk_bhop"
"kxk_bhop"
"xhz_bhop"
"yhz_bhop"
"v0n_bhop"
"xyz_bhop"
"kid_bhop"
"fpt_bhop"
"fuh_bhop"
"omg_bhop"
"voo_bhop"
"xHack_bhop"
"xKz_bhop"
"xkz_bhop"
"001_bhop"
"002_bhop"
"Trk_bhop"
"m3c_bhop"
"m4c_bhop"
"zhyk_bhop"
"xcfgbhop"
"zhe_bhop"
"^^_^^<bhop"
"n1k<bhop"
"nkz_bhop"
"nik_bhop"
"str_bhop"
"vip_bhop"
"xhack_bhop"
etc...


PHP Code:
#include <amxmodx>

#define VERSION "0.0.1"
#define PLUGIN "KZH Checker"

enum _:playerTasks ( += 33 )
{
    
CVAR_CHECKER,
    
}

new 
g_szFirstCvar[32]
new 
Trie:g_tNextCvar
new g_pCvarBanTime

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
g_pCvarBanTime register_cvar("kz_hack_bantime""0")

    new 
szCvarsFile[128], szOldCvar[32], szNewCvar[32]
    
get_localinfo("amxx_configsdir"szCvarsFilecharsmax(szCvarsFile))
    
add(szCvarsFilecharsmax(szCvarsFile), "/hacks_prefixes.ini")
    new 
fp fopen(szCvarsFile"rt")
    if( 
fp && file_size(szCvarsFile1) >= )
    {
        
g_tNextCvar TrieCreate()
        while( !
feof(fp) )
        {
            
fgets(fpszNewCvarcharsmax(szNewCvar))
            
trimszNewCvar )
            
remove_quotesszNewCvar )
            if( 
szOldCvar[0] && TrieKeyExists(g_tNextCvarszOldCvar) )
            {
                
TrieSetString(g_tNextCvarszOldCvarszNewCvar)
            }
            else
            {
                
copy(g_szFirstCvarcharsmax(g_szFirstCvar), szNewCvar)
            }
            
copy(szOldCvarcharsmax(szOldCvar), szNewCvar)
        }
        
TrieSetString(g_tNextCvarszOldCvarg_szFirstCvar)
    }
    if( 
fp )
    {
        
fclosefp )
    }
}

public 
client_putinserverid )
{
    
remove_task(id CVAR_CHECKER)
    if( !
is_user_bot(id) && !is_user_hltv(id) )
    {
        if( 
g_tNextCvar )
        {
            
set_task(0.1"Task_CheckCheatCvar"id CVAR_CHECKER)
        }
    }
}

public 
Task_CheckCheatCvar(id)
{
    
id %= 33
    
if( is_user_connected(id) )
    {
        
query_client_cvar(idg_szFirstCvar"ClientCvarResult")
    }
}

public 
ClientCvarResult(id, const szCvar[], const szValue[])
{
    if( 
is_user_connected(id) )
    {
        if( 
szValue[0] != 'B' )
        {
            new 
szName[32], szAuthid[32], szReason[14]
            if( 
equal(szCvar"kzh"3) )
            {
                
szReason "KZHack"
            
}
            else
            {
                
szReason "KZHack Custom"
            
}

            
get_user_name(idszNamecharsmax(szName))
            
get_user_authid(idszAuthidcharsmax(szAuthid))

            
server_cmd("amx_ban ^"%s^" %d ^"%s^""szAuthidget_pcvar_num(g_pCvarBanTime), szReason)
        }
        static 
szNextCvar[9]
        if( 
TrieGetString(g_tNextCvarszCvarszNextCvarcharsmax(szNextCvar)) )
        {
            
query_client_cvar(idszNextCvar"ClientCvarResult")
        }
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 06:11.


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