Long jump / Super salto
#1
Hola, hay algun plugin para hacer un "long jump" como en half life presionando ctrl + espacio? El unico que encontré fue este pero el salto ocurre siempre que presiono espacio y no al agacharme y saltar(no se puede saltar normal) https://forums.alliedmods.net/showthread.php?t=49466
Responder
#2
https://github.com/R00Ki3/amxx-longjump-...ngjump.sma

Responder
#3
(26/02/2021, 03:21 PM)Skylar escribió: https://github.com/R00Ki3/amxx-longjump-...ngjump.sma

No funciona, salto y no pasa nada
Responder
#4
Código PHP:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

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

#define m_afButtonPressed 246
#define m_Activity 73
#define m_IdealActivity 74

#define PLAYER_SUPERJUMP 7
#define ACT_LEAP 8

new Float:g_flTimer[33]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Player_Jump"player""Player_Jump")
    
// Add your code here...
}

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
    
    
static afButtonPressed afButtonPressed get_pdata_int(idm_afButtonPressed)
    
    if( !
FBitSet(afButtonPressedIN_JUMP) || !FBitSet(iFlagsFL_ONGROUND) )
        return 
HAM_IGNORED
    
    
if((entity_get_int(idEV_INT_bInDuck) || iFlags FL_DUCKING)
    && 
entity_get_int(idEV_INT_button) & IN_DUCK
    
&& entity_get_int(idEV_INT_flDuckTime))
    {
        static 
Float:fVecTemp[3]
        
entity_get_vector(idEV_VEC_velocityfVecTemp)
        if( 
vector_length(fVecTemp) > 50.0 )
        {
            new 
Float:flCurrentTime get_gametime();
            
            if((
g_flTimer[id] > flCurrentTime))
            {
                
client_print(idprint_chat,"[amxmodx-es] Tienes que esperar %0.2f segundos para volver a saltar.", (g_flTimer[id] - flCurrentTime) );
                return 
HAM_IGNORED;
            }
            
            new 
Float:timejump
            
            timejump 
9.0
            
            g_flTimer
[id] = flCurrentTime timejump;
            
            
            
entity_get_vector(idEV_VEC_punchanglefVecTemp)
            
fVecTemp[0] = -5.0
            entity_set_vector
(idEV_VEC_punchanglefVecTemp)


            
get_global_vector(GL_v_forwardfVecTemp)
            
fVecTemp[0] *= 700.0
            fVecTemp
[1] *= 700.0
            fVecTemp
[2] = 299.33259094191531084669989858532
            
            entity_set_vector
(idEV_VEC_velocityfVecTemp)
            
            
set_pdata_int(idm_ActivityACT_LEAP)
            
set_pdata_int(idm_IdealActivityACT_LEAP)
            
            
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_JUMP)
            return 
HAM_SUPERCEDE
        
}
    }
    return 
HAM_IGNORED


avisame si te sirve perro
Responder
#5
Dedo arriba 
(27/02/2021, 04:20 PM)AGustiN escribió:
Código PHP:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

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

#define m_afButtonPressed 246
#define m_Activity 73
#define m_IdealActivity 74

#define PLAYER_SUPERJUMP 7
#define ACT_LEAP 8

new Float:g_flTimer[33]

public 
plugin_init() {
 
register_plugin(PLUGINVERSIONAUTHOR)
 
RegisterHam(Ham_Player_Jump"player""Player_Jump")
 
// Add your code here...
}

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
 
 
static afButtonPressed afButtonPressed get_pdata_int(idm_afButtonPressed)
 
 if( !
FBitSet(afButtonPressedIN_JUMP) || !FBitSet(iFlagsFL_ONGROUND) )
 return 
HAM_IGNORED
 
 
if((entity_get_int(idEV_INT_bInDuck) || iFlags FL_DUCKING)
 && 
entity_get_int(idEV_INT_button) & IN_DUCK
 
&& entity_get_int(idEV_INT_flDuckTime))
 {
 static 
Float:fVecTemp[3]
 
entity_get_vector(idEV_VEC_velocityfVecTemp)
 if( 
vector_length(fVecTemp) > 50.0 )
 {
 new 
Float:flCurrentTime get_gametime();
 
 if((
g_flTimer[id] > flCurrentTime))
 {
 
client_print(idprint_chat,"[amxmodx-es] Tienes que esperar %0.2f segundos para volver a saltar.", (g_flTimer[id] - flCurrentTime) );
 return 
HAM_IGNORED;
 }
 
 new 
Float:timejump
 
 timejump 
9.0
 
 g_flTimer
[id] = flCurrentTime timejump;
 
 
 
entity_get_vector(idEV_VEC_punchanglefVecTemp)
 
fVecTemp[0] = -5.0
 entity_set_vector
(idEV_VEC_punchanglefVecTemp)


 
get_global_vector(GL_v_forwardfVecTemp)
 
fVecTemp[0] *= 700.0
 fVecTemp
[1] *= 700.0
 fVecTemp
[2] = 299.33259094191531084669989858532
 
 entity_set_vector
(idEV_VEC_velocityfVecTemp)
 
 
set_pdata_int(idm_ActivityACT_LEAP)
 
set_pdata_int(idm_IdealActivityACT_LEAP)
 
 
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_JUMP)
 return 
HAM_SUPERCEDE
 
}
 }
 return 
HAM_IGNORED


avisame si te sirve perro

Listo si funciona, gracias
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)