Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ITEM.Name = 'Robo arm'
- ITEM.Price = 200
- ITEM.Model = 'models/items/combine_rifle_ammo01.mdl'
- ITEM.Bone = 'ValveBiped.Bip01_L_UpperArm'
- function ITEM:OnEquip(ply, modifications)
- ply:PS_AddClientsideModel(self.ID)
- end
- function ITEM:OnHolster(ply)
- ply:PS_RemoveClientsideModel(self.ID)
- end
- function ITEM:ModifyClientsideModel(ply, model, pos, ang)
- local Size = Vector(1.1100000143051,1.1499999761581,1.0199999809265)
- local mat = Matrix()
- mat:Scale(Size)
- model:EnableMatrix('RenderMultiply', mat)
- model:SetMaterial('')
- local MAngle = Angle(57.909999847412,3.1300001144409,272.35000610352)
- local MPos = Vector(0.17000000178814,0,0)
- pos = pos + (ang:Forward() * MPos.x) + (ang:Up() * MPos.z) + (ang:Right() * MPos.y)
- ang:RotateAroundAxis(ang:Forward(), MAngle.p)
- ang:RotateAroundAxis(ang:Up(), MAngle.y)
- ang:RotateAroundAxis(ang:Right(), MAngle.r)
- model.ModelDrawingAngle = model.ModelDrawingAngle or Angle(0,0,0)
- model.ModelDrawingAngle.p = (CurTime() * 0 *90)
- model.ModelDrawingAngle.y = (CurTime() * 0.25999999046326 *90)
- model.ModelDrawingAngle.r = (CurTime() * 0 *90)
- ang:RotateAroundAxis(ang:Forward(), (model.ModelDrawingAngle.p))
- ang:RotateAroundAxis(ang:Up(), (model.ModelDrawingAngle.y))
- ang:RotateAroundAxis(ang:Right(), (model.ModelDrawingAngle.r))
- halo.Add( {model},
- Color(255,0,0),
- 10,
- 10,
- 1)
- return model, pos, ang
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement