fix arccw gun not having ammo when using custom rounds
This commit is contained in:
parent
96971879c3
commit
49697b2a50
@ -22,3 +22,15 @@ hook.Add("OnNPCKilled", "edshot_AmmoRestoredOnNPCKill", function(npc, attacker,
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add("WeaponEquip", "edshot_AmmoRestoredOnEquip", function(weapon, owner)
|
||||
if owner:IsValid() and !owner:IsNextBot() and !owner:IsNPC() and owner:IsPlayer() then
|
||||
local weps = attacker:GetWeapons()
|
||||
|
||||
for _, wep in ipairs(weps) do
|
||||
if IsValid(wep) then
|
||||
wep:SetClip1( wep:GetMaxClip1() )
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user