CapsAdmin

Untitled

Mar 28th, 2011
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. --local convar = CreateConVar( "thirdperson_enabled", "0", { FCVAR_ARCHIVE, } )
  2.  
  3. hook.Add( "ShouldDrawLocalPlayer", "ThirdPersonDrawPlayer", function()
  4.     --if convar:GetBool() and LocalPlayer():Alive() then
  5.         return true
  6.     --end
  7. end )
  8.  
  9. --local Laser = Material( "cable/redlaser" )
  10.  
  11. hook.Add( "CalcView", "ThirdPersonView", function( ply, _, _, fov )
  12.  
  13.     --if convar:GetBool() and ply:Alive() then
  14.         local ang = ply:EyeAngles()
  15.         local dir = ply:GetAimVector()
  16.         local origin = ply:EyePos() + (dir * -30) + (ang:Right() * 20)
  17.        
  18.         return GAMEMODE:CalcView(
  19.             ply,
  20.             origin,
  21.             (ply:GetEyeTrace().HitPos - origin):Angle(),
  22.             fov
  23.         )
  24.     --end
  25.      
  26. end )
Advertisement
Add Comment
Please, Sign In to add comment