Guest User

Untitled

a guest
Apr 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. function ENT:Use(pl)
  2. if ((self.nextUse or 0) >= CurTime()) then
  3. return
  4. end
  5.  
  6. if IsValid(self.lastComp1) then
  7. self.lastComp1:Remove()
  8. end
  9. if IsValid(self.lastComp2) then
  10. self.lastComp2:Remove()
  11. end
  12.  
  13. local ent1 = ents.Create("eml_comp1")
  14. ent1:SetPos( self.poscomp1 )
  15. ent1:Spawn()
  16. self.lastComp1 = ent1
  17.  
  18. local ent2 = ents.Create("eml_comp2")
  19. ent2:SetPos( self.poscomp2 )
  20. ent2:Spawn()
  21. self.lastComp2 = ent2
  22.  
  23. self:EmitSound("ambient/levels/canals/toxic_slime_sizzle3.wav", 70, 100, 0.2);
  24. self.nextUse = CurTime() + 2
  25. end
Add Comment
Please, Sign In to add comment