add sborka

This commit is contained in:
2026-03-31 10:27:04 +03:00
commit f5e5f56c84
2345 changed files with 382127 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
include("shared.lua")
function ENT:Draw()
self:DrawModel()
end

View File

@@ -0,0 +1,51 @@
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
self:SetModel("models/sw/shared/airdrop_large.mdl")
self:SetSolid(SOLID_VPHYSICS)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetUseType(SIMPLE_USE)
local phys = self:GetPhysicsObject()
if (IsValid(phys)) then
phys:Wake()
end
end
function ENT:Use(activator)
if (IsValid(activator) and activator:IsPlayer()) then
if (self.opened) then return end
self.opened = true
local weaponClass = self.ixWeapon or "tacrp_m320"
local character = activator:GetCharacter()
local inventory = character and character:GetInventory()
if (inventory and !isnumber(inventory) and ix.item.list[weaponClass]) then
inventory:Add(weaponClass)
ix.util.Notify("Вы получили " .. (ix.item.list[weaponClass].name or weaponClass) .. " из аирдропа.", activator)
else
activator:Give(weaponClass)
ix.util.Notify("Вы получили " .. (self.ixWeapon or "неизвестное оружие") .. " из аирдропа.", activator)
end
if (IsValid(self.ixSmoke)) then
self.ixSmoke:Remove()
end
local effect = EffectData()
effect:SetOrigin(self:GetPos())
effect:SetScale(1)
util.Effect("Explosion", effect)
self:Remove()
end
end
function ENT:OnTakeDamage(damage)
if (damage:GetDamage() > 50) then
self:Use(damage:GetAttacker())
end
end

View File

@@ -0,0 +1,6 @@
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Airdrop"
ENT.Category = "Helix"
ENT.Spawnable = false
ENT.AdminOnly = true