Advertisement
Guest User

awp crosshair lua

a guest
May 25th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. local VIS_MAIN_REF = gui.Reference( "VISUALS", "Shared" );
  2.  
  3. local SniperCrosshairCheckbox = gui.Checkbox( VIS_MAIN_REF, "lua_snipercrosshair", "Sniper Crosshair", 0 );
  4.  
  5. local function SniperCrosshair()
  6.  
  7. if SniperCrosshairCheckbox:GetValue() then
  8. if entities.GetLocalPlayer() ~= nil then
  9. local LocalPlayerEntity = entities.GetLocalPlayer();
  10.  
  11. local Alive = LocalPlayerEntity:IsAlive();
  12. local isScoped = LocalPlayerEntity:GetPropInt( "m_bIsScoped" );
  13.  
  14. local Thirdperson = gui.GetValue( "vis_thirdperson_dist" );
  15. local Scoperemover = gui.GetValue( "vis_scoperemover" );
  16.  
  17. if Alive then
  18. if Scoperemover ~= 1 then
  19. if ( isScoped == 1 or isScoped == 257 or Thirdperson > 0 ) then
  20. client.SetConVar( "weapon_debug_spread_show", 0, true );
  21. else
  22. client.SetConVar( "weapon_debug_spread_show", 3, true );
  23. end
  24. elseif Scoperemover == 1 then
  25. if ( Thirdperson > 0 and isScoped == 0 or isScoped == 257 ) then
  26. client.SetConVar( "weapon_debug_spread_show", 0, true );
  27. else
  28. client.SetConVar( "weapon_debug_spread_show", 3, true );
  29. end
  30. end
  31. else
  32. client.SetConVar( "weapon_debug_spread_show", 0, true );
  33. end
  34. end
  35. else
  36. client.SetConVar( "weapon_debug_spread_show", 0, true );
  37. end
  38.  
  39. end
  40.  
  41. callbacks.Register( "Draw", "Sniper Crosshair", SniperCrosshair )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement