Closed bjallamo closed 8 years ago
I made a modification to serfreeman's plugin, but when i'm in the second jump, the character don't move anywhere. I have tried the code with bitstop flag "~" too. Here's a video of the problem: https://www.youtube.com/watch?v=yXIYLEyuuG4
#include <amxmodx> #include <reapi> #define MAXJUMPS 2 // maximum jumps #define IN_JUMP (1<<1) #define FL_ONGROUND (1<<9) new const PLUGIN[] = "Multijump" new const VERSION[] = "1.0" new const AUTHOR[] = "serfreeman1337" // Reapi modification by mforce enum _:jdata { bool:DOJUMP, JUMPCOUNT } new player_jumps[33][jdata] public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); RegisterHookChain(RG_CBasePlayer_Jump, "Hook_PlayerJump"); } public Hook_PlayerJump(id) { static oldButtons oldButtons = get_entvar(id, var_oldbuttons) if(!(get_entvar(id, var_flags) & FL_ONGROUND) && !(oldButtons & IN_JUMP)) { if(player_jumps[id][JUMPCOUNT] < MAXJUMPS - 1) { player_jumps[id][DOJUMP] = true player_jumps[id][JUMPCOUNT] ++ } } else if(get_entvar(id, var_flags) & FL_ONGROUND) { player_jumps[id][JUMPCOUNT] = 0 } if(player_jumps[id][DOJUMP]) { static Float:velocity[3] get_entvar(id, var_velocity, velocity) velocity[2] = random_float(265.0,285.0) set_entvar(id, var_velocity, velocity) player_jumps[id][DOJUMP] = false } } public client_disconnect(id) { arrayset(player_jumps[id], 0, jdata) }
Original: http://1337.uz/download/plugins/sf_multijump.sma
Try last build
Everything perfect
I made a modification to serfreeman's plugin, but when i'm in the second jump, the character don't move anywhere. I have tried the code with bitstop flag "~" too. Here's a video of the problem: https://www.youtube.com/watch?v=yXIYLEyuuG4
Original: http://1337.uz/download/plugins/sf_multijump.sma