update anims

This commit is contained in:
Jonny_Bro (Nikita) 2023-08-31 18:32:36 +05:00
parent 13b2ef17c9
commit 8a732cae1c
16 changed files with 15 additions and 15 deletions

View file

@ -39,20 +39,20 @@ if SERVER then
local revealed = false local revealed = false
local ended = false local ended = false
local didmusic = false local didmusic = false
local didgun = false -- local didgun = false
local cachedhumancount = -1 local cachedhumancount = -1
local function GiveLastManGun() -- local function GiveLastManGun()
if cachedhumancount == 1 then -- if cachedhumancount == 1 then
for k, v in pairs(player.GetAll()) do -- for k, v in pairs(player.GetAll()) do
if not didgun and not ended and v:Alive() and not v:GetNW2Bool("Infected") then -- if not didgun and not ended and v:Alive() and not v:GetNW2Bool("Infected") then
hook.Run("Infection_LastManGun", v) -- hook.Run("Infection_LastManGun", v)
didgun = true -- didgun = true
break -- break
end -- end
end -- end
end -- end
end -- end
net.Receive("Infection_Touch", function(len, ply) net.Receive("Infection_Touch", function(len, ply)
local victim = net.ReadEntity() local victim = net.ReadEntity()
@ -72,7 +72,7 @@ if SERVER then
local humancount = HumanCount() local humancount = HumanCount()
cachedhumancount = humancount cachedhumancount = humancount
timer.Simple(0.01, GiveLastManGun) -- timer.Simple(0.01, GiveLastManGun)
if humancount < 1 then if humancount < 1 then
victim:EmitSound("blackout_hit_0" .. math.random(1, 3) .. ".wav") victim:EmitSound("blackout_hit_0" .. math.random(1, 3) .. ".wav")
@ -220,7 +220,7 @@ if SERVER then
revealed = false revealed = false
ended = false ended = false
didmusic = false didmusic = false
didgun = false -- didgun = false
cachedhumancount = 0 cachedhumancount = 0
local players = player.GetAll() local players = player.GetAll()
@ -264,7 +264,7 @@ if SERVER then
local humancount = HumanCount() local humancount = HumanCount()
cachedhumancount = humancount cachedhumancount = humancount
timer.Simple(0.01, GiveLastManGun) -- timer.Simple(0.01, GiveLastManGun)
if humancount < 1 then if humancount < 1 then
net.Start("Infection_End") net.Start("Infection_End")