Advertisement
mattjeanes

Untitled

Aug 5th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. hook.Add("ShouldDrawLocalPlayer", "halogun", function(ply)
  2.     if IsValid(ply:GetActiveWeapon()) and ply:GetActiveWeapon:GetClass()=="weaponclassname" then
  3.         return true
  4.     end
  5. end)
  6.  
  7. hook.Add("CalcView", "halogun", function(ply,pos,ang,fov)
  8.     if IsValid(ply:GetActiveWeapon()) and ply:GetActiveWeapon:GetClass()=="weaponclassname" then
  9.         local view = {}
  10.         view.origin = pos-( ang:Forward()*100 )
  11.         view.angles = ang
  12.         view.fov = fov
  13.      
  14.         return view
  15.     end
  16. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement