Hi i’m an extreme lua noob and i’m having trouble setting up the end of the round for my gamemode. Basically i’m trying to set it up so that if one team still has players by the end of the timer then that team wins but if that team runs out of players it would force end the round. The problem is that its not working at all and giving errors in the console. Here is the code:
function GM:roundEnd() if CurTime() == 0 and team.NumPlayers(1) >= 1 then PrintMessage(HUD_PRINTTALK, "Survivors Win!") elseif team.NumPlayers(1) == 0 then PrintMessage(HUD_PRINTTALK, "Zombies Win!") CurTime() = 0 end end
I am using the round system found here http://forum.facepunch.com/showthread.php?t=1438415
Could anyone tell me what i’m doing wrong and how i can fix it? Thanks.