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,34 @@
include('shared.lua')
function ENT:Initialize()
end
function ENT:Think ()
end
local AttMat = Material("cable/cable")
function ENT:Draw()
local Player = self:GetOwningPlayer()
local AEnt = self:GetAttatchedEntity()
local APos = self:GetAttatchPosition()
if IsValid(AEnt) then
APos = AEnt:GetPos()
end
if IsValid(Player) then
local Bone = Player:LookupBone("ValveBiped.Bip01_R_Hand")
if Bone then
local Pos, Ang = Player:GetBonePosition(Bone)
local FPos = Pos + Ang:Forward() * 3.2 + Ang:Right() * 2 + Ang:Up() * -5
self:SetPos(FPos)
self:SetAngles(Ang)
render.SetMaterial(AttMat)
render.DrawBeam(self:GetPos(), APos, 1, 0, 0, Color(255, 255, 255, 255))
end
end
end
function ENT:OnRemove( )
end

View File

@@ -0,0 +1,23 @@
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')
function ENT:Initialize()
self.Entity:SetModel("models/tobadforyou/handcuffs.mdl")
self.Entity:PhysicsInit(SOLID_NONE)
self.Entity:SetMoveType(MOVETYPE_VPHYSICS)
self.Entity:SetSolid(SOLID_NONE)
self.Entity:SetUseType(SIMPLE_USE)
end
function ENT:Use( activator, caller )
end
function ENT:Think()
end
function ENT:Touch(TouchEnt)
if self.Entity.Touched and self.Entity.Touched > CurTime() then return ; end
self.Entity.Touched = CurTime() + 1;
end

View File

@@ -0,0 +1,16 @@
ENT.Type = "anim"
ENT.Base = "base_anim"
ENT.Category = "ToBadForYou"
ENT.Spawnable = false
ENT.PrintName = "Attatch Entity"
ENT.Author = "ToBadForYou"
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
function ENT:SetupDataTables()
self:NetworkVar("Entity", 0, "OwningPlayer")
self:NetworkVar("Entity", 1, "AttatchedEntity")
self:NetworkVar("Vector", 0, "AttatchPosition")
end

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

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

View File

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

View File

@@ -0,0 +1,55 @@
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
util.AddNetworkString("RHC_Jailer_Menu")
local RUSSIAN_FACTION = FACTION_RUSSIAN
local SPECIAL_PODR = 6
function ENT:Initialize()
self:SetModel("models/Barney.mdl")
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)
if self.Touched and self.Touched > CurTime() then return end
self.Touched = CurTime() + 1.5
local char = activator:GetCharacter()
if not char then return end
-- Removing specific job check to allow anyone to use the jailer
-- if not isAllowed then
-- activator:ChatPrint("Только сотрудники исполнительной власти могут использовать этого NPC.")
-- return
-- end
local targetPly = activator.Dragging
if not IsValid(targetPly) then
local closestDist = 40000 -- 200 units
for _, p in ipairs(player.GetAll()) do
if p ~= activator and p:GetNWBool("rhc_cuffed", false) then
local dist = p:GetPos():DistToSqr(activator:GetPos())
if dist < closestDist then
closestDist = dist
targetPly = p
end
end
end
end
activator.LastJailerNPC = self
activator.LastJailerFaction = "RF"
net.Start("RHC_Jailer_Menu")
net.WriteEntity(targetPly)
net.WriteString("RF")
net.Send(activator)
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 (RF)"
ENT.Author = "Military RP"
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
ENT.TBFYEnt = true

View File

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

View File

@@ -0,0 +1,55 @@
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
util.AddNetworkString("RHC_Jailer_Menu")
local UKRAINE_FACTION = FACTION_UKRAINE
local SPECIAL_PODR = 6
function ENT:Initialize()
self:SetModel("models/Barney.mdl")
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)
if self.Touched and self.Touched > CurTime() then return end
self.Touched = CurTime() + 1.5
local char = activator:GetCharacter()
if not char then return end
-- Removing specific job check to allow anyone to use the jailer
-- if not isAllowed then
-- activator:ChatPrint("Только сотрудники исполнительной власти могут использовать этого NPC.")
-- return
-- end
local targetPly = activator.Dragging
if not IsValid(targetPly) then
local closestDist = 40000 -- 200 units
for _, p in ipairs(player.GetAll()) do
if p ~= activator and p:GetNWBool("rhc_cuffed", false) then
local dist = p:GetPos():DistToSqr(activator:GetPos())
if dist < closestDist then
closestDist = dist
targetPly = p
end
end
end
end
activator.LastJailerNPC = self
activator.LastJailerFaction = "UK"
net.Start("RHC_Jailer_Menu")
net.WriteEntity(targetPly)
net.WriteString("UK")
net.Send(activator)
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 (UK)"
ENT.Author = "Military RP"
ENT.Contact = ""
ENT.Purpose = ""
ENT.Instructions = ""
ENT.TBFYEnt = true