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

Bunnyhop for client with say command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BnO.Kit
Junior Member
Join Date: Sep 2009
Old 11-27-2010 , 10:42   Bunnyhop for client with say command
Reply With Quote #1

Hello, it's my first post, hello guys :B
Please, i want a plugin when the client say /ON turns ON the BUNNYHOP for him, and when he say /OFF turns OFF the BUNNYHOP for him.
One could do this for me please?
BnO.Kit is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 11-27-2010 , 12:28   Re: Bunnyhop for client with say command
Reply With Quote #2

PHP Code:

#include <amxmodx>
#include <engine>

#define    FL_WATERJUMP    (1<<11)    // player jumping out of water
#define    FL_ONGROUND    (1<<9)    // At rest / on the ground

new bool:bhopOn[33];

public 
plugin_init() {
    
register_plugin("Super Bunny Hopper""1.2""Cheesy Peteza")
    
register_cvar("sbhopper_version""1.2"FCVAR_SERVER)
    
    
register_clcmd"say /on""itsOn" );
    
register_clcmd"say /off""itsOff" );
}

public 
itsOnid )
{
    if( 
bhopOn[id] )
    {
        
client_printidprint_chat"Auto bhop is already on for you!" );
        return 
PLUGIN_HANDLED;
    }
    
    
bhopOn[id] = true;
    
    new 
name[32];
    
get_user_nameidname31 );
    
client_print0print_chat"%s has turned on auto bunnyhop!"name );
    return 
PLUGIN_HANDLED;
}

public 
itsOffid )
{
    if( !
bhopOn[id] )
    {
        
client_printidprint_chat"Auto bhop is already off for you!" );
        return 
PLUGIN_HANDLED;
    }
    
    
bhopOn[id] = false;
    
    
client_printidprint_chat"You have successfully turned auto bhop off." );
    return 
PLUGIN_HANDLED;
}

public 
client_PreThink(id
{
    
    if( !
bhopOn[id] )
        return 
PLUGIN_HANDLED;
    
    
entity_set_float(idEV_FL_fuser20.0)
    
    if (
entity_get_int(idEV_INT_button) & 2
    {
        new 
flags entity_get_int(idEV_INT_flags)
        
        if (
flags FL_WATERJUMP)
            return 
PLUGIN_CONTINUE
        
if ( entity_get_int(idEV_INT_waterlevel) >= )
            return 
PLUGIN_CONTINUE
        
if ( !(flags FL_ONGROUND) )
            return 
PLUGIN_CONTINUE
        
        
new Float:velocity[3]
        
entity_get_vector(idEV_VEC_velocityvelocity)
        
velocity[2] += 250.0
        entity_set_vector
(idEV_VEC_velocityvelocity)
        
        
entity_set_int(idEV_INT_gaitsequence6)
    }
    return 
PLUGIN_CONTINUE

^CheesyPeteza's bunnyhop plugin.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
BnO.Kit
Junior Member
Join Date: Sep 2009
Old 11-27-2010 , 14:38   Re: Bunnyhop for client with say command
Reply With Quote #3

man! thank u so much
BnO.Kit 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:13.


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