SWEP.PrintName = “Патроны”
SWEP.Slot = 3
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
SWEP.Author = “”
SWEP.Contact = “”
SWEP.Purpose = “”
SWEP.Instructions = “Left click - give ammos)”
SWEP.Spawnable = true
SWEP.AdminSpawnable = false
SWEP.ViewModel = “”
SWEP.WorldModel = “”
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 = false
SWEP.Secondary.Ammo = “none”
if CLIENT then return end
function SWEP:Initialize()
self:SetHoldType(“normal”)
end
function SWEP:Reload()
end
function SWEP:Think()
end
local blocked = {
[“rust_syringe”] = true,
[‘weapon_hexshield’] = true
}
function SWEP:PrimaryAttack()
local ply = self.Owner
if (ply.nexta or 0) - CurTime() > 0 then return ply:ChatPrint("Вы не можете взять патроны еще ".. math.Truncate((ply.nexta or 0) - CurTime(), 0).." секунд") end
for k, v in pairs(ply:GetWeapons()) do
if blocked[v:GetClass()] then continue end
ply:GiveAmmo(300, v:GetPrimaryAmmoType(), false)
end
ply:ChatPrint("Вы взяли патроны")
ply.nexta = CurTime() + 300
end
function SWEP:CanPrimaryAttack()
return false
end
function SWEP:ShootBullet()
return false
end