SHARE
TWEET

Untitled

a guest Jan 21st, 2020 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. AddCSLuaFile("food_utilities.lua")
  2. include("food_utilities.lua")
  3.  
  4. ENT.Type = "anim"
  5. ENT.Base = "base_gmodentity"
  6.  
  7. ENT.PrintName = "Shmungo pill"
  8. ENT.Spawnable = true
  9. ENT.Category = "Frasiu's R&D"
  10.  
  11. if CLIENT then
  12.    
  13.  
  14.     function ENT:Draw()
  15.         self:DrawModel()
  16.     end
  17. end
  18.  
  19. if SERVER then
  20.    
  21.  
  22.  
  23.     function ENT:Initialize()
  24.         self:SetModel("models/alyx_emptool_prop.mdl")
  25.        
  26.        
  27.         self:PhysicsInit( SOLID_VPHYSICS )
  28.         self:SetMoveType( MOVETYPE_VPHYSICS )
  29.         self:SetSolid( SOLID_VPHYSICS )
  30.         self.isRunning = false
  31.         self.Timer = 0
  32.          
  33.             self.FemaleModels = {}
  34.             self.FemaleModels["models/player/mossman_arctic.mdl"] = true
  35.             self.FemaleModels["models/player/alyx.mdl"] = true
  36.             self.FemaleModels["models/player/p2_chell.mdl"] = true
  37.      
  38.             local phys = self:GetPhysicsObject()
  39.         if phys:IsValid() then
  40.             phys:Wake()
  41.     end end
  42.  
  43.  
  44.  
  45.     function ENT:Use(a,c)
  46.           if(self.Timer > CurTime()) then return end
  47.             self:Remove()
  48.                    
  49.             a:AddFoodEffect(5,function(ply,effect)
  50.                 CreateSound(ply,"player/breathe1.wav")
  51.                
  52.                 ply:ChatPrint("huj")
  53.  
  54.                    
  55.  
  56.  
  57.             return true
  58.             end,
  59.  
  60.  
  61.  
  62.  
  63.             function (ply,effect)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.             end,"effect_uno")
  75.  
  76.  
  77.  
  78.  
  79.      
  80.  
  81.      
  82.         self.Timer = CurTime() + 0.9    
  83.     end            
  84. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top