Hi there! This is the function that creates the ability to do double jump:
Code:
DoubleJump(const any:client)
The process of deciding whether the player is airbone and clicks space (IN_JUMP) buton begins here:
Code:
if (g_fLastFlags[client] & FL_ONGROUND)
Althorugh the "ifs" are somehow not super clear to read, there are multiple comments what is processing at any single step. So, there is a line that states "this is where we do doublejump"
Code:
ReJump(client) // process attempt to double-jump
This however does not tell us when to jump, it simply says just to jump. To look up when do we do this, we must look a few lines upwards
Code:
} else if ( // remains airborne this frame
!(g_fLastButtons[client] & IN_JUMP) && // was not jumping last frame
fCurButtons & IN_JUMP // started jumping this frame
) {
This code says: "Is the player starting to click space (IN_JUMP button) now?"
So basicly, you must change both IN_JUMP defines into IN_DUCK. There are multiple buttons defined like that, for example you could make double jump by replacing IN_JUMP with IN_ATTACK, which would cause to activate double jump when somebody shoots with leftclick while in the air. The full list of buttons can be found here:
https://sm.alliedmods.net/api/index....oad=file&id=47