Advertisement
taka_qiao

Untitled

Jul 23rd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. AddCSLuaFile("cl_init.lua")
  2. AddCSLuaFile("shared.lua")
  3. include("shared.lua")
  4.  
  5. ENT.ExplodeRadius = 384
  6. ENT.ExplodeDamage = 100
  7.  
  8. local phys, ef
  9.  
  10. function ENT:Initialize()
  11. self:SetModel("models/Items/BoxSRounds.mdl")
  12. self:PhysicsInit(SOLID_VPHYSICS)
  13. self:SetMoveType(MOVETYPE_VPHYSICS)
  14. self:SetSolid(SOLID_VPHYSICS)
  15. self:SetCollisionGroup(COLLISION_GROUP_NONE)
  16. self.NextImpact = 0
  17. phys = self:GetPhysicsObject()
  18.  
  19. if phys and phys:IsValid() then
  20. phys:Wake()
  21. end
  22.  
  23. self:GetPhysicsObject():SetBuoyancyRatio(0)
  24. end
  25.  
  26. function ENT:Use(activator, caller)
  27. if activator:IsPlayer() then
  28. local attachments = self:getAttachments()
  29.  
  30. if not CustomizableWeaponry:hasSpecifiedAttachments(activator, attachments) then
  31. CustomizableWeaponry.giveAttachments(activator, attachments)
  32. self:Remove()
  33. end
  34. end
  35.  
  36. return true
  37. end
  38.  
  39. function ENT:OnRemove()
  40. return false
  41. end
  42.  
  43. local vel, len, CT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement