Guest User

Untitled

a guest
Jan 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. ctrlDown = false
  2.  
  3. function KeyPressed( P, key )
  4. if (key == IN_DUCK) then
  5. ctrlDown = true
  6. end
  7. print(P:GetName())
  8. print(ctrlDown)
  9. print(key)
  10. if (ctrlDown == true) and (key == IN_JUMP) then
  11. P:SetJumpPower( 2000 )
  12. end
  13.  
  14. end
  15.  
  16. function KeyReleased( P, key )
  17. if (key == IN_DUCK) then
  18. ctrlDown = false
  19. P:SetJumpPower( 200 )
  20. end
  21.  
  22. end
  23.  
  24. hook.Add( "KeyPress", "KeyPressedHook", KeyPressed )
  25. hook.Add( "KeyRelease", "KeyPressedHook", KeyReleased )
Add Comment
Please, Sign In to add comment