add sborka
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
|
||||
/*
|
||||
Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
|
||||
Version: v1.7.8 (stable)
|
||||
*/
|
||||
|
||||
AddCSLuaFile()
|
||||
TOOL.Category = "Realistic Police"
|
||||
TOOL.Name = "Camera-Setup"
|
||||
TOOL.Author = "Kobralost"
|
||||
RPTDeployTool = false
|
||||
|
||||
if CLIENT then
|
||||
TOOL.Information = {
|
||||
{ name = "left" },
|
||||
{ name = "right" },
|
||||
}
|
||||
language.Add("tool.realistic_police_camera_tool.name", "Camera Setup")
|
||||
language.Add("tool.realistic_police_camera_tool.desc", "Create or modify Position of your Camera")
|
||||
language.Add("tool.realistic_police_camera_tool.left", "Left-Click to place the camera in your server" )
|
||||
language.Add("tool.realistic_police_camera_tool.right", "Right-Click to delete the camera on your server" )
|
||||
end
|
||||
|
||||
function TOOL:Deploy()
|
||||
RPTDeployTool = true
|
||||
end
|
||||
|
||||
function TOOL:LeftClick(trace)
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
|
||||
self:GetOwner().AntiSpam = self:GetOwner().AntiSpam or CurTime()
|
||||
if self:GetOwner().AntiSpam > CurTime() then return end
|
||||
self:GetOwner().AntiSpam = CurTime() + 0.5
|
||||
local ply = self:GetOwner()
|
||||
if SERVER then
|
||||
if not IsValid( ply ) && not ply:IsPlayer() then return end
|
||||
local trace = ply:GetEyeTrace()
|
||||
local position = trace.HitPos
|
||||
local angle = ply:GetAngles()
|
||||
local rpt_createent = ents.Create( "realistic_police_camera" )
|
||||
rpt_createent:SetPos(position + Vector(0, 0, 0))
|
||||
rpt_createent:SetAngles(Angle(0, angle.Yaw - 90, 0))
|
||||
rpt_createent:Spawn()
|
||||
rpt_createent:Activate()
|
||||
rpt_createent.RPTCam = true
|
||||
timer.Simple(0.1, function()
|
||||
net.Start("RealisticPolice:NameCamera")
|
||||
net.WriteEntity(rpt_createent)
|
||||
net.Send(self:GetOwner())
|
||||
end )
|
||||
else
|
||||
if not RPTDeployTool then RPTDeployTool = true end
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:RightClick()
|
||||
self:GetOwner().AntiSpam = self:GetOwner().AntiSpam or CurTime()
|
||||
if self:GetOwner().AntiSpam > CurTime() then return end
|
||||
self:GetOwner().AntiSpam = CurTime() + 0.01
|
||||
|
||||
if SERVER then
|
||||
local TraceEntity = self:GetOwner():GetEyeTrace().Entity
|
||||
if IsValid(TraceEntity) && TraceEntity:GetClass() == "realistic_police_camera" then
|
||||
TraceEntity:Remove()
|
||||
else
|
||||
if IsValid(ents.FindByClass("realistic_police_camera")[#ents.FindByClass("realistic_police_camera")]) then
|
||||
ents.FindByClass("realistic_police_camera")[#ents.FindByClass("realistic_police_camera")]:Remove()
|
||||
end
|
||||
end
|
||||
Realistic_Police.SaveEntity()
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:CreateRPTEnt()
|
||||
if CLIENT then
|
||||
if IsValid(self.RPTEnt) then else
|
||||
self.RPTEnt = ClientsideModel("models/wasted/wasted_kobralost_camera.mdl", RENDERGROUP_OPAQUE)
|
||||
self.RPTEnt:SetModel("models/wasted/wasted_kobralost_camera.mdl")
|
||||
self.RPTEnt:SetMaterial("models/wireframe")
|
||||
self.RPTEnt:SetPos(Vector(0,0,0))
|
||||
self.RPTEnt:SetAngles(Angle(0,0,0))
|
||||
self.RPTEnt:Spawn()
|
||||
self.RPTEnt:Activate()
|
||||
self.RPTEnt.Ang = Angle(0,0,0)
|
||||
self.RPTEnt:SetRenderMode(RENDERMODE_TRANSALPHA)
|
||||
self.RPTEnt:SetColor(Realistic_Police.Colors["white"])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:Think()
|
||||
if IsValid(self.RPTEnt) then
|
||||
ply = self:GetOwner()
|
||||
trace = util.TraceLine(util.GetPlayerTrace(ply))
|
||||
ang = ply:GetAimVector():Angle()
|
||||
Pos = Vector(trace.HitPos.X, trace.HitPos.Y, trace.HitPos.Z)
|
||||
Ang = Angle(0, ang.Yaw - 90, 0) + self.RPTEnt.Ang
|
||||
self.RPTEnt:SetPos(Pos)
|
||||
self.RPTEnt:SetAngles(Ang)
|
||||
else
|
||||
self:CreateRPTEnt()
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:Holster()
|
||||
if IsValid(self.RPTEnt) then
|
||||
self.RPTEnt:Remove()
|
||||
end
|
||||
RPTDeployTool = false
|
||||
end
|
||||
hook.Add("HUDPaint", "RPT:HUDPaint", function()
|
||||
if RPTDeployTool then
|
||||
for k,v in pairs(ents.FindByClass("realistic_police_camera")) do
|
||||
local tscreen = v:GetPos():ToScreen()
|
||||
draw.SimpleText( k, "rpt_font_2", tscreen.x, tscreen.y + 20, Realistic_Police.Colors["white"],1,1)
|
||||
draw.SimpleText( "☑" , "rpt_font_2", tscreen.x, tscreen.y, Realistic_Police.Colors["white"],1,1)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function TOOL.BuildCPanel( CPanel )
|
||||
CPanel:AddControl("label", {
|
||||
Text = "Save Realistic Police Entities" })
|
||||
CPanel:Button("Save Entities", "rpt_save")
|
||||
CPanel:AddControl("label", {
|
||||
Text = "Remove all Entities in The Data" })
|
||||
CPanel:Button("Remove Entities Data", "rpt_removedata")
|
||||
|
||||
CPanel:AddControl("label", {
|
||||
Text = "Remove all Entities in The Map" })
|
||||
CPanel:Button("Remove Entities Map", "rpt_cleaupentities")
|
||||
|
||||
CPanel:AddControl("label", {
|
||||
Text = "Reload all Entities in The Map" })
|
||||
CPanel:Button("Reload Entities Map", "rpt_reloadentities")
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
|
||||
/*
|
||||
Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
|
||||
Version: v1.7.8 (stable)
|
||||
*/
|
||||
|
||||
AddCSLuaFile()
|
||||
TOOL.Category = "Realistic Police"
|
||||
TOOL.Name = "HandCuff-Setup"
|
||||
TOOL.Author = "Kobralost"
|
||||
TOOL.StepId = 1
|
||||
|
||||
if CLIENT then
|
||||
TOOL.Information = {
|
||||
{ name = "left" },
|
||||
{ name = "right" },
|
||||
{ name = "use" },
|
||||
{ name = "reload" },
|
||||
}
|
||||
language.Add("tool.realistic_police_handcuff_tool.name", "HandCuff Setup")
|
||||
language.Add("tool.realistic_police_handcuff_tool.desc", "Create or modify Position of Bailor, Jailor & Jail")
|
||||
language.Add("tool.realistic_police_handcuff_tool.left", "Left-Click to place entities on the server" )
|
||||
language.Add("tool.realistic_police_handcuff_tool.right", "Right-Click to delete the last entity" )
|
||||
language.Add("tool.realistic_police_handcuff_tool.use", "USE to return to the previous step" )
|
||||
language.Add("tool.realistic_police_handcuff_tool.reload", "RELOAD to go to the next step" )
|
||||
end
|
||||
-- a91f6942e11bb9a70ff8e3d7a0dcc737fd407c85d2d10ff95a1cfed59177e84a
|
||||
|
||||
function TOOL:Deploy()
|
||||
self.StepId = 1
|
||||
end
|
||||
|
||||
-- Create the Entity ( Jailer , Bailer )
|
||||
function Realistic_Police.CreateEntityTool(Player, model, ent)
|
||||
local angle = Player:GetAimVector():Angle()
|
||||
local ang = Angle(0,angle.yaw + 180,0)
|
||||
|
||||
local EntityT = ents.Create( ent )
|
||||
EntityT:SetModel(model)
|
||||
if ent == "realistic_police_jailpos" then
|
||||
EntityT:SetPos( Player:GetEyeTrace().HitPos + Vector(0,0,13) )
|
||||
else
|
||||
EntityT:SetPos( Player:GetEyeTrace().HitPos + Vector(0,0,0) )
|
||||
end
|
||||
EntityT:SetAngles(ang)
|
||||
EntityT:Spawn()
|
||||
end
|
||||
|
||||
function TOOL:LeftClick(trace)
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
|
||||
self:GetOwner().AntiSpam = self:GetOwner().AntiSpam or CurTime()
|
||||
if self:GetOwner().AntiSpam > CurTime() then return end
|
||||
self:GetOwner().AntiSpam = CurTime() + 0.1
|
||||
if SERVER then
|
||||
if self.StepId == 1 then
|
||||
Realistic_Police.CreateEntityTool(self:GetOwner(), "models/Humans/Group01/Female_02.mdl", "realistic_police_jailer")
|
||||
elseif self.StepId == 2 then
|
||||
Realistic_Police.CreateEntityTool(self:GetOwner(), "models/Humans/Group01/Female_02.mdl", "realistic_police_bailer")
|
||||
elseif self.StepId == 3 then
|
||||
Realistic_Police.CreateEntityTool(self:GetOwner(), "models/hunter/blocks/cube05x05x05.mdl", "realistic_police_jailpos")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:RightClick()
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
|
||||
self:GetOwner().AntiSpam = self:GetOwner().AntiSpam or CurTime()
|
||||
if self:GetOwner().AntiSpam > CurTime() then return end
|
||||
self:GetOwner().AntiSpam = CurTime() + 0.1
|
||||
|
||||
if SERVER then
|
||||
local Ent = self:GetOwner():GetEyeTrace().Entity
|
||||
if IsValid(Ent) then
|
||||
if Ent:GetClass() == "realistic_police_bailer" or Ent:GetClass() == "realistic_police_jailer" or Ent:GetClass() == "realistic_police_jailpos" then
|
||||
Ent:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function TOOL:DrawToolScreen( w, h )
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
if CLIENT then
|
||||
surface.SetDrawColor( Realistic_Police.Colors["darkblue"] )
|
||||
surface.DrawRect( 0, 0, w, h )
|
||||
surface.SetDrawColor( Color(52, 73, 94) )
|
||||
surface.DrawRect( 15, 20 + ( self.StepId * 70 ) - 70, w-30, 74 )
|
||||
surface.SetDrawColor( Realistic_Police.Colors["white"] )
|
||||
surface.DrawRect( 15, 20 + ( self.StepId * 70 ) - 70, w-30, 2 )
|
||||
surface.SetDrawColor( Realistic_Police.Colors["white"] )
|
||||
surface.DrawRect( 15, 20 + ( self.StepId * 70 ) + 5, w-30, 2 )
|
||||
draw.SimpleText( "Jailor NPC", "rpt_font_18", w / 2, h / 4.7, Realistic_Police.Colors["white"], TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
|
||||
draw.SimpleText( "Bailor NPC", "rpt_font_18", w / 2, h / 2, Realistic_Police.Colors["white"], TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
|
||||
draw.SimpleText( "Jail Position", "rpt_font_18", w / 2, h / 1.3, Realistic_Police.Colors["white"], TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:CreateGhostRPTEnt(Model)
|
||||
if CLIENT then
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
if not IsValid(self.RPTGhostEnt) then
|
||||
self.RPTGhostEnt = ClientsideModel(Model, RENDERGROUP_OPAQUE)
|
||||
self.RPTGhostEnt:SetModel(Model)
|
||||
self.RPTGhostEnt:SetMaterial("models/wireframe")
|
||||
self.RPTGhostEnt:SetPos(Vector(0,0,0))
|
||||
self.RPTGhostEnt:SetAngles(self:GetOwner():GetAngles())
|
||||
self.RPTGhostEnt:Spawn()
|
||||
self.RPTGhostEnt:Activate()
|
||||
self.RPTGhostEnt.Ang = self:GetOwner():GetAngles()
|
||||
|
||||
self.RPTGhostEnt:SetRenderMode(RENDERMODE_TRANSALPHA)
|
||||
self.RPTGhostEnt:SetColor(Realistic_Police.Colors["white"])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:Reload(trace)
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
|
||||
self:GetOwner().AntiSpam = self:GetOwner().AntiSpam or CurTime()
|
||||
if self:GetOwner().AntiSpam > CurTime() then return end
|
||||
self:GetOwner().AntiSpam = CurTime() + 0.1
|
||||
|
||||
if self.StepId != 3 then
|
||||
self.StepId = self.StepId + 1
|
||||
if self.StepId == 1 or self.StepId == 2 then
|
||||
if IsValid(self.RPTGhostEnt) then
|
||||
self.RPTGhostEnt:Remove()
|
||||
end
|
||||
self:CreateGhostRPTEnt("models/Humans/Group01/Female_02.mdl")
|
||||
else
|
||||
if IsValid(self.RPTGhostEnt) then
|
||||
self.RPTGhostEnt:Remove()
|
||||
end
|
||||
self:CreateGhostRPTEnt("models/hunter/blocks/cube05x05x05.mdl")
|
||||
end
|
||||
else
|
||||
if IsValid(self.RPTGhostEnt) then
|
||||
self.RPTGhostEnt:Remove()
|
||||
end
|
||||
self.StepId = 1
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:Think()
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
|
||||
if self.StepId >= 1 or self.StepId <= 3 then
|
||||
if IsValid(self.RPTGhostEnt) then
|
||||
ply = self:GetOwner()
|
||||
trace = util.TraceLine(util.GetPlayerTrace(ply))
|
||||
angle = ply:GetAimVector():Angle()
|
||||
ang = Angle(0,angle.yaw + 180,0)
|
||||
if self.StepId != 3 then
|
||||
Pos = Vector(trace.HitPos.X, trace.HitPos.Y, trace.HitPos.Z)
|
||||
else
|
||||
Pos = Vector(trace.HitPos.X, trace.HitPos.Y, trace.HitPos.Z + 13)
|
||||
end
|
||||
self.RPTGhostEnt:SetPos(Pos)
|
||||
self.RPTGhostEnt:SetAngles(ang)
|
||||
else
|
||||
if self.StepId == 1 or self.StepId == 2 then
|
||||
self:CreateGhostRPTEnt("models/Humans/Group01/Female_02.mdl")
|
||||
else
|
||||
self:CreateGhostRPTEnt("models/hunter/blocks/cube05x05x05.mdl")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:Holster()
|
||||
if IsValid(self.RPTGhostEnt) then
|
||||
if IsValid(self.RPTGhostEnt) then
|
||||
self.RPTGhostEnt:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL.BuildCPanel( CPanel )
|
||||
CPanel:AddControl("label", {
|
||||
Text = "Save Jailer / Bailer / Jail Pos Entities" })
|
||||
CPanel:Button("Save Entities", "rpt_savejailpos")
|
||||
|
||||
CPanel:AddControl("label", {
|
||||
Text = "Remove all Handcuff Entities in The Data" })
|
||||
CPanel:Button("Remove Entities Data", "rpt_removedatajail")
|
||||
|
||||
CPanel:AddControl("label", {
|
||||
Text = "Remove all Handcuff Entities in The Map" })
|
||||
CPanel:Button("Remove Entities Map", "rpt_removejail")
|
||||
|
||||
CPanel:AddControl("label", {
|
||||
Text = "Reload all Handcuff Entities in The Map" })
|
||||
CPanel:Button("Reload Entities Map", "rpt_reloadjailent")
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1,324 @@
|
||||
|
||||
/*
|
||||
Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
|
||||
Version: v1.7.8 (stable)
|
||||
*/
|
||||
|
||||
AddCSLuaFile()
|
||||
TOOL.Category = "Realistic Police"
|
||||
TOOL.Name = "Plate-Setup"
|
||||
TOOL.Author = "Kobralost"
|
||||
TOOL.StepID = 1
|
||||
|
||||
if CLIENT then
|
||||
RPTStepID = 1
|
||||
TOOL.Information = {
|
||||
{ name = "left" },
|
||||
{ name = "right" },
|
||||
{ name = "use" },
|
||||
{ name = "reload" },
|
||||
}
|
||||
language.Add("tool.realistic_police_plate_tool.name", "License Plate Setup")
|
||||
language.Add("tool.realistic_police_plate_tool.desc", "Create or modify License Plate in your server")
|
||||
language.Add("tool.realistic_police_plate_tool.left", "Left-Click to select the vehicle & Place the License Plate" )
|
||||
language.Add("tool.realistic_police_plate_tool.use", "Use to return to the previous step and modify the first License Plate" )
|
||||
language.Add("tool.realistic_police_plate_tool.right", "Right-Click to delete the license plate of the vehicle" )
|
||||
language.Add("tool.realistic_police_plate_tool.reload", "Reload to go to the next step & Place two License Plate" )
|
||||
end
|
||||
-- Reset Variables of the Plate ( Rotation , Size , Position)
|
||||
local function ResetPosition()
|
||||
RPTPosition = {
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0,
|
||||
[5] = 0,
|
||||
[6] = 0,
|
||||
[7] = 0,
|
||||
[8] = 0,
|
||||
}
|
||||
RPTPosition2 = {
|
||||
[1] = 0,
|
||||
[2] = 0,
|
||||
[3] = 0,
|
||||
[4] = 0,
|
||||
[5] = 0,
|
||||
[6] = 0,
|
||||
[7] = 0,
|
||||
[8] = 0,
|
||||
}
|
||||
end
|
||||
|
||||
function TOOL:Deploy()
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
if SERVER then
|
||||
self.StepID = 1
|
||||
elseif CLIENT then
|
||||
RPTToolSetup = false
|
||||
RPTStepID = 1
|
||||
RPTGhostActivate = true
|
||||
ResetPosition()
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:Reload()
|
||||
self:GetOwner().AntiSpam = self:GetOwner().AntiSpam or CurTime()
|
||||
if self:GetOwner().AntiSpam > CurTime() then return end
|
||||
self:GetOwner().AntiSpam = CurTime() + 0.1
|
||||
-- dcb587233a6e567b06ae4da5655e3e9649694e7946f4d648e8f3181d8bc95b5f
|
||||
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
if CLIENT then
|
||||
if RPTStepID == 2 then
|
||||
if PosPlate != nil then
|
||||
RPTStepID = 3
|
||||
RPTGhostActivate = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("KeyPress", "RealisticPolice:KeyPress", function(ply, key)
|
||||
if ( key == IN_USE ) then
|
||||
if CLIENT then
|
||||
if IsValid(ply) && ply:IsPlayer() then
|
||||
if Realistic_Police && Realistic_Police.AdminRank && Realistic_Police.AdminRank[ply:GetUserGroup()] then
|
||||
if RPTStepID == 3 then
|
||||
RPTStepID = 2
|
||||
RPTGhostActivate = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end )
|
||||
function TOOL:RightClick() -- Remove the Plate
|
||||
self:GetOwner().AntiSpam = self:GetOwner().AntiSpam or CurTime()
|
||||
if self:GetOwner().AntiSpam > CurTime() then return end
|
||||
self:GetOwner().AntiSpam = CurTime() + 0.5
|
||||
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
|
||||
if CLIENT then
|
||||
if Realistic_Police.AdminRank[LocalPlayer():GetUserGroup()] then
|
||||
if RPTStepID == 2 then
|
||||
PosPlate = nil
|
||||
RPTGhostActivate = true
|
||||
end
|
||||
if RPTStepID == 3 then
|
||||
PosPlate2 = nil
|
||||
RPTGhostActivate = true
|
||||
end
|
||||
end
|
||||
elseif SERVER then
|
||||
local EntityTrace = self:GetOwner():GetEyeTrace().Entity
|
||||
local RealisticPoliceFil = file.Read("realistic_police/vehicles.txt", "DATA") or ""
|
||||
local RealisticPoliceTab = util.JSONToTable(RealisticPoliceFil) or {}
|
||||
|
||||
if istable(RealisticPoliceTab[EntityTrace:GetModel()]) then
|
||||
if EntityTrace:IsVehicle() then
|
||||
RealisticPoliceTab[EntityTrace:GetModel()] = nil
|
||||
file.Write("realistic_police/vehicles.txt", util.TableToJSON(RealisticPoliceTab))
|
||||
timer.Simple(0.1, function()
|
||||
local RealisticPoliceFil = file.Read("realistic_police/vehicles.txt", "DATA") or ""
|
||||
local RealisticPoliceTab = util.JSONToTable(RealisticPoliceFil) or {}
|
||||
local CompressTable = util.Compress(RealisticPoliceFil)
|
||||
net.Start("RealisticPolice:SendInformation")
|
||||
net.WriteInt(CompressTable:len(), 32)
|
||||
net.WriteData(CompressTable, CompressTable:len() )
|
||||
net.Broadcast()
|
||||
end )
|
||||
end
|
||||
else
|
||||
EntityTrace:Remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:Think() -- Debug
|
||||
if SERVER then
|
||||
if not IsValid(self.car_setup) then
|
||||
if self.StepID > 1 then
|
||||
net.Start("RealisticPolice:UpdateInformation")
|
||||
net.Send(self:GetOwner())
|
||||
self.StepID = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if CLIENT then
|
||||
net.Receive("RealisticPolice:UpdateInformation", function()
|
||||
if IsValid(RPTMain) then RPTMain:Remove() end
|
||||
RPTStepID = 1
|
||||
RPTToolSetup = false
|
||||
PosPlate = nil
|
||||
RPTGhostActivate = true
|
||||
PosPlate2 = nil
|
||||
RPTGhostActivate = true
|
||||
ResetPosition()
|
||||
end )
|
||||
end
|
||||
|
||||
function TOOL:LeftClick(trace) -- Place the Plate
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
self:GetOwner().AntiSpam = self:GetOwner().AntiSpam or CurTime()
|
||||
if self:GetOwner().AntiSpam > CurTime() then return end
|
||||
self:GetOwner().AntiSpam = CurTime() + 0.3
|
||||
|
||||
if SERVER then
|
||||
local EntityTrace = trace.Entity
|
||||
if EntityTrace:IsVehicle() then
|
||||
if IsValid(self.car_setup) then
|
||||
self.car_setup:Remove()
|
||||
self.StepID = 2
|
||||
end
|
||||
end
|
||||
if self.StepID == 2 then
|
||||
timer.Simple(0.2, function()
|
||||
if IsValid(self:GetOwner()) then
|
||||
net.Start("RealisticPolice:SetupVehicle")
|
||||
net.WriteEntity(self.car_setup)
|
||||
net.Send(self:GetOwner())
|
||||
end
|
||||
end )
|
||||
end
|
||||
if self.StepID == 1 then
|
||||
if IsValid(EntityTrace) then
|
||||
local EntitiyLook = self:GetOwner():GetEyeTrace().Entity
|
||||
self.car_setup = ents.Create( "prop_physics" )
|
||||
self.car_setup:SetModel( EntitiyLook:GetModel() )
|
||||
self.car_setup:SetPos( EntitiyLook:GetPos() )
|
||||
self.car_setup:SetAngles( Angle(0,0,0) )
|
||||
self.car_setup.VehicleSetupRPT = true
|
||||
self.car_setup.Owner = self:GetOwner()
|
||||
self.car_setup:Spawn()
|
||||
local phys = self.car_setup:GetPhysicsObject()
|
||||
if phys and phys:IsValid() then
|
||||
phys:EnableMotion(false)
|
||||
end
|
||||
timer.Create("rpt_timer_setupvehicle"..self.car_setup:EntIndex(), 0.1, 0, function()
|
||||
if not IsValid(self.car_setup) then timer.Remove("rpt_timer_setupvehicle") RPTToolSetup = false end
|
||||
if IsValid(self.car_setup) then
|
||||
self.car_setup:SetAngles( Angle(0,0,0) )
|
||||
local phys = self.car_setup:GetPhysicsObject()
|
||||
if phys and phys:IsValid() then
|
||||
phys:EnableMotion(false)
|
||||
end
|
||||
end
|
||||
end )
|
||||
EntitiyLook:Remove()
|
||||
self.StepID = 2
|
||||
end
|
||||
end
|
||||
elseif CLIENT then
|
||||
ResetPosition()
|
||||
local EntityTrace = trace.Entity
|
||||
if RPTStepID == 2 then
|
||||
if RPTToolSetup then
|
||||
PosPlate = LocalPlayer():GetEyeTrace().HitPos
|
||||
local ang = LocalPlayer():GetAimVector():Angle()
|
||||
AngPlate = Angle(0, ang.Yaw + -90, 90):SnapTo( "y", 1 )
|
||||
RPTGhostActivate = false
|
||||
end
|
||||
end
|
||||
if RPTStepID == 3 then
|
||||
PosPlate2 = LocalPlayer():GetEyeTrace().HitPos
|
||||
local ang = LocalPlayer():GetAimVector():Angle()
|
||||
AngPlate2 = Angle(0, ang.Yaw + -90, 90):SnapTo( "y", 1 )
|
||||
RPTGhostActivate = false
|
||||
end
|
||||
if EntityTrace:IsVehicle() then
|
||||
RPTGhostActivate = true
|
||||
RPTToolSetup = true
|
||||
RPTStepID = 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function TOOL:Holster()
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
if CLIENT then
|
||||
RPTToolSetup = false
|
||||
RPTGhostActivate = false
|
||||
PosPlate = nil
|
||||
PosPlate2 = nil
|
||||
if IsValid(RPTMain) then RPTMain:Remove() end
|
||||
ResetPosition()
|
||||
else
|
||||
if IsValid(self.car_setup) then self.car_setup:Remove() end
|
||||
end
|
||||
end
|
||||
|
||||
local toolGun = {
|
||||
[1] = Realistic_Police.GetSentence("configureLicenseplate"),
|
||||
[2] = Realistic_Police.GetSentence("placeLicenseplate"),
|
||||
[3] = Realistic_Police.GetSentence("placeLicenseplate2"),
|
||||
}
|
||||
|
||||
function TOOL:DrawToolScreen( w, h )
|
||||
if not Realistic_Police.AdminRank[self:GetOwner():GetUserGroup()] then return end
|
||||
if CLIENT then
|
||||
surface.SetDrawColor( Realistic_Police.Colors["black"] )
|
||||
surface.DrawRect( 0, 0, w, h )
|
||||
surface.SetDrawColor( Realistic_Police.Colors["bluetool"] )
|
||||
surface.DrawRect( 15, 20, w-30, 70 )
|
||||
surface.SetDrawColor( Realistic_Police.Colors["white"] )
|
||||
surface.DrawRect( 15, 85 , w-30, 2 )
|
||||
surface.SetDrawColor( Realistic_Police.Colors["white"] )
|
||||
surface.DrawRect( 15, 25, w-30, 2 )
|
||||
draw.SimpleText("Step "..RPTStepID, "rpt_font_18", w/2, h/5,Realistic_Police.Colors["white"],TEXT_ALIGN_CENTER,TEXT_ALIGN_CENTER)
|
||||
draw.DrawText(toolGun[RPTStepID], "rpt_font_18", w/2, h/2.3,Realistic_Police.Colors["white"],TEXT_ALIGN_CENTER)
|
||||
end
|
||||
end
|
||||
|
||||
local function RealisticPoliceGhost(pos, ang, RptTable)
|
||||
cam.Start3D2D( pos, ang, 0.02 )
|
||||
if Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["Image"] != nil then
|
||||
surface.SetDrawColor( Realistic_Police.Colors["gray"] )
|
||||
surface.SetMaterial( Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["Image"] )
|
||||
surface.DrawTexturedRect( 0, 0, 1400 + RptTable[7], 400 + RptTable[8])
|
||||
end
|
||||
if Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["Country"] != nil then
|
||||
local Country = Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["Country"]
|
||||
draw.SimpleText(Country, Realistic_Police.Fonts((1400 + RptTable[7])/12 + RptTable[8]*0.05), (1400 + RptTable[7]) - (1400 + RptTable[7])/Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["CountryPos"][1], (400 + RptTable[8])/Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["CountryPos"][2], Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["CountryColor"], TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
end
|
||||
if Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["Department"] != nil then
|
||||
draw.SimpleText(Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["Department"], Realistic_Police.Fonts((1400 + RptTable[7])/13+ RptTable[8]*0.05), (1400 + RptTable[7])/1.06, (400 + RptTable[8])/1.4, Realistic_Police.Colors["gray"], TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
end
|
||||
if not Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["PlateText"] then
|
||||
draw.SimpleText("ABDS582D", Realistic_Police.Fonts((1400 + RptTable[7])/6 + RptTable[8]*0.05),(1400 + RptTable[7])/Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["PlatePos"][1] - 5, (400 + RptTable[8])/ Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["PlatePos"][2]+5, Realistic_Police.Colors["white"], TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
draw.SimpleText("ABDS582D", Realistic_Police.Fonts((1400 + RptTable[7])/6 + RptTable[8]*0.05), (1400 + RptTable[7])/Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["PlatePos"][1], (400 + RptTable[8])/ Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["PlatePos"][2], Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["TextColor"], TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
else
|
||||
draw.SimpleText("AA-123-BB", Realistic_Police.Fonts((1400 + RptTable[7])/6 + RptTable[8]*0.05),(1400 + RptTable[7])/Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["PlatePos"][1] - 5, (400 + RptTable[8])/ Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["PlatePos"][2]+5, Realistic_Police.Colors["white"], TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
draw.SimpleText("AA-123-BB", Realistic_Police.Fonts((1400 + RptTable[7])/6 + RptTable[8]*0.05),(1400 + RptTable[7])/Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["PlatePos"][1], (400 + RptTable[8])/ Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["PlatePos"][2], Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["TextColor"], TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
|
||||
end
|
||||
if Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["ImageServer"] != nil then
|
||||
surface.SetDrawColor( Realistic_Police.Colors["gray"] )
|
||||
surface.SetMaterial( Realistic_Police.PlateConfig[Realistic_Police.LangagePlate]["ImageServer"] )
|
||||
surface.DrawTexturedRect( (1400 + RptTable[7])/1.104, (400 + RptTable[8])/6, (1400 + RptTable[7])/14,(400 + RptTable[8])/3 )
|
||||
end
|
||||
cam.End3D2D()
|
||||
end
|
||||
if CLIENT then -- Preview of the Plate
|
||||
hook.Add("PostDrawTranslucentRenderables", "RPT:LicensePlateTool", function() -- Draw Plate
|
||||
if RPTToolSetup then
|
||||
if PosPlate != nil then
|
||||
RealisticPoliceGhost(PosPlate + Vector(RPTPosition[1],RPTPosition[2],RPTPosition[3]), AngPlate + Angle(RPTPosition[4],RPTPosition[5],RPTPosition[6]), RPTPosition)
|
||||
end
|
||||
if PosPlate == nil or PosPlate2 == nil then
|
||||
if RPTGhostActivate then
|
||||
local Pos = LocalPlayer():GetEyeTrace().HitPos
|
||||
local ang = LocalPlayer():GetAimVector():Angle()
|
||||
RPTAngSnap = Angle(0, ang.Yaw + -90, 90):SnapTo( "y", 1 )
|
||||
RealisticPoliceGhost(Pos, RPTAngSnap + Angle(RPTPosition[4],RPTPosition[5],RPTPosition[6]), RPTPosition)
|
||||
end
|
||||
end
|
||||
if PosPlate2 != nil then
|
||||
RealisticPoliceGhost(PosPlate2 + Vector(RPTPosition2[1],RPTPosition2[2],RPTPosition2[3]), AngPlate2 + Angle(RPTPosition2[4],RPTPosition2[5],RPTPosition2[6]), RPTPosition2)
|
||||
end
|
||||
end
|
||||
end )
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
|
||||
/*
|
||||
Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
|
||||
Version: v1.7.8 (stable)
|
||||
*/
|
||||
|
||||
AddCSLuaFile()
|
||||
|
||||
SWEP.PrintName = "Cuffed"
|
||||
SWEP.Author = "Kobralost"
|
||||
SWEP.Purpose = ""
|
||||
|
||||
SWEP.Slot = 2
|
||||
SWEP.SlotPos = 1
|
||||
|
||||
SWEP.Spawnable = false
|
||||
|
||||
SWEP.Category = "Realistic Police"
|
||||
SWEP.ViewModel = Model( "" )
|
||||
SWEP.WorldModel = Model("models/realistic_police/handcuffs/w_deploy_handcuffs.mdl")
|
||||
SWEP.ViewModelFOV = 75
|
||||
SWEP.UseHands = false
|
||||
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.DefaultClip = -1
|
||||
SWEP.Primary.Automatic = true
|
||||
SWEP.Primary.Ammo = "none"
|
||||
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.DefaultClip = -1
|
||||
SWEP.Secondary.Automatic = true
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
SWEP.DrawAmmo = false
|
||||
|
||||
SWEP.HitDistance = 125
|
||||
|
||||
SWEP.DarkRPCanLockpick = true
|
||||
function SWEP:Deploy()
|
||||
local Owner = self:GetOwner()
|
||||
-- Manipulate the Bone of the Player
|
||||
timer.Simple(0.2, function()
|
||||
for k,v in pairs(Realistic_Police.ManipulateBoneCuffed) do
|
||||
local bone = Owner:LookupBone(k)
|
||||
if bone then
|
||||
Owner:ManipulateBoneAngles(bone, v)
|
||||
end
|
||||
end
|
||||
self:SetHoldType("passive")
|
||||
end)
|
||||
end
|
||||
if CLIENT then
|
||||
local WorldModel = ClientsideModel(SWEP.WorldModel)
|
||||
|
||||
WorldModel:SetSkin(1)
|
||||
WorldModel:SetNoDraw(true)
|
||||
|
||||
function SWEP:DrawWorldModel()
|
||||
local _Owner = self:GetOwner()
|
||||
|
||||
if (IsValid(_Owner)) then
|
||||
|
||||
local offsetVec = Vector(5, 1, -9)
|
||||
local offsetAng = Angle(190, 140, -20)
|
||||
|
||||
local boneid = _Owner:LookupBone("ValveBiped.Bip01_R_Hand")
|
||||
if !boneid then return end
|
||||
|
||||
local matrix = _Owner:GetBoneMatrix(boneid)
|
||||
if !matrix then return end
|
||||
local newPos, newAng = LocalToWorld(offsetVec, offsetAng, matrix:GetTranslation(), matrix:GetAngles())
|
||||
|
||||
WorldModel:SetPos(newPos)
|
||||
WorldModel:SetAngles(newAng)
|
||||
WorldModel:SetupBones()
|
||||
else
|
||||
WorldModel:SetPos(self:GetPos())
|
||||
WorldModel:SetAngles(self:GetAngles())
|
||||
end
|
||||
|
||||
WorldModel:DrawModel()
|
||||
end
|
||||
WorldModel:SetModelScale( WorldModel:GetModelScale() * 1.3, 0 )
|
||||
end
|
||||
|
||||
if CLIENT then
|
||||
function SWEP:DrawHUD()
|
||||
draw.SimpleTextOutlined(Realistic_Police.GetSentence("youArrest"),"rpt_font_9", ScrW()/2, ScrH()/15, Realistic_Police.Colors["white"], TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM,2, Realistic_Police.Colors["black"])
|
||||
if math.Round(LocalPlayer():GetNWInt("rpt_arrest_time") - CurTime()) > 0 then
|
||||
draw.SimpleTextOutlined("[ "..math.Round(LocalPlayer():GetNWInt("rpt_arrest_time") - CurTime()).." ] - "..Realistic_Police.GetSentence("seconds"),"rpt_font_9", ScrW()/2, ScrH()/11, Realistic_Police.Colors["white"], TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM,2, Realistic_Police.Colors["black"])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:CanPrimaryAttack() end
|
||||
function SWEP:CanSecondaryAttack() end
|
||||
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
|
||||
/*
|
||||
Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
|
||||
Version: v1.7.8 (stable)
|
||||
*/
|
||||
|
||||
AddCSLuaFile()
|
||||
|
||||
SWEP.PrintName = "Книга штрафов"
|
||||
SWEP.Author = "Kobralost"
|
||||
SWEP.Purpose = ""
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 4
|
||||
|
||||
SWEP.Spawnable = true
|
||||
-- a91f6942e11bb9a70ff8e3d7a0dcc737fd407c85d2d10ff95a1cfed59177e84a
|
||||
|
||||
SWEP.Category = "Realistic Police"
|
||||
SWEP.ViewModel = Model( "models/realistic_police/finebook/c_notebook.mdl" )
|
||||
SWEP.WorldModel = Model("models/realistic_police/finebook/w_notebook.mdl")
|
||||
SWEP.ViewModelFOV = 75
|
||||
SWEP.UseHands = true
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.DefaultClip = -1
|
||||
SWEP.Primary.Automatic = true
|
||||
SWEP.Primary.Ammo = "none"
|
||||
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.DefaultClip = -1
|
||||
SWEP.Secondary.Automatic = true
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
SWEP.DrawAmmo = false
|
||||
|
||||
SWEP.HitDistance = 125
|
||||
|
||||
function SWEP:Deploy()
|
||||
local Owner = self:GetOwner()
|
||||
|
||||
self:SendWeaponAnim( ACT_VM_DRAW )
|
||||
self:SetNextPrimaryFire( CurTime() + self:SequenceDuration() )
|
||||
-- Play the idle animation next the primary attack
|
||||
timer.Create("rpt_animation"..self:GetOwner():EntIndex(), self:SequenceDuration(), 1, function()
|
||||
if IsValid(self) && IsValid(Owner) then
|
||||
if Owner:GetActiveWeapon() == self then
|
||||
self:SendWeaponAnim( ACT_VM_IDLE )
|
||||
end
|
||||
end
|
||||
end )
|
||||
end
|
||||
|
||||
function SWEP:PrimaryAttack()
|
||||
local Owner = self:GetOwner()
|
||||
|
||||
Owner.AntiSpam = Owner.AntiSpam or CurTime()
|
||||
if Owner.AntiSpam > CurTime() then return end
|
||||
Owner.AntiSpam = CurTime() + 1
|
||||
|
||||
if SERVER then
|
||||
Owner.WeaponRPT["Fine"] = Owner:GetEyeTrace().Entity
|
||||
if IsValid(Owner.WeaponRPT["Fine"]) then
|
||||
|
||||
-- Check if the entity is a vehicle or a player
|
||||
if Owner.WeaponRPT["Fine"]:IsPlayer() or Owner.WeaponRPT["Fine"]:IsVehicle() then
|
||||
|
||||
-- Check if the Police Man is near the entity
|
||||
if Owner:GetPos():DistToSqr(Owner.WeaponRPT["Fine"]:GetPos()) < 140^2 then
|
||||
|
||||
-- Check if the player can add a fine
|
||||
if not Realistic_Police.JobCanAddFine[Realistic_Police.GetPlayerJob(Owner)] then
|
||||
Realistic_Police.SendNotify(Owner, Realistic_Police.GetSentence("noGoodJob"))
|
||||
return
|
||||
end
|
||||
|
||||
-- Check if the Player can have a fine
|
||||
if Owner.WeaponRPT["Fine"]:IsPlayer() then
|
||||
if Realistic_Police.JobCantHaveFine[Realistic_Police.GetPlayerJob(Owner.WeaponRPT["Fine"])] then
|
||||
Realistic_Police.SendNotify(Owner, Realistic_Police.GetSentence("userCantReceiveFine"))
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- Check if this type of vehicle can have a fine
|
||||
if Owner.WeaponRPT["Fine"]:IsVehicle() then
|
||||
if Realistic_Police.VehicleCantHaveFine[Owner.WeaponRPT["Fine"]:GetVehicleClass()] then
|
||||
Realistic_Police.SendNotify(Owner, Realistic_Police.GetSentence("vehicleCantHaveFine"))
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- Send information about the type of the entity if it's a player or a vehicle
|
||||
local RPTCheck = nil
|
||||
if Owner.WeaponRPT["Fine"]:IsPlayer() then
|
||||
Owner.WeaponRPT["Fine"]:Freeze(true)
|
||||
RPTCheck = false
|
||||
else
|
||||
RPTCheck = true
|
||||
end
|
||||
|
||||
-- Remove the Unfreeze timer of the player
|
||||
if timer.Exists("rpt_stungun_unfreeze"..Owner.WeaponRPT["Fine"]:EntIndex()) then
|
||||
timer.Remove("rpt_stungun_unfreeze"..Owner.WeaponRPT["Fine"]:EntIndex())
|
||||
end
|
||||
|
||||
net.Start("RealisticPolice:Open")
|
||||
net.WriteString("OpenFiningMenu")
|
||||
net.WriteBool(RPTCheck)
|
||||
net.Send(Owner)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack() end
|
||||
|
||||
|
||||
@@ -0,0 +1,272 @@
|
||||
|
||||
/*
|
||||
Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
|
||||
Version: v1.7.8 (stable)
|
||||
*/
|
||||
|
||||
|
||||
AddCSLuaFile()
|
||||
|
||||
SWEP.PrintName = "Наручники"
|
||||
SWEP.Author = "Kobralost"
|
||||
SWEP.Purpose = ""
|
||||
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 4
|
||||
|
||||
SWEP.Spawnable = true
|
||||
|
||||
SWEP.Category = "Realistic Police"
|
||||
|
||||
SWEP.ViewModel = Model("models/realistic_police/handcuffs/c_handcuffs.mdl")
|
||||
SWEP.WorldModel = Model("models/realistic_police/handcuffs/w_handcuffs.mdl")
|
||||
SWEP.ViewModelFOV = 80
|
||||
SWEP.UseHands = true
|
||||
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.DefaultClip = -1
|
||||
SWEP.Primary.Automatic = true
|
||||
SWEP.Primary.Ammo = "none"
|
||||
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.DefaultClip = -1
|
||||
SWEP.Secondary.Automatic = true
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
SWEP.DrawAmmo = false
|
||||
|
||||
SWEP.HitDistance = 125
|
||||
|
||||
function SWEP:PrimaryAttack()
|
||||
local Owner = self:GetOwner()
|
||||
if not IsValid(Owner) then return end
|
||||
|
||||
local ply = Owner:GetEyeTrace().Entity
|
||||
if not IsValid(ply) then return end
|
||||
|
||||
Owner.AntiSpam = Owner.AntiSpam or CurTime()
|
||||
if Owner.AntiSpam > CurTime() then return end
|
||||
Owner.AntiSpam = CurTime() + 1
|
||||
|
||||
if DarkRP and ply:IsPlayer() then
|
||||
if ply.isArrested && ply:isArrested() then return end
|
||||
end
|
||||
|
||||
-- Check if the Police Man Can Cuff the player
|
||||
if not Realistic_Police.CanCuff[Realistic_Police.GetPlayerJob(Owner)] then
|
||||
if SERVER then
|
||||
Realistic_Police.SendNotify(Owner, Realistic_Police.GetSentence("noGoodJobToArrestuser"))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
-- Check if the player can be cuff or not
|
||||
if IsValid(ply) && ply:IsPlayer() then
|
||||
if Realistic_Police.CantBeCuff[Realistic_Police.GetPlayerJob(ply)] then
|
||||
if SERVER then
|
||||
Realistic_Police.SendNotify(Owner, Realistic_Police.GetSentence("cantArrestPlayer"))
|
||||
end
|
||||
return
|
||||
end
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
if Owner:GetPos():DistToSqr(ply:GetPos()) > 20000 then return end
|
||||
|
||||
if SERVER then
|
||||
|
||||
if ply.WeaponRPT["Cuff"] == nil or not ply.WeaponRPT["Cuff"] then
|
||||
|
||||
-- Freeze the Player and The police man
|
||||
ply:Freeze(true)
|
||||
Owner:Freeze(true)
|
||||
ply.WeaponRPT["processCuff"] = true
|
||||
|
||||
-- Remove the Unfreeze timer of the player
|
||||
if timer.Exists("rpt_stungun_unfreeze"..ply:EntIndex()) then
|
||||
timer.Remove("rpt_stungun_unfreeze"..ply:EntIndex())
|
||||
end
|
||||
|
||||
timer.Simple(self:SequenceDuration(), function()
|
||||
if IsValid(ply) && IsValid(Owner) then
|
||||
Realistic_Police.Cuff(ply, Owner)
|
||||
|
||||
if IsValid(ply) then ply:Freeze(false) end
|
||||
if IsValid(Owner) then Owner:Freeze(false) end
|
||||
end
|
||||
end)
|
||||
|
||||
-- Send the Weapon Animation and the weapon sound
|
||||
self:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
|
||||
self:SetNextPrimaryFire( CurTime() + 4 )
|
||||
|
||||
-- Play the idle animation next the primary attack
|
||||
timer.Create("rpt_animation"..self:GetOwner():EntIndex(), self:SequenceDuration(), 1, function()
|
||||
if IsValid(self) && IsValid(Owner) then
|
||||
if Owner:GetActiveWeapon() == self then
|
||||
self:SendWeaponAnim( ACT_VM_IDLE )
|
||||
end
|
||||
end
|
||||
end )
|
||||
|
||||
elseif ply.WeaponRPT["Cuff"] then
|
||||
|
||||
-- Freeze the Player and The police man
|
||||
ply:Freeze(true)
|
||||
Owner:Freeze(true)
|
||||
|
||||
-- Remove the Unfreeze timer of the player
|
||||
if timer.Exists("rpt_stungun_unfreeze"..ply:EntIndex()) then
|
||||
timer.Remove("rpt_stungun_unfreeze"..ply:EntIndex())
|
||||
end
|
||||
|
||||
timer.Simple(self:SequenceDuration(), function()
|
||||
if IsValid(ply) && IsValid(Owner) then
|
||||
Realistic_Police.UnCuff(ply, Owner)
|
||||
if IsValid(ply) then ply:Freeze(false) end
|
||||
if IsValid(Owner) then Owner:Freeze(false) end
|
||||
end
|
||||
end )
|
||||
-- Send the Weapon Animation and the weapon sound
|
||||
self:SendWeaponAnim( ACT_VM_SECONDARYATTACK )
|
||||
self:SetNextSecondaryFire( CurTime() + 4 )
|
||||
|
||||
-- Play the idle animation next the primary attack
|
||||
timer.Create("rpt_animation"..self:GetOwner():EntIndex(), self:SequenceDuration(), 1, function()
|
||||
if IsValid(self) && IsValid(Owner) then
|
||||
if Owner:GetActiveWeapon() == self then
|
||||
self:SendWeaponAnim( ACT_VM_IDLE )
|
||||
end
|
||||
end
|
||||
end )
|
||||
end
|
||||
end
|
||||
|
||||
self.Weapon:EmitSound("rpthandcuffleftclick.mp3")
|
||||
end
|
||||
|
||||
function SWEP:SecondaryAttack()
|
||||
local Owner = self:GetOwner()
|
||||
local ply = Owner:GetEyeTrace().Entity
|
||||
|
||||
Owner.AntiSpam = Owner.AntiSpam or CurTime()
|
||||
if Owner.AntiSpam > CurTime() then return end
|
||||
Owner.AntiSpam = CurTime() + 1
|
||||
|
||||
if SERVER then
|
||||
-- Check if the Player is Near the Police Man
|
||||
if IsValid(ply) && IsValid(Owner) && not ply:IsVehicle() then
|
||||
if istable(ply.WeaponRPT) then
|
||||
if ply.WeaponRPT["Cuff"] then
|
||||
Realistic_Police.Drag(ply, Owner)
|
||||
end
|
||||
end
|
||||
|
||||
elseif ply:IsVehicle() then
|
||||
if IsValid(Owner.WeaponRPT["Drag"]) then
|
||||
Owner.WeaponRPT["Drag"].WeaponRPT["EnterExit"] = false
|
||||
if SVMOD && SVMOD:GetAddonState() then
|
||||
for i, seat in ipairs(ply.SV_Data.Seats) do
|
||||
if not seat.Entity and i ~= 1 then
|
||||
|
||||
local seat = ply:SV_CreateSeat(i)
|
||||
Owner.WeaponRPT["Drag"]:EnterVehicle(seat)
|
||||
end
|
||||
end
|
||||
elseif VC then
|
||||
Owner.WeaponRPT["Drag"]:EnterVehicle(Realistic_Police.PlaceVehicle(Owner, ply))
|
||||
else
|
||||
local tr = util.TraceLine( {
|
||||
start = Owner:EyePos(),
|
||||
endpos = Owner:EyePos() + Owner:EyeAngles():Forward() * 100,
|
||||
})
|
||||
|
||||
for k, v in pairs(ents.FindInSphere(tr.HitPos, 75)) do
|
||||
if not IsValid(v) or not v:IsVehicle() then continue end
|
||||
|
||||
Owner.WeaponRPT["Drag"]:EnterVehicle(v)
|
||||
end
|
||||
end
|
||||
Owner.WeaponRPT["Drag"].WeaponRPT["EnterExit"] = true
|
||||
|
||||
-- Reset Drag Player
|
||||
Owner.WeaponRPT["Drag"].WeaponRPT["DragedBy"] = nil
|
||||
Owner.WeaponRPT["Drag"] = nil
|
||||
else
|
||||
if SVMOD && SVMOD:GetAddonState() then
|
||||
local playerInVehicle = ply:SV_GetAllPlayers()
|
||||
if istable(playerInVehicle) then
|
||||
for k,v in pairs(playerInVehicle) do
|
||||
if v.WeaponRPT["Cuff"] then
|
||||
v.WeaponRPT["EnterExit"] = false
|
||||
v:ExitVehicle()
|
||||
v.WeaponRPT["EnterExit"] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif VC then
|
||||
local playerInVehicle = ply:VC_getPlayers()
|
||||
if istable(playerInVehicle) then
|
||||
for k,v in pairs(playerInVehicle) do
|
||||
if v.WeaponRPT["Cuff"] then
|
||||
v.WeaponRPT["EnterExit"] = false
|
||||
v:ExitVehicle()
|
||||
v.WeaponRPT["EnterExit"] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
local tr = util.TraceLine( {
|
||||
start = Owner:EyePos(),
|
||||
endpos = Owner:EyePos() + Owner:EyeAngles():Forward() * 100,
|
||||
})
|
||||
|
||||
for k, v in pairs(ents.FindInSphere(tr.HitPos, 75)) do
|
||||
if not IsValid(v) or not v:IsPlayer() then continue end
|
||||
if v.WeaponRPT["Cuff"] then
|
||||
v.WeaponRPT["EnterExit"] = false
|
||||
v:ExitVehicle()
|
||||
v.WeaponRPT["EnterExit"] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Reload()
|
||||
local Owner = self:GetOwner()
|
||||
local ply = Owner:GetEyeTrace().Entity
|
||||
|
||||
Owner.AntiSpam = Owner.AntiSpam or CurTime()
|
||||
if Owner.AntiSpam > CurTime() then return end
|
||||
Owner.AntiSpam = CurTime() + 1
|
||||
|
||||
if SERVER then
|
||||
if IsValid(ply) && ply:IsPlayer() && ply.WeaponRPT && ply.WeaponRPT["Cuff"] then
|
||||
-- Open the inspect menu for confiscate weapons
|
||||
net.Start("RealisticPolice:HandCuff")
|
||||
net.WriteString("Inspect")
|
||||
net.WriteEntity(ply)
|
||||
net.Send(Owner)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:Deploy()
|
||||
local Owner = self:GetOwner()
|
||||
self:SendWeaponAnim( ACT_VM_DRAW )
|
||||
self.Weapon:EmitSound("rpthandcuffdeploy.mp3")
|
||||
-- Play the idle animation next the primary attack
|
||||
timer.Create("rpt_animation"..self:GetOwner():EntIndex(), self:SequenceDuration(), 1, function()
|
||||
if IsValid(self) && IsValid(Owner) then
|
||||
if Owner:GetActiveWeapon() == self then
|
||||
self:SendWeaponAnim( ACT_VM_IDLE )
|
||||
end
|
||||
end
|
||||
end )
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
|
||||
/*
|
||||
Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
|
||||
Version: v1.7.8 (stable)
|
||||
*/
|
||||
|
||||
AddCSLuaFile()
|
||||
SWEP.PrintName = "Электрошокер"
|
||||
SWEP.Author = "Kobralost"
|
||||
SWEP.Purpose = ""
|
||||
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 4
|
||||
|
||||
SWEP.Spawnable = true
|
||||
|
||||
SWEP.Category = "Realistic Police"
|
||||
|
||||
SWEP.ViewModel = Model("models/realistic_police/taser/c_taser.mdl")
|
||||
SWEP.WorldModel = Model("models/realistic_police/taser/w_taser.mdl")
|
||||
SWEP.ViewModelFOV = 60
|
||||
SWEP.UseHands = true
|
||||
|
||||
SWEP.Base = "weapon_base"
|
||||
|
||||
local ShootSound = Sound("Weapon_Pistol.Single")
|
||||
SWEP.Primary.Damage = 1
|
||||
SWEP.Primary.TakeAmmo = 1
|
||||
SWEP.Primary.ClipSize = 1
|
||||
SWEP.Primary.Ammo = "Pistol"
|
||||
|
||||
SWEP.Primary.DefaultClip = 1
|
||||
SWEP.Primary.Spread = 0.1
|
||||
SWEP.Primary.NumberofShots = 1
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.Recoil = .2
|
||||
SWEP.Primary.Delay = 0.1
|
||||
SWEP.Primary.Force = 100
|
||||
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.DefaultClip = -1
|
||||
SWEP.Secondary.Automatic = false
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
SWEP.DrawAmmo = true
|
||||
|
||||
SWEP.HitDistance = 125
|
||||
|
||||
function SWEP:Deploy()
|
||||
local Owner = self:GetOwner()
|
||||
self:SendWeaponAnim( ACT_VM_DRAW )
|
||||
-- Play the idle animation next the primary attack
|
||||
timer.Create("rpt_animation"..self:GetOwner():EntIndex(), self:SequenceDuration(), 1, function()
|
||||
if IsValid(self) && IsValid(Owner) then
|
||||
if Owner:GetActiveWeapon() == self then
|
||||
self:SendWeaponAnim( ACT_VM_IDLE )
|
||||
end
|
||||
end
|
||||
end )
|
||||
end
|
||||
|
||||
function SWEP:Trace()
|
||||
local mins = Vector( -30, 0, 0 )
|
||||
local maxs = Vector( 30, 0, 0 )
|
||||
|
||||
local startpos = self.Owner:GetPos() + self.Owner:GetForward() * 40 + self.Owner:GetUp() * 60
|
||||
local dir = self.Owner:GetAngles():Forward()
|
||||
local len = 500
|
||||
|
||||
local tr = util.TraceHull( {
|
||||
start = startpos,
|
||||
endpos = startpos + dir * len,
|
||||
maxs = maxs,
|
||||
mins = mins,
|
||||
filter = self.Owner,
|
||||
})
|
||||
|
||||
return tr
|
||||
end
|
||||
function SWEP:PrimaryAttack()
|
||||
local Owner = self:GetOwner()
|
||||
if ( !self:CanPrimaryAttack() ) then return end
|
||||
|
||||
local bullet = {}
|
||||
bullet.Num = self.Primary.NumberofShots
|
||||
bullet.Src = self.Owner:GetShootPos()
|
||||
bullet.Dir = self.Owner:GetAimVector()
|
||||
bullet.Spread = Vector( self.Primary.Spread * 0.1 , self.Primary.Spread * 0.1, 0)
|
||||
bullet.Tracer = 1
|
||||
bullet.Force = self.Primary.Force
|
||||
bullet.Damage = self.Primary.Damage
|
||||
bullet.AmmoType = self.Primary.Ammo
|
||||
|
||||
local rnda = self.Primary.Recoil * -1
|
||||
local rndb = self.Primary.Recoil * math.random(-1, 1)
|
||||
|
||||
self:ShootEffects()
|
||||
|
||||
local tr = self:Trace()
|
||||
local ply = tr.Entity
|
||||
local tracepos = util.TraceLine(util.GetPlayerTrace( self.Owner ))
|
||||
local effect = EffectData()
|
||||
effect:SetOrigin( tracepos.HitPos )
|
||||
effect:SetStart( self.Owner:GetShootPos() )
|
||||
effect:SetAttachment( 1 )
|
||||
effect:SetEntity( self )
|
||||
util.Effect( "ToolTracer", effect )
|
||||
-- Take a bullet of primary ammo
|
||||
self.Weapon:EmitSound("rptstungunshot2.mp3")
|
||||
|
||||
if IsValid(ply) && ply:IsPlayer() then
|
||||
-- Check if the player is near the player
|
||||
if Owner:GetPos():DistToSqr(ply:GetPos()) < 600^2 then
|
||||
if SERVER then
|
||||
if not Realistic_Police.CantBeStun[Realistic_Police.GetPlayerJob(ply)] then
|
||||
ply:EmitSound( "ambient/voices/m_scream1.wav" )
|
||||
Realistic_Police.Tazz(ply)
|
||||
Realistic_Police.ResetBonePosition(Realistic_Police.ManipulateBoneCuffed, ply)
|
||||
Realistic_Police.ResetBonePosition(Realistic_Police.ManipulateBoneSurrender, ply)
|
||||
ply:EmitSound("rptstungunmain.mp3")
|
||||
|
||||
hook.Run("RealisticPolice:Tazz", ply, self:GetOwner() )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
self:TakePrimaryAmmo(self.Primary.TakeAmmo)
|
||||
self:SetNextPrimaryFire( CurTime() + self.Primary.Delay )
|
||||
end
|
||||
|
||||
function SWEP:Reload()
|
||||
local wep = self:GetOwner():GetActiveWeapon()
|
||||
if ( !IsValid( wep ) ) then return -1 end
|
||||
local ammo = self:GetOwner():GetAmmoCount( wep:GetPrimaryAmmoType() )
|
||||
|
||||
if self:Clip1() == 0 && ammo != 0 then
|
||||
self.Weapon:EmitSound("rptstungunreload.mp3")
|
||||
self.Weapon:DefaultReload( ACT_VM_RELOAD );
|
||||
end
|
||||
end
|
||||
function SWEP:SecondaryAttack() end
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
/*
|
||||
Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
|
||||
Version: v1.7.8 (stable)
|
||||
*/
|
||||
|
||||
AddCSLuaFile()
|
||||
|
||||
SWEP.PrintName = "Сдаться"
|
||||
SWEP.Author = "Kobralost"
|
||||
SWEP.Purpose = ""
|
||||
|
||||
SWEP.Slot = 2
|
||||
SWEP.SlotPos = 1
|
||||
|
||||
SWEP.Spawnable = false
|
||||
SWEP.Category = "Realistic Police"
|
||||
|
||||
SWEP.ViewModel = Model( "models/weapons/sycreations/Kobralost/handsup.mdl" )
|
||||
SWEP.WorldModel = Model("")
|
||||
SWEP.ViewModelFOV = 55
|
||||
SWEP.UseHands = true
|
||||
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.DefaultClip = -1
|
||||
SWEP.Primary.Automatic = true
|
||||
SWEP.Primary.Ammo = "none"
|
||||
-- d4ec95c252515613de193db925956fba07d4ff50f580a4b42b7f507f9c716945
|
||||
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.DefaultClip = -1
|
||||
SWEP.Secondary.Automatic = true
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
SWEP.DrawAmmo = false
|
||||
|
||||
SWEP.HitDistance = 125
|
||||
-- a91f6942e11bb9a70ff8e3d7a0dcc737fd407c85d2d10ff95a1cfed59177e84a
|
||||
|
||||
function SWEP:Deploy()
|
||||
local Owner = self:GetOwner()
|
||||
-- Manipulate the Bone of the Player
|
||||
timer.Simple(0.2, function()
|
||||
if not IsValid(self) or not IsValid(Owner) then return end
|
||||
|
||||
for k,v in pairs(Realistic_Police.ManipulateBoneSurrender) do
|
||||
local bone = Owner:LookupBone(k)
|
||||
if bone then
|
||||
Owner:ManipulateBoneAngles(bone, v)
|
||||
end
|
||||
end
|
||||
self:SetHoldType("passive")
|
||||
Owner.RPTSurrender = true
|
||||
end )
|
||||
end
|
||||
|
||||
if CLIENT then
|
||||
function SWEP:DrawHUD()
|
||||
draw.SimpleTextOutlined(Realistic_Police.GetSentence("youSurrender").." ( Press "..Realistic_Police.SurrenderInfoKey.." )","rpt_font_9", ScrW()/2, ScrH()/15, Realistic_Police.Colors["white"], TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM,2, Realistic_Police.Colors["black"])
|
||||
end
|
||||
end
|
||||
|
||||
function SWEP:CanPrimaryAttack() end
|
||||
function SWEP:CanSecondaryAttack() end
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
|
||||
/*
|
||||
Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
|
||||
Version: v1.7.8 (stable)
|
||||
*/
|
||||
|
||||
-- 3aaf217dbda72c52d8532897f5c9000ac85eca339f30615d1f3f36b925d66cfe
|
||||
|
||||
AddCSLuaFile()
|
||||
SWEP.PrintName = "Гаечный ключ"
|
||||
SWEP.Author = "Kobralost"
|
||||
SWEP.Purpose = ""
|
||||
|
||||
SWEP.Slot = 0
|
||||
SWEP.SlotPos = 4
|
||||
|
||||
SWEP.Spawnable = true
|
||||
|
||||
SWEP.Category = "Realistic Police"
|
||||
|
||||
SWEP.ViewModel = Model( "models/weapons/sycreations/Kobralost/v_ajustableWrench.mdl" )
|
||||
SWEP.WorldModel = Model( "models/weapons/sycreations/Kobralost/w_ajustableWrench.mdl" )
|
||||
|
||||
SWEP.ViewModelFOV = 55
|
||||
SWEP.UseHands = true
|
||||
|
||||
SWEP.Primary.ClipSize = -1
|
||||
SWEP.Primary.DefaultClip = -1
|
||||
SWEP.Primary.Automatic = false
|
||||
SWEP.Primary.Ammo = "none"
|
||||
|
||||
SWEP.Secondary.ClipSize = -1
|
||||
SWEP.Secondary.DefaultClip = -1
|
||||
SWEP.Secondary.Automatic = true
|
||||
SWEP.Secondary.Ammo = "none"
|
||||
|
||||
SWEP.DrawAmmo = false
|
||||
SWEP.HitDistance = 48
|
||||
|
||||
function SWEP:Initialize()
|
||||
self:SetHoldType( "slam" )
|
||||
end
|
||||
|
||||
function SWEP:PrimaryAttack()
|
||||
if ( CLIENT ) then return end
|
||||
local Owner = self:GetOwner()
|
||||
local ply = Owner:GetEyeTrace().Entity
|
||||
|
||||
-- Check if the entity trace is a camera
|
||||
if IsValid(ply) && ply:GetClass() == "realistic_police_camera" then
|
||||
|
||||
-- Check if the player is near the entity
|
||||
if Owner:GetPos():DistToSqr(ply:GetPos()) < 125^2 then
|
||||
|
||||
-- Check if the Camera is broke
|
||||
if ply.DestroyCam then
|
||||
-- Check if the Player have the correct job for repair the camera
|
||||
if Realistic_Police.CameraWorker[Realistic_Police.GetPlayerJob(Owner)] then
|
||||
|
||||
-- Play the Primary Attack animation
|
||||
Owner:Freeze(true)
|
||||
self:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
|
||||
|
||||
timer.Create("rpt_repair_camera2"..Owner:EntIndex(), 5, (Realistic_Police.CameraRepairTimer/5) - 1, function()
|
||||
if IsValid(Owner) then
|
||||
self:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
|
||||
end
|
||||
end)
|
||||
|
||||
-- Create Movement on the camera of the player
|
||||
local Punch = { 0.1, 0.5, 1, 1.2, 0.3, -0.5, -0.9, -1.6, -0.4, -0.8 }
|
||||
timer.Create("rpt_repeat_anim"..Owner:EntIndex(), 1, Realistic_Police.CameraRepairTimer, function()
|
||||
if IsValid(Owner) then
|
||||
Owner:ViewPunch( Angle( table.Random(Punch), table.Random(Punch), table.Random(Punch) ) )
|
||||
end
|
||||
end)
|
||||
|
||||
-- Reset Rotation , Player Active Sequence and Reset Health of the camera
|
||||
timer.Create("rpt_camera_repair"..Owner:EntIndex(), Realistic_Police.CameraRepairTimer, 1, function()
|
||||
if IsValid(ply) then
|
||||
-- Reset Camera Information
|
||||
ply:ResetSequence("active")
|
||||
ply:SetSequence("active")
|
||||
ply.HealthEntity = Realistic_Police.CameraHealth
|
||||
ply:SetRptCam(false)
|
||||
ply.DestroyCam = false
|
||||
|
||||
-- Unfreeze the Player && give the money
|
||||
Owner:Freeze(false)
|
||||
Owner:addMoney(Realistic_Police.CameraGiveMoney)
|
||||
Realistic_Police.SendNotify(Owner, Realistic_Police.GetSentence("youWon").." "..DarkRP.formatMoney(Realistic_Police.CameraGiveMoney))
|
||||
end
|
||||
end )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function SWEP:SecondaryAttack() end
|
||||
|
||||
function SWEP:Holster()
|
||||
if SERVER then
|
||||
self:GetOwner():Freeze(false)
|
||||
timer.Remove("rpt_camera_repair"..self:GetOwner():EntIndex())
|
||||
timer.Remove("rpt_repair_camera2"..self:GetOwner():EntIndex())
|
||||
timer.Remove("rpt_repeat_anim"..self:GetOwner():EntIndex())
|
||||
self:SendWeaponAnim( ACT_VM_IDLE )
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user