Hi I need to change the sequence of the second jump of this plugin
PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < engine >
#include < fakemeta >
#include < hamsandwich >
new g_Saltos[ 33 ]
#define MAX_SALTOS 1
public plugin_init( )
RegisterHam( Ham_Player_Jump, "player", "fw_PlayerJump" )
public fw_PlayerJump( id )
{
static flags; flags = get_entity_flags( id )
static button; button = get_user_button( id )
static oldbutton; oldbutton = get_user_oldbutton( id )
if( ( button & IN_JUMP ) && !( flags & FL_ONGROUND ) && !( oldbutton & IN_JUMP ) )
{
if( ++g_Saltos[ id ] <= MAX_SALTOS )
{
static Float:Velocity[ 3 ]
entity_get_vector( id, EV_VEC_velocity, Velocity )
Velocity[ 2 ] = random_float( 865.0, 885.0 )
entity_set_vector( id, EV_VEC_velocity, Velocity )
}
}
if( flags & FL_ONGROUND )
g_Saltos[ id ] = 0
}