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

SUPER FAST JUMP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
s3rserii
Senior Member
Join Date: Jan 2010
Old 04-10-2011 , 05:48   SUPER FAST JUMP
Reply With Quote #1

Hey,
i need a superjump but i cannot find this in the forum or im to dump du find it sry :/

If you coruch and than jump in crouchposition, then u make a super fast jump forward...
It is with cvar for only CT, T or Booth
and with a timelimit like every 10 second one jump?

can anyone help me? :S

peace
s3rserii is offline
Aykay
Senior Member
Join Date: Jul 2009
Location: Australia
Old 04-10-2011 , 06:32   Re: SUPER FAST JUMP
Reply With Quote #2

This was actually damn fun to play around with.

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

#define PLUGIN "FastJump"
#define VERSION "1.0"
#define AUTHOR "Aykay"

new jump_player[33][2];

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_CmdStart"CmdStart");
    
register_cvar("jump_cooldown""3")  // set this to 0 for unlimited.
    
register_cvar("jump_tallowed""1")
    
register_cvar("jump_ctallowed""1")
}

public 
CmdStart(iduc_handle)
{
    if(!
is_user_alive(id))
        return 
FMRES_IGNORED;
    
    if (( 
cs_get_user_team(id) == CS_TEAM_CT ) && get_cvar_num("jump_ctallowed") == 0)
        return 
FMRES_IGNORED;
        
    if (( 
cs_get_user_team(id) == CS_TEAM_T ) && get_cvar_num("jump_tallowed") == 0)
        return 
FMRES_IGNORED;
        
    new 
button get_uc(uc_handleUC_Buttons);
    new 
flags get_entity_flags(id);
    
    if(
button IN_JUMP && button IN_DUCK && flags FL_ONGROUND && get_gametime() > jump_player[id][1] + get_cvar_num("jump_cooldown"))
    {
        
jump_player[id][1] = floatround(get_gametime());
        new 
Float:velocity[3];
        
VelocityByAim(id700velocity);
        
velocity[2] = random_float(265.0,285.0); //edit velocity here - can be set to a random float <--- or just a float.
        
entity_set_vector(idEV_VEC_velocityvelocity);
    }
    
    return 
FMRES_IGNORED;

__________________

Aykay is offline
Send a message via MSN to Aykay
eskemo
Senior Member
Join Date: Dec 2008
Location: Australia
Old 04-10-2011 , 07:05   Re: SUPER FAST JUMP
Reply With Quote #3

<3 Aykay thanks for script ima use it aswell
__________________


Free Australian FASTDL Server PM ME
eskemo is offline
Aykay
Senior Member
Join Date: Jul 2009
Location: Australia
Old 04-10-2011 , 07:07   Re: SUPER FAST JUMP
Reply With Quote #4

<3
__________________

Aykay is offline
Send a message via MSN to Aykay
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-10-2011 , 07:23   Re: SUPER FAST JUMP
Reply With Quote #5

Better to use this, will save you cpu :

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

#define VERSION "0.0.1"

#define MAX_PLAYERS        32

#define FBitSet(%1,%2)        (%1 & %2)

new g_bSuperJump
#define MarkUserLongJump(%1)    g_bSuperJump |= 1<<(%1 & 31)
#define ClearUserLongJump(%1)    g_bSuperJump &= ~( 1<<(%1 & 31) )
#define HasUserLongJump(%1)        g_bSuperJump &  1<<(%1 & 31)

new g_pCvarMinVelocityg_pCvarPunchAngleg_pCvarLongjumpSpeedg_pCvarZVelocityg_pCvarAllowedTeamsg_pCvarCoolDown

new Float:g_flNextSuperJump[MAX_PLAYERS+1]

public 
plugin_init()
{
    
register_plugin("Super Jump"VERSION"ConnorMcLeod")

    
g_pCvarLongjumpSpeed register_cvar"longjump_speed"       "700" // horizontal speed
    
g_pCvarPunchAngle    register_cvar"longjump_punchangle"  "-5"  // angle effect
    
g_pCvarZVelocity     register_cvar"longjump_zvelocity"   "300" // vertical speed
    
g_pCvarMinVelocity   register_cvar"longjump_minvelocity" "50"  )
    
g_pCvarAllowedTeams  register_cvar"longjump_teams"       "2"   // 0:disabled 1:Ts 2:CTs 3:All
    
g_pCvarCoolDown      register_cvar"longjump_cooldown"    "5.0" )

    
RegisterHam(Ham_Player_Jump"player""Player_Jump")
    
RegisterHam(Ham_Player_Duck"player""Player_Duck")
}

public 
Player_Duck(id)
{
    if( 
HasUserLongJump(id) )
    {
        
ClearUserLongJump(id)
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED
}

public 
Player_Jump(id)
{
    if( !
is_user_alive(id) )
    {
        return 
HAM_IGNORED
    
}

    static 
iFlags iFlags entity_get_int(idEV_INT_flags)

    if( 
FBitSet(iFlagsFL_WATERJUMP) || entity_get_int(idEV_INT_waterlevel) >= )
    {
        return 
HAM_IGNORED
    
}

    const 
XO_PLAYER 5    
    
const m_afButtonPressed 246

    
static afButtonPressed afButtonPressed get_pdata_int(idm_afButtonPressedXO_PLAYER)

    if( !
FBitSet(afButtonPressedIN_JUMP) || !FBitSet(iFlagsFL_ONGROUND) )
    {
        return 
HAM_IGNORED
    
}

    const 
m_iTeam 114
    
new Float:flTime get_gametime()

    if(    (
entity_get_int(idEV_INT_bInDuck) || iFlags FL_DUCKING)
    &&    
get_pcvar_num(g_pCvarAllowedTeams) & get_pdata_int(idm_iTeamXO_PLAYER)
    &&    
g_flNextSuperJump[id] < flTime
    
&&    entity_get_int(idEV_INT_button) & IN_DUCK
    
&&    entity_get_int(idEV_INT_flDuckTime)    )
    {
        
g_flNextSuperJump[id] = flTime get_pcvar_float(g_pCvarCoolDown)
        static 
Float:fVecTemp[3]
        
entity_get_vector(idEV_VEC_velocityfVecTemp)
        if( 
vector_length(fVecTemp) > get_pcvar_float(g_pCvarMinVelocity) )
        {
            const 
m_Activity 73
            
const m_IdealActivity 74

            
const PLAYER_SUPERJUMP 7
            
const ACT_LEAP 8

            entity_get_vector
(idEV_VEC_punchanglefVecTemp)
            
fVecTemp[0] = get_pcvar_float(g_pCvarPunchAngle)
            
entity_set_vector(idEV_VEC_punchanglefVecTemp)

            
get_global_vector(GL_v_forwardfVecTemp)
            static 
Float:flLongJumpSpeed flLongJumpSpeed get_pcvar_float(g_pCvarLongjumpSpeed) * 1.6
            fVecTemp
[0] *= flLongJumpSpeed
            fVecTemp
[1] *= flLongJumpSpeed
            fVecTemp
[2] = get_pcvar_float(g_pCvarZVelocity)

            
entity_set_vector(idEV_VEC_velocityfVecTemp)

            
set_pdata_int(idm_ActivityACT_LEAPXO_PLAYER)
            
set_pdata_int(idm_IdealActivityACT_LEAPXO_PLAYER)
            
MarkUserLongJump(id)

            
entity_set_int(idEV_INT_oldbuttonsentity_get_int(idEV_INT_oldbuttons) | IN_JUMP)

            
entity_set_int(idEV_INT_gaitsequencePLAYER_SUPERJUMP)
            
entity_set_float(idEV_FL_frame0.0)

            
set_pdata_int(idm_afButtonPressedafButtonPressed & ~IN_JUMPXO_PLAYER)
            return 
HAM_SUPERCEDE
        
}
    }
    return 
HAM_IGNORED

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
s3rserii
Senior Member
Join Date: Jan 2010
Old 04-10-2011 , 07:58   Re: SUPER FAST JUMP
Reply With Quote #6

ouu thx for fast post..
i will test this

Last edited by s3rserii; 04-10-2011 at 08:39.
s3rserii is offline
s3rserii
Senior Member
Join Date: Jan 2010
Old 04-10-2011 , 08:39   Re: SUPER FAST JUMP
Reply With Quote #7

nice it works perfekt

"ConnorMcLeod" can u add a hud mssage for the cooldown? :/
s3rserii is offline
Aykay
Senior Member
Join Date: Jul 2009
Location: Australia
Old 04-10-2011 , 08:51   Re: SUPER FAST JUMP
Reply With Quote #8

Ouch, I just got pwned, haha.
__________________

Aykay is offline
Send a message via MSN to Aykay
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-10-2011 , 08:54   Re: SUPER FAST JUMP
Reply With Quote #9

Quote:
Originally Posted by Aykay View Post
Ouch, I just got pwned, haha.
Your code seems to be old, CmdStart is not required and you don't use cvars pointers.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Aykay
Senior Member
Join Date: Jul 2009
Location: Australia
Old 04-10-2011 , 08:56   Re: SUPER FAST JUMP
Reply With Quote #10

Ah okay. I should start using pcvars.

Guess I have some reading to do.
__________________

Aykay is offline
Send a message via MSN to Aykay
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 09:40.


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