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,74 @@
AddCSLuaFile()
ENT.Type = "anim"
ENT.PrintName = "Gauge"
ENT.Author = "Luna"
ENT.Category = "[LVS]"
ENT.Spawnable = true
ENT.AdminOnly = false
ENT.PhysicsSounds = true
if SERVER then
function ENT:SpawnFunction( ply, tr, ClassName )
if not tr.Hit then return end
local ent = ents.Create( ClassName )
ent:SetPos( tr.HitPos + tr.HitNormal * 5 )
ent:Spawn()
ent:Activate()
return ent
end
function ENT:Initialize()
self:SetModel( "models/diggercars/tacho.mdl" )
self:PhysicsInit( SOLID_VPHYSICS )
self:SetMoveType( MOVETYPE_VPHYSICS )
self:PhysWake()
end
function ENT:Think()
return false
end
function ENT:PhysicsCollide( data )
if self.MarkForRemove then return end
local ent = data.HitEntity
if not IsValid( ent ) or not ent.LVS or not isfunction( ent.SetRacingHud ) then return end
ent:SetRacingHud( not ent:GetRacingHud() )
local ply = self:GetCreator()
if ent:GetRacingHud() then
ent:EmitSound("common/wpn_hudoff.wav")
if IsValid( ply ) then
ply:ChatPrint( "Gauge Added" )
end
else
ent:EmitSound("common/wpn_denyselect.wav")
if IsValid( ply ) then
ply:ChatPrint( "Gauge Removed" )
end
end
self.MarkForRemove = true
SafeRemoveEntityDelayed( self, 0 )
end
function ENT:OnTakeDamage( dmginfo )
end
else
function ENT:Draw( flags )
self:DrawModel( flags )
end
end