Make round end when other team has been killed. HELP!
1 replies, posted
I am programming my own gamemode and I am trying to make
the round restart and switch teams when the other team is eliminated. Also to have a timer set to 90 seconds. Please, help!
Thanks!
Basic concept of a round system: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/round_system/basic_concept_of_round_systems.lua.html[/url]
On PlayerDeath, PlayerDisconnect you want to detect end-round based on players. I recommend using game-event for the PlayerDisconnect just because the standard hook sometimes fails ( unless it has been fixed ).
To have a timed-round system too, I recommend starting a timer send to expire at the end of round and sync it both to client and server. Sync to clients that connect. Example of an active timer using NON timer for CURRENT/ELAPSED/REMAINING but timer for the end trigger synced to client/server: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/vgui/sh_hud_countdown.lua.html[/url]
With the timer, say TTT Haste Mode ( where it gives extra time per kill ), you can use a timer which was set up to show timer.TimeLeft and timer.Adjust to change time. So, everything can be achieved with a timer, including the current count-down without having to do everything the second example shows.
Sorry, you need to Log In to post a reply to this thread.