-- By notwait on the SRB2MB -- Ask me for modifying, Maintain only in my absence addHook("TouchSpecial", function(mo, tm) local p = nil if tm.player then p = tm.player else return end p.checkpointpwshield = p.powers[pw_shield] end, MT_STARPOST) addHook("PlayerSpawn", function(p) p.oldpfjumped = 0 -- if p.checkpointpwshield then p.powers[pw_shield] = p.checkpointpwshield P_SpawnShieldOrb(p) end -- i should shorten this variable name if p.jumpcount == nil then p.jumpcount = 0 end end) addHook("PlayerThink", function(p) if p.pflags & PF_JUMPED and not p.oldpfjumped then p.jumpcount = $1 + 1 end p.oldpfjumped = p.pflags & PF_JUMPED if (p.cmd.buttons & BT_CUSTOM1) and not (p.lastbuttons & BT_CUSTOM1) then p.jumpcount = $1 - 1 end -- press C1 to remove 1 jump if (p.cmd.buttons & BT_CUSTOM2) and not (p.lastbuttons & BT_CUSTOM2) then p.jumpcount = 0 end -- press C2 to remove jump end) hud.add(function (v, p) v.drawString(320-12+8, 200-12, "JUMPS: " .. tostring(p.jumpcount), V_SNAPTORIGHT, "right") end)