Advertisement
Guest User

Untitled

a guest
May 19th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. local cb = gui.Checkbox(gui.Reference("RAGE", "WEAPON", "REVOLVER", "Accuracy"), "rbot_revolver_autocock_ex", "Fixed Auto-Revolver", false)
  2.  
  3. local cnt = 0
  4. local function on_create_move(cmd)
  5. local me = entities.GetLocalPlayer()
  6. if cb:GetValue() and me ~= nil then
  7. local wep = me:GetPropEntity("m_hActiveWeapon")
  8.  
  9. if wep ~= nil and wep:GetWeaponID() == 64 then
  10. cnt = cnt + 1
  11. if cnt <= 15 then
  12. cmd:SetButtons(cmd:GetButtons() | (1 << 0))
  13. else
  14. cnt = 0
  15.  
  16. local m_flPostponeFireReadyTime = wep:GetPropFloat("m_flPostponeFireReadyTime")
  17. if m_flPostponeFireReadyTime > 0 and m_flPostponeFireReadyTime < globals.CurTime() then
  18. cmd:SetButtons(cmd:GetButtons() & ~(1 << 0))
  19. end
  20. end
  21. end
  22. end
  23. end
  24.  
  25. callbacks.Register("CreateMove", on_create_move)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement