Skip to content

Commit

Permalink
2.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiskster committed Apr 30, 2023
1 parent 58a03a0 commit 9bb7864
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build_ZE.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

::--------------------------------------------------------------------------
set "name=ZGL_ZombieEscape"
set "version=2.4.1"
set "version=2.4.2"

set /A "delump=0"

Expand Down
33 changes: 23 additions & 10 deletions src/Lua/2-ZECore/3-Library/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -239,19 +239,32 @@ ZE.secretTick = function()
end

ZE.TeamSwitch = function(player, fromspectators, team)
if not (gametype == GT_ZESCAPE) then return end

if (player.spectator == 1 or player.ctfteam == 1) and CV.gamestarted then -- allow switch when spectator and game has started
if team == 2 and not IsPlayerAdmin(player) then
return false
end
if not (gametype == GT_ZESCAPE) then return end
if (player.ctfteam == 2) and not (player.playerstate == PST_DEAD) and (leveltime > CV.waittime) then
return false
end

if (player.ctfteam == 0) and (leveltime > CV.waittime) then
return nil
end

if team == 0 then
player.spectator = 1
player.ctfteam = 0
return false
if (player.ctfteam == 1) and (leveltime > CV.waittime) then
return false
end

if (player.ctfteam == 2) and (leveltime < CV.waittime) then
local textnum = P_RandomRange(1, 3)
if textnum == 1 then
chatprintf(player, "\x85\<Zombie>\x80\ The game still registers you in RNG. You cannot escape from being enslaved by the zombies.")
end

if textnum == 2 then
chatprintf(player, "\x85\<Zombie>\x80\ The zombies will always be back. You cannot escape from the RNG.")
end

if textnum == 3 then
chatprintf(player, "\x85\<Zombie>\x80\ You will be enslaved by the zombies if you continue.")
end
end
end

Expand Down

1 comment on commit 9bb7864

@NeoniusNext
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bruh

Please sign in to comment.