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

[REQ] Cmd Bunny Hop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mohamedmd7
Senior Member
Join Date: Jan 2014
Location: Morocco
Old 03-27-2014 , 18:26   [REQ] Cmd Bunny Hop
Reply With Quote #1

I want New Cmd ( Say /unbhop)

If You Say /unbhop
be delete just For you The Bunny Hop

And be available for all ( Players - Admins )

PHP Code:
#include <amxmodx>
#include <engine> 
#include <amxmisc>

#define    FL_WATERJUMP    (1<<11)
#define    FL_ONGROUND    (1<<9)

new iCrashiLASTibslol;
new 
g_bunny[33]
new 
bool:has_bhop[33]

public 
plugin_init() 
{

    
register_concmd("amx_bhop","cmd_givebhop",ADMIN_BAN,"Give bunny")
    
register_concmd("amx_unbhop","cmd_takebhop",ADMIN_BAN,"Remove it")
    
}

public 
client_connect(id)
{

    if(
get_user_flags(id) & ADMIN_BAN)
    {
                
has_bhop[id]=true
        
//g_bunny[id] = 0
    
}

        if(
has_bhop[id])
        {
        
g_bunny[id] = 0
        
}
}

public 
cmd_givebhop(id,level,cid)
{
    if( 
get_user_flags(id) & ADMIN_BAN )
    {

    new 
arg1[32]
    
read_argv(1,arg1,31)

    new 
target cmd_target(id,arg1,9)
    if(!
target)
    {
        return 
PLUGIN_HANDLED
    
}

    new 
name[32]
    
get_user_name(target,name,31)

            if(
has_bhop[target])
            {
                
console_print(id,"[DG] %s already has bunny",name)
            }
            else
            {
                
has_bhop[target]=true
                                g_bunny
[id] = 0
                console_print
(id,"[DG] %s has been given bunny",name)
                
client_print(target,print_chat,"[DG] BunnyHop Enabled! ")
            }

}
        

    return 
PLUGIN_HANDLED
}

public 
cmd_takebhop(id,level,cid)
{
    if( 
get_user_flags(id) & ADMIN_BAN )
    {


    new 
arg1[32]
    
read_argv(1,arg1,31)

    new 
target cmd_target(id,arg1,9)
    if(!
target)
    {
        return 
PLUGIN_HANDLED
    
}

    new 
name[32]
    
get_user_name(target,name,31)

            if(!
has_bhop[target])
            {
                
console_print(id,"[DG] %s Don't have bunny",name)
            }
            else
            {
                
has_bhop[target]=false
                                g_bunny
[id] = 1
                console_print
(id,"[DG] %s Bunny hop removed",name)
                
client_print(target,print_chat,"[DG] BunnyHop REMOVED! ")
            }

         }
        

    return 
PLUGIN_HANDLED
}

public 
cmdBunny(id)
{
  if(!
get_user_flags(id) & ADMIN_BAN || !has_bhop[id])
  {
  return 
PLUGIN_HANDLED
  
}

  
g_bunny[id] = g_bunny[id]
  return 
PLUGIN_CONTINUE
}

public 
client_PreThink(id)
{
        if(
get_user_flags(id) & ADMIN_BAN || has_bhop[id]) 
        {  

               
entity_set_floatidEV_FL_fuser20.0)

               if ( 
entity_get_int(idEV_INT_button) & )
               {
               new 
flags entity_get_int(idEV_INT_flags)

               if (
flags FL_WATERJUMP)
               return
               if ( 
entity_get_int(idEV_INT_waterlevel) >= )
               return
               if ( !(
flags FL_ONGROUND) )
               return

               new 
Float:vecVelocity[3];
               
entity_get_vector(idEV_VEC_velocityvecVelocity)
               
vecVelocity[0] *= 4.53
               vecVelocity
[1] *= 4.53
               vecVelocity
[2] += 450.0
               entity_set_vector
(idEV_VEC_velocityvecVelocity);

               
entity_set_int(idEV_INT_gaitsequence6);
     }
}


}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1036{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
mohamedmd7 is offline
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 03-28-2014 , 01:29   Re: [REQ] Cmd Bunny Hop
Reply With Quote #2

That awkward moment u hid the author registering part cuz u have it set to ur name ?
__________________
Battousai-sama is offline
Send a message via MSN to Battousai-sama
mohamedmd7
Senior Member
Join Date: Jan 2014
Location: Morocco
Old 03-28-2014 , 09:26   Re: [REQ] Cmd Bunny Hop
Reply With Quote #3

If You Say /unbhop be delete just For you The Bunny Hop
mohamedmd7 is offline
Old 03-28-2014, 10:05
Spawner30
This message has been deleted by YamiKaitou. Reason: spam
Seth26
BANNED
Join Date: Dec 2012
Location: California, CT
Old 03-28-2014 , 10:37   Re: [REQ] Cmd Bunny Hop
Reply With Quote #4

Not tested.

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

#define    FL_WATERJUMP    (1<<11)    
#define    FL_ONGROUND    (1<<9)    

new boolonoff[33];

public 
plugin_init() {
    
register_plugin("Super Bunny Hopper""1.2""Cheesy Peteza, MYTH")
    
register_cvar("sbhopper_version""1.2"FCVAR_SERVER)

    
register_cvar("bh_enabled""1")
    
register_cvar("bh_autojump""1")
    
register_cvar("bh_showusage""1")
    
register_clcmd("say /bhop""bhoponoff")
}

public 
client_PreThink(id) {
    if(
onoff[id])
        return 
PLUGIN_CONTINUE

    
if (!get_cvar_num("bh_enabled"))
        return 
PLUGIN_CONTINUE

    entity_set_float
(idEV_FL_fuser20.0)     

    if (!
get_cvar_num("bh_autojump"))
        return 
PLUGIN_CONTINUE

// Code from CBasePlayer::Jump (player.cpp)      
    
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
}

public 
client_authorized(id)
    
set_task(300.0"showUsage"id)

public 
showUsage(id) {
    if ( !
get_cvar_num("bh_enabled") || !get_cvar_num("bh_showusage") )
        return 
PLUGIN_HANDLED

    
if ( !get_cvar_num("bh_autojump") ) {
        
client_print(idprint_chat"[DG] BunnyHop Enabled! Just hold space button.")
    } else {
        
client_print(idprint_chat"[DG] BunnyHop Enabled! Just hold space button.")
    }
    return 
PLUGIN_HANDLED
}

public 
bhoponoff(id){
    
onoff[id] = onoff[id] ? false true;


Last edited by Seth26; 03-28-2014 at 10:39.
Seth26 is offline
Seth26
BANNED
Join Date: Dec 2012
Location: California, CT
Old 03-28-2014 , 10:45   Re: [REQ] Cmd Bunny Hop
Reply With Quote #5

Another my plugin:

PHP Code:
#include <amxmodx>
#include <engine>
 
#define    FL_WATERJUMP    (1<<11)    
#define    FL_ONGROUND    (1<<9)    
new bool:bhoponoff[33]
public 
plugin_init() {
    
register_plugin("Super Bunny Hopper""1.2""Cheesy Peteza, MYTH")
    
register_cvar("sbhopper_version""1.2"FCVAR_SERVER)
    
register_clcmd("say /bhopon""bhopon")
    
register_clcmd("say /bhopoff""bhopoff")
    
register_cvar("bh_enabled""1")
    
register_cvar("bh_autojump""1")
    
register_cvar("bh_showusage""1")
}
public 
bhopon(id)
{
    
set_task(5.0"bekapcs"id)
    
set_hudmessage(02550, -1.0, -1.006.05.0)
    
show_hudmessage(id"Bhop [5] seconds and active")
 
}
public 
client_connect(id)
{
    
bhoponoff[id] = false
}
public 
bekapcs(id)
{
    
bhoponoff[id] = true
}
public 
bhopoff(id)
{
    
bhoponoff[id] = false
}
public 
client_PreThink(id) {
if(
bhoponoff[id] == true)
{
 
    if (!
get_cvar_num("bh_enabled"))
        return 
PLUGIN_CONTINUE
 
    entity_set_float
(idEV_FL_fuser20.0)        // Disable slow down after jumping
 
    
if (!get_cvar_num("bh_autojump"))
        return 
PLUGIN_CONTINUE
 
// Code from CBasePlayer::Jump (player.cpp)        Make a player jump automatically
    
if (entity_get_int(idEV_INT_button) & 2) {    // If holding jump
        
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)    // Play the Jump Animation
    
}
 
}
    return 
PLUGIN_CONTINUE
}
 
public 
client_authorized(id)
    
set_task(180.0"showUsage"id)
 
public 
showUsage(id) {
    if ( !
get_cvar_num("bh_enabled") || !get_cvar_num("bh_showusage") )
        return 
PLUGIN_HANDLED
 
    
if ( !get_cvar_num("bh_autojump") ) {
        
client_print(idprint_chat"[AMX] Bunny hopping is enabled on this server. You will not slow down after jumping.")
    } else {
        
client_print(idprint_chat"[AMX] Auto bunny hopping is enabled on this server. Just hold down jump to bunny hop.")
    }
    return 
PLUGIN_HANDLED


Last edited by Seth26; 03-28-2014 at 10:45.
Seth26 is offline
MYTH.USA
BANNED
Join Date: Mar 2014
Location: Los Angeles
Old 03-28-2014 , 11:40   Re: [REQ] Cmd Bunny Hop
Reply With Quote #6

Quote:
Originally Posted by Seth26 View Post
Another my plugin:

PHP Code:
#include <amxmodx>
#include <engine>
 
#define    FL_WATERJUMP    (1<<11)    
#define    FL_ONGROUND    (1<<9)    
new bool:bhoponoff[33]
public 
plugin_init() {
    
register_plugin("Super Bunny Hopper""1.2""Cheesy Peteza, MYTH")
    
register_cvar("sbhopper_version""1.2"FCVAR_SERVER)
    
register_clcmd("say /bhopon""bhopon")
    
register_clcmd("say /bhopoff""bhopoff")
    
register_cvar("bh_enabled""1")
    
register_cvar("bh_autojump""1")
    
register_cvar("bh_showusage""1")
}
public 
bhopon(id)
{
    
set_task(5.0"bekapcs"id)
    
set_hudmessage(02550, -1.0, -1.006.05.0)
    
show_hudmessage(id"Bhop [5] seconds and active")
 
}
public 
client_connect(id)
{
    
bhoponoff[id] = false
}
public 
bekapcs(id)
{
    
bhoponoff[id] = true
}
public 
bhopoff(id)
{
    
bhoponoff[id] = false
}
public 
client_PreThink(id) {
if(
bhoponoff[id] == true)
{
 
    if (!
get_cvar_num("bh_enabled"))
        return 
PLUGIN_CONTINUE
 
    entity_set_float
(idEV_FL_fuser20.0)        // Disable slow down after jumping
 
    
if (!get_cvar_num("bh_autojump"))
        return 
PLUGIN_CONTINUE
 
// Code from CBasePlayer::Jump (player.cpp)        Make a player jump automatically
    
if (entity_get_int(idEV_INT_button) & 2) {    // If holding jump
        
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)    // Play the Jump Animation
    
}
 
}
    return 
PLUGIN_CONTINUE
}
 
public 
client_authorized(id)
    
set_task(180.0"showUsage"id)
 
public 
showUsage(id) {
    if ( !
get_cvar_num("bh_enabled") || !get_cvar_num("bh_showusage") )
        return 
PLUGIN_HANDLED
 
    
if ( !get_cvar_num("bh_autojump") ) {
        
client_print(idprint_chat"[AMX] Bunny hopping is enabled on this server. You will not slow down after jumping.")
    } else {
        
client_print(idprint_chat"[AMX] Auto bunny hopping is enabled on this server. Just hold down jump to bunny hop.")
    }
    return 
PLUGIN_HANDLED

Hey bro. Thanks for share, Pm me now dude.
MYTH.USA 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 07:25.


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