Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ctrlDown = false
- function KeyPressed( P, key )
- if (key == IN_DUCK) then
- ctrlDown = true
- end
- print(P:GetName())
- print(ctrlDown)
- print(key)
- if (ctrlDown == true) and (key == IN_JUMP) then
- P:SetJumpPower( 2000 )
- end
- end
- function KeyReleased( P, key )
- if (key == IN_DUCK) then
- ctrlDown = false
- P:SetJumpPower( 200 )
- end
- end
- hook.Add( "KeyPress", "KeyPressedHook", KeyPressed )
- hook.Add( "KeyRelease", "KeyPressedHook", KeyReleased )
Add Comment
Please, Sign In to add comment