mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
27
lua/arccw/server/sv_defaultclip.lua
Normal file
27
lua/arccw/server/sv_defaultclip.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
| This file was obtained through the combined efforts
|
||||
| of Madbluntz & Plymouth Antiquarian Society.
|
||||
|
|
||||
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||||
| Maloy, DrPepper10 @ RIP, Atle!
|
||||
|
|
||||
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||||
--]]
|
||||
|
||||
if CLIENT then return end
|
||||
|
||||
hook.Add("OnEntityCreated", "ArcCW_DefaultClip", function(ent)
|
||||
if !ent.ArcCW then return end
|
||||
|
||||
if ArcCW.ConVars["mult_startunloaded"]:GetBool() then
|
||||
ent.Primary.DefaultClip = 0
|
||||
elseif ent.ForceDefaultClip then
|
||||
ent.Primary.DefaultClip = ent.ForceDefaultClip
|
||||
elseif ent.Primary.DefaultClip <= 0 then
|
||||
ent.Primary.DefaultClip = ent.Primary.ClipSize
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("PlayerCanPickupWeapon", "ArcCW_EquipmentSingleton", function(ply, wep)
|
||||
if wep.ArcCW and wep.Throwing and wep.Singleton and ply:HasWeapon(wep:GetClass()) then return false end
|
||||
end)
|
||||
Reference in New Issue
Block a user