Advertisement
Guest User

slidewalk

a guest
Dec 14th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. local slidewalk = ui.new_checkbox("misc", "miscellaneous", "Slidewalk")
  2. client.set_event_callback('setup_command', function(cmd)
  3.  
  4. local move_type = entity.get_prop(entity.get_local_player(), "m_MoveType")
  5.  
  6. if move_type == 9 then return end -- disable when on a ladder
  7. if cmd.in_use == 1 then return end -- disable when holding e
  8.  
  9. if ui.get(slidewalk) then
  10. if (cmd.forwardmove > 0) then
  11. cmd.in_back = 1
  12. cmd.in_forward = 0
  13. end
  14.  
  15. if (cmd.forwardmove < 0) then
  16. cmd.in_forward = 1
  17. cmd.in_back = 0
  18. end
  19.  
  20. if (cmd.sidemove < 0) then
  21. cmd.in_moveright = 1
  22. cmd.in_moveleft = 0
  23. end
  24.  
  25. if (cmd.sidemove > 0) then
  26. cmd.in_moveleft = 1
  27. cmd.in_moveright = 0
  28. end
  29. end
  30. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement