From d4a0af39489ca3a384c87fd52c26a2b34f55c50c Mon Sep 17 00:00:00 2001 From: Connor <34824423+EasterLee@users.noreply.github.com> Date: Wed, 18 Oct 2023 14:23:34 -0400 Subject: [PATCH] assign human class to those who joined late --- scripts/vscripts/ZombieReborn.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/vscripts/ZombieReborn.lua b/scripts/vscripts/ZombieReborn.lua index fa63027..68f02d4 100644 --- a/scripts/vscripts/ZombieReborn.lua +++ b/scripts/vscripts/ZombieReborn.lua @@ -140,12 +140,12 @@ function OnPlayerSpawn(event) InfectAsync(hPlayer, false) return end + + -- assign human class for those who missed the human class assignment + if ZR_ROUND_STARTED and not ZR_ZOMBIE_SPAWNED and hPlayer:GetTeam() == CS_TEAM_CT then + InjectPlayerClass(PickRandomHumanDefaultClass(), hPlayer) + end - -- force switch team for player who tries to join the T side - -- if not ZR_ZOMBIE_SPAWN_READY and hPlayer:GetTeam() == CS_TEAM_T then - -- --print("Forcing player to ct") - -- CureAsync(hPlayer, false) - -- end end function OnItemEquip(event)