Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. if not (WireAddon == nil) then self.Inputs = Wire_CreateInputs(self.Entity, { "Detonate!", "Arm"}) end 
  2. if not (WireAddon == nil) then self.Outputs = Wire_CreateOutputs(self.Entity, { "Armed"}) end
  3. if (phys:IsValid()) then       
  4. phys:Wake()    
  5. end
  6.  
  7. end  
  8.  
  9. function ENT:TriggerInput(iname, value) --wire inputs
  10.     if (iname == "Detonate!") then
  11.         if value == 1 then
  12.             if self.isarmed == 1 then
  13.                 self:MakeGas()
  14.             end
  15.         end
  16.     end
  17.     if (iname == "Arm") then
  18.         if value == 1 then
  19.             self.isarmed = 1
  20.         end
  21.         if value == 0 then
  22.             self.isarmed = 0
  23.         end
  24.     end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement