Files
wnsrc/gamemodes/ixhl2rp/plugins/combinedeployables/entities/entities/ix_sandbag.lua
lifestorm ba1fc01b16 Upload
2024-08-04 23:12:27 +03:00

46 lines
983 B
Lua

--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local AddCSLuaFile = AddCSLuaFile
local IsValid = IsValid
local ents = ents
local Vector = Vector
local timer = timer
AddCSLuaFile()
ENT.Type = "anim"
ENT.PrintName = "Sandbag"
ENT.Category = "HL2 RP"
ENT.Spawnable = true
ENT.AdminOnly = true
ENT.RenderGroup = RENDERGROUP_BOTH
ENT.PhysgunDisable = true
if (SERVER) then
function ENT:Initialize()
self:SetModel("models/mosi/fallout4/props/fortifications/sandbag01.mdl")
self:SetSolid(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetUseType(SIMPLE_USE)
self:PhysicsInit(SOLID_VPHYSICS)
local physObj = self:GetPhysicsObject()
if (IsValid(physObj)) then
physObj:EnableMotion(false)
physObj:Sleep()
end
end
function ENT:OnRemove()
end
end