
/*
    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


