Advertisement
Guest User

Untitled

a guest
Oct 26th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. ITEM.Name = 'Robo arm'
  2. ITEM.Price = 200
  3. ITEM.Model = 'models/items/combine_rifle_ammo01.mdl'
  4. ITEM.Bone = 'ValveBiped.Bip01_L_UpperArm'
  5.  
  6. function ITEM:OnEquip(ply, modifications)
  7. ply:PS_AddClientsideModel(self.ID)
  8. end
  9.  
  10. function ITEM:OnHolster(ply)
  11. ply:PS_RemoveClientsideModel(self.ID)
  12. end
  13.  
  14. function ITEM:ModifyClientsideModel(ply, model, pos, ang)
  15. local Size = Vector(1.1100000143051,1.1499999761581,1.0199999809265)
  16. local mat = Matrix()
  17. mat:Scale(Size)
  18. model:EnableMatrix('RenderMultiply', mat)
  19.  
  20. model:SetMaterial('')
  21.  
  22. local MAngle = Angle(57.909999847412,3.1300001144409,272.35000610352)
  23. local MPos = Vector(0.17000000178814,0,0)
  24.  
  25. pos = pos + (ang:Forward() * MPos.x) + (ang:Up() * MPos.z) + (ang:Right() * MPos.y)
  26. ang:RotateAroundAxis(ang:Forward(), MAngle.p)
  27. ang:RotateAroundAxis(ang:Up(), MAngle.y)
  28. ang:RotateAroundAxis(ang:Right(), MAngle.r)
  29.  
  30. model.ModelDrawingAngle = model.ModelDrawingAngle or Angle(0,0,0)
  31. model.ModelDrawingAngle.p = (CurTime() * 0 *90)
  32. model.ModelDrawingAngle.y = (CurTime() * 0.25999999046326 *90)
  33. model.ModelDrawingAngle.r = (CurTime() * 0 *90)
  34.  
  35. ang:RotateAroundAxis(ang:Forward(), (model.ModelDrawingAngle.p))
  36. ang:RotateAroundAxis(ang:Up(), (model.ModelDrawingAngle.y))
  37. ang:RotateAroundAxis(ang:Right(), (model.ModelDrawingAngle.r))
  38.  
  39. halo.Add( {model},
  40. Color(255,0,0),
  41. 10,
  42. 10,
  43. 1)
  44.  
  45.  
  46. return model, pos, ang
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement