CapsAdmin

Untitled

Dec 25th, 2011
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.36 KB | None | 0 0
  1. --local this = LocalPlayer():GetEyeTrace().Entity
  2.  
  3. CSENT = CSENT or ClientsideModel("models/mossman.mdl")
  4.  
  5. local ent = CSENT
  6.  
  7. --ent:SetPos(LocalPlayer():GetPos())
  8.  
  9. function ent:BuildBonePositions()
  10.     do
  11.     local boneid = self:LookupBone(BONE_LEFT_UPPERARM)
  12.     local wpos, wang = self:GetBonePosition(boneid)
  13.     local pos, ang = LocalToWorld(Vector(0, -2, 0), Angle(-20, -80, -30), wpos, wang)
  14.     self:SetBonePosition(boneid, pos, ang)
  15.    
  16.     local boneid = self:LookupBone(BONE_LEFT_FOREARM)
  17.     local pos, ang = LocalToWorld(Vector(10, 0, 0), Angle(0, -10, 0), pos, ang)
  18.     self:SetBonePosition(boneid, pos, ang)
  19.    
  20.     local boneid = self:LookupBone(BONE_LEFT_HAND)
  21.     local pos, ang = LocalToWorld(Vector(10, 0, 0), Angle(0, 0, 0), pos, ang)
  22.     self:SetBonePosition(boneid, pos, ang)
  23.     end
  24.    
  25.     do
  26.     local boneid = self:LookupBone(BONE_RIGHT_UPPERARM)
  27.     local wpos, wang = self:GetBonePosition(boneid)
  28.     local pos, ang = LocalToWorld(Vector(0, -2, 0), Angle(20, -80, 30), wpos, wang)
  29.     self:SetBonePosition(boneid, pos, ang)
  30.    
  31.     local boneid = self:LookupBone(BONE_RIGHT_FOREARM)
  32.     local pos, ang = LocalToWorld(Vector(10, 0, 0), Angle(0, -10, 0), pos, ang)
  33.     self:SetBonePosition(boneid, pos, ang)
  34.    
  35.     local boneid = self:LookupBone(BONE_RIGHT_HAND)
  36.     local pos, ang = LocalToWorld(Vector(10, 0, 0), Angle(0, 0, 0), pos, ang)
  37.     self:SetBonePosition(boneid, pos, ang)
  38.     end
  39. end
Advertisement
Add Comment
Please, Sign In to add comment