CapsAdmin

Untitled

Oct 14th, 2011
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local ent = ClientsideModel("models/props_junk/plasticbucket001a.mdl")
  2. local ply = LocalPlayer()
  3.  
  4. local pos, ang
  5.  
  6. local pos_offset = Vector(-18, -3, 0)
  7. local ang_offset = Angle(0, 60, 90)
  8.  
  9. hook.Add("PostPlayerDraw", "aaaa", function(_ply)
  10.     if _ply == ply then
  11.        
  12.         pos, ang = ply:GetBonePosition(ply:LookupBone("ValveBiped.Bip01_Spine4"))
  13.        
  14.         pos, ang = LocalToWorld(pos_offset, ang_offset, pos, ang)
  15.        
  16.         ent:SetRenderOrigin(pos)
  17.         ent:SetRenderAngles(ang)
  18.         ent:SetupBones()
  19.        
  20.         ent:DrawModel()
  21.     end
  22. end)
  23.  
Advertisement
Add Comment
Please, Sign In to add comment