Thread: no bhop scripts
View Single Post
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-04-2007 , 01:49   Re: no bhop scripts
Reply With Quote #4

i made this one for my hns server and works nicely =]
it bans them for 30 minutes.

PHP Code:
#include <amxmodx>
#include <fakemeta>

new gBhopCmd[32];

public 
plugin_init()
{
    
register_plugin("No Bhop Scripts""1.0""Exolent");
    
register_forward(FM_PlayerPreThink"fm_PreThink");
    
formatex(gBhopCmd31"plop%d%d%d"random_num(099), random_num(099), random_num(099));
    
register_clcmd(gBhopCmd"script_detected");
}

public 
fm_PreThink(id)
{
    if(
is_user_alive(id))
    {
        if(!(
pev(idpev_flags) & FL_ONGROUND) && (!(pev(idpev_button) & IN_JUMP) || pev(idpev_oldbuttons) & IN_JUMP))
        {
            
client_cmd(id";alias _special %s"gBhopCmd);
        }
    }
}

public 
script_detected(id)
{
    if(!(
pev(idpev_flags) & FL_ONGROUND) && (!(pev(idpev_button) & IN_JUMP) || pev(idpev_oldbuttons) & IN_JUMP))
    {
        new 
name[32], authid[32];
        
get_user_name(idname31);
        
get_user_authid(idauthid31);
        new 
userid get_user_userid(id);
        
client_print(0print_chat"[AMXX] Bhop Script detected on %s! (30 min. ban)"name);
        
server_cmd("kick #%d ^"No bhop scripts allowed.^"; wait; banid 30 ^"%s^"; wait; writeid"useridauthid);
    }

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline