Advertisement
Guest User

Untitled

a guest
Oct 26th, 2014
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. ITEM.Model = 'models/combine_helicopter/helicopter_bomb01.mdl'
  2. ITEM.Attachment = 'chest'
  3.  
  4. function ITEM:OnEquip(ply, modifications)
  5. ply:PS_AddClientsideModel(self.ID)
  6. end
  7.  
  8. function ITEM:OnHolster(ply)
  9. ply:PS_RemoveClientsideModel(self.ID)
  10. end
  11.  
  12. function ITEM:ModifyClientsideModel(ply, model, pos, ang)
  13. local Size = Vector(0.34999999403954,0.34999999403954,0.34999999403954)
  14. local mat = Matrix()
  15. mat:Scale(Size)
  16. model:EnableMatrix('RenderMultiply', mat)
  17.  
  18. model:SetMaterial('')
  19.  
  20. local MAngle = Angle(0,0,90.779998779297)
  21. local MPos = Vector(-2.6099998950958,-8.6099996566772,4.6100001335144)
  22.  
  23. pos = pos + (ang:Forward() * MPos.x) + (ang:Up() * MPos.z) + (ang:Right() * MPos.y)
  24. ang:RotateAroundAxis(ang:Forward(), MAngle.p)
  25. ang:RotateAroundAxis(ang:Up(), MAngle.y)
  26. ang:RotateAroundAxis(ang:Right(), MAngle.r)
  27.  
  28. model.ModelDrawingAngle = model.ModelDrawingAngle or Angle(0,0,0)
  29. model.ModelDrawingAngle.p = (CurTime() * 0 *90)
  30. model.ModelDrawingAngle.y = (CurTime() * 0.21999999880791 *90)
  31. model.ModelDrawingAngle.r = (CurTime() * 0 *90)
  32.  
  33. ang:RotateAroundAxis(ang:Forward(), (model.ModelDrawingAngle.p))
  34. ang:RotateAroundAxis(ang:Up(), (model.ModelDrawingAngle.y))
  35. ang:RotateAroundAxis(ang:Right(), (model.ModelDrawingAngle.r))
  36.  
  37. return model, pos, ang
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement