mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
39 lines
1002 B
Lua
39 lines
1002 B
Lua
--[[
|
|
| 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("EntityTakeDamage", "ArcCW_DoAttDMG", function(ent, dmg)
|
|
if !ent:IsPlayer() then return end
|
|
|
|
local wpn = ent:GetActiveWeapon()
|
|
|
|
if !wpn.ArcCW then return end
|
|
|
|
for i, k in pairs(wpn.Attachments) do
|
|
if !k.Installed then continue end
|
|
local atttbl = ArcCW.AttachmentTable[k.Installed]
|
|
|
|
if atttbl.Hook_PlayerTakeDamage then
|
|
atttbl.Hook_PlayerTakeDamage(wpn, {slot = i, atthp = k.HP, dmg = dmg})
|
|
end
|
|
end
|
|
|
|
wpn:SendAttHP()
|
|
end)
|
|
|
|
hook.Add("DoPlayerDeath","ArcCW_GrenadeDrop",function(ply)
|
|
local wep = ply:GetActiveWeapon()
|
|
if !(wep.ArcCW and wep.Throwing) then return end
|
|
|
|
if wep:GetGrenadePrimed() then
|
|
wep:GrenadeDrop()
|
|
end
|
|
end) |