ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Hunger Chest"
ENT.Author = "Perplexity AI"
ENT.Category = "DarkRP"
ENT.Spawnable = true
ENT.AdminOnly = true
function ENT:Initialize()
self:SetModel("models/props_c17/woodbarrel001.mdl")
self:SetSolid(SOLID_VPHYSICS)
self:SetUseType(SIMPLE_USE)
local physObj = self:GetPhysicsObject()
if (IsValid(physObj)) then
physObj:Wake()
end
end
function ENT:Use(activator, caller)
if (IsValid(caller) and caller:IsPlayer()) then
caller:addHunger(50) -- Change 50 to the amount of hunger points you want to give the player
self:Remove()
end
end