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,40 @@
include('shared.lua')
function ENT:Initialize ()
self.aps = 50
self.lastRot = CurTime()
self.curRot = 0
self.Font = "DermaDefault"
self.Text = "Jailer"
self.TextColor = Color(255,255,255,255)
self.TextBGColor = Color(0,0,0,200)
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+8,H+8)
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,38 @@
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include('shared.lua')
function ENT:Initialize()
self:SetModel("models/Barney.mdl") -- Standalone default 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
local function IsPolice(ply)
return true
end
function ENT:Use(activator, caller)
if self.Touched and self.Touched > CurTime() then return end
self.Touched = CurTime() + 2
-- Removing specific job check to allow anyone to use the jailer
activator.LastJailerNPC = self
net.Start("RHC_Jailer_Menu")
net.WriteEntity(activator.Dragging)
net.WriteString("RF")
net.Send(activator)
-- The else block and restriction message are removed.
-- if not isAllowed then
-- activator:ChatPrint("Только сотрудники исполнительной власти могут использовать этого NPC.")
-- return
-- end
end
function ENT:Think()
end

View File

@@ -0,0 +1,12 @@
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.Category = "ToBadForYou"
ENT.Spawnable = true
ENT.AdminSpawnable = true
ENT.PrintName = "Jailer NPC"
ENT.Author = "Military RP"
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
ENT.TBFYEnt = true