add sborka
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
AddCSLuaFile()
|
||||
|
||||
ENT.Type = "anim"
|
||||
ENT.Base = "base_gmodentity"
|
||||
ENT.PrintName = "Личный склад"
|
||||
ENT.Author = "Scripty"
|
||||
ENT.Category = "Helix"
|
||||
ENT.Spawnable = true
|
||||
ENT.AdminOnly = true
|
||||
|
||||
if SERVER then
|
||||
function ENT:Initialize()
|
||||
self:SetModel("models/props_c17/Lockers001a.mdl")
|
||||
self:PhysicsInit(SOLID_VPHYSICS)
|
||||
self:SetMoveType(MOVETYPE_VPHYSICS)
|
||||
self:SetSolid(SOLID_VPHYSICS)
|
||||
self:SetUseType(SIMPLE_USE)
|
||||
|
||||
local phys = self:GetPhysicsObject()
|
||||
if IsValid(phys) then
|
||||
phys:Wake()
|
||||
phys:EnableMotion(false)
|
||||
end
|
||||
end
|
||||
|
||||
function ENT:Use(activator)
|
||||
if (IsValid(activator) and activator:IsPlayer() and activator:GetCharacter()) then
|
||||
local plugin = ix.plugin.list["personal_storage"]
|
||||
if (plugin) then
|
||||
plugin:OpenStorage(activator)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if CLIENT then
|
||||
function ENT:Draw()
|
||||
self:DrawModel()
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user