daily pastebin goal
0%
SHARE
TWEET

Untitled

a guest Jun 19th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Speedzz = vgui.Create('DNumSlider')
  2. Speedzz:SetParent(Misc)
  3. Speedzz:SetSize(265, 100)
  4. Speedzz:SetPos(110, 125)
  5. Speedzz:SetDecimals(1)
  6. Speedzz:SetText('SpeedHack Level')
  7. Speedzz:SetMinMax(0.1)
  8. Speedzz:SetMax(20)
  9. Speedzz:SetValue(GetConVarNumber("host_timescale", 1))
  10. function Speedz.Slider:OnMouseReleased()
  11. self:SetDragging( false )
  12. self:MouseCapture( false )
  13. RunConsoleCommand(k, Speedz:GetValue())
  14. end
  15.  
  16. function SpeedOn() -- val
  17.     RunConsoleCommand("host_timescale", what goes here?
  18. end
  19.  
  20. function SpeedOff()
  21.     RunConsoleCommand("host_timescale", "1")
  22. end
  23.    
  24. concommand.Add("+c_speed", SpeedOn)
  25. concommand.Add("-c_speed", SpeedOff)
RAW Paste Data
Top