mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 05:43:46 +03:00
Upload
This commit is contained in:
22
lua/arccw/server/sv_singleplayer.lua
Normal file
22
lua/arccw/server/sv_singleplayer.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
| 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 or !game.SinglePlayer() then return end
|
||||
|
||||
hook.Add("EntityTakeDamage", "ArcCW_ETD", function(npc, dmg)
|
||||
timer.Simple(0, function()
|
||||
if !IsValid(npc) then return end
|
||||
if npc:Health() <= 0 then
|
||||
net.Start("arccw_sp_health")
|
||||
net.WriteEntity(npc)
|
||||
net.Broadcast()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user