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,42 @@
include('shared.lua')
function ENT:Initialize ()
local Data = RHandcuffsConfig.NPCData[self:GetClass()]
self.aps = Data.TextRotationSpeed
self.lastRot = CurTime()
self.curRot = 0
self.Font = Data.TextFont
self.Text = Data.Text
self.TextColor = Data.TextColor
self.TextBGColor = Data.TextBackgroundColor
end
function ENT:Draw()
self.curRot = self.curRot + (self.aps * (CurTime() - self.lastRot))
if (self.curRot > 360) then self.curRot = self.curRot - 360 end
self.lastRot = CurTime()
local Maxs = self:LocalToWorld(self:OBBMaxs())
local EntPos = self:GetPos()
local TextPos = Vector(EntPos.x,EntPos.y,Maxs.z+8)
local Text = self.Text
local Font = self.Font
surface.SetFont(Font)
local W,H = surface.GetTextSize(Text)
surface.SetDrawColor(self.TextBGColor)
cam.Start3D2D(TextPos, Angle(180, self.curRot, -90), .1)
surface.DrawRect(-W/2,-H/2,W,H)
draw.SimpleText(Text, Font, 0, 0, self.TextColor, TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
cam.End3D2D()
cam.Start3D2D(TextPos, Angle(180, self.curRot + 180, -90), .1)
draw.SimpleText(Text, Font, 0, 0, self.TextColor, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
cam.End3D2D()
self:DrawModel()
end
function ENT:OnRemove( )
end

View File

@@ -0,0 +1,31 @@
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include('shared.lua')
function ENT:Initialize()
local Data = RHandcuffsConfig.NPCData[self:GetClass()]
self:SetModel(Data.Model)
self:SetSolid(SOLID_BBOX);
self:PhysicsInit(SOLID_BBOX);
self:SetMoveType(MOVETYPE_NONE);
self:DrawShadow(true);
self:SetUseType(SIMPLE_USE);
self:SetFlexWeight( 10, 0 )
self:ResetSequence(3)
end
function ENT:Use(activator, caller)
if self.Touched and self.Touched > CurTime() then return ; end
self.Touched = CurTime() + 2;
if (RHC_GetConf("BAIL_RestrictBailing") and activator:CanRHCBail()) or !RHC_GetConf("BAIL_RestrictBailing") then
net.Start("RHC_Bailer_Menu")
net.Send(activator)
else
TBFY_Notify(activator, 1, 4, RHC_GetLang("NotAllowedToUseBailer"))
end
end
function ENT:Think()
end

View File

@@ -0,0 +1,11 @@
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.Category = "ToBadForYou"
ENT.Spawnable = false
ENT.PrintName = "Bailer NPC"
ENT.Author = "ToBadForYou"
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
ENT.TBFYEnt = true