Don't know how to really do it but I think I have the Logic for it.
var iJumping = 0 // Used to know in which state is jumping the player.
I think you will need to use timer for that
make a condition onCollision with the floor Timer Start
while the timer is on && on keyboard some btn pressed && Jumping ==0 do some process which is jump and Set 1 to Jumping
else set jumping = 0 // if the condition is not accomplish then set jump to 0
while the timer is on && on keyboard some btn pressed && Jumping ==1 do some process which is jump and Set 2 to Jumping
else set jumping = 0
while the timer is on && on keyboard some btn pressed && Jumping ==2 do some process which is jump and Set 3 to Jumping
else set jumping = 0
if jumping is > 2 set jumping to 0 // if jump greater than 2 set jump to 0
I hope this work to find a answer to your question