14.08.2013, 10:57
First, you need to think up the failsafe plan. Think of the possibilites: if the player-count in the server is less than 2, would the round timer starts? No. Next: Stalemate: what if there are 2 or more players in the server but none of them spawned or killed? Those are some possibilities that could happen.
The player with most kills can be done after the round timer is ended, make a loop through the enum of all the connected player's info (you can make something like "KILLS") or even checl their score if you script the score directly as the kills counter. If I were to script the player with highest killstreak thing, I would create two enum such as "KILLS_BEFORE_DEATH" and "HIGHEST_KILLSTREAK", and he "HIGHEST_KILLSTREAK" will only change if it is more than "KILLS_BEFORE_DEATH". "KILLS_BEFORE_DEATH" will be reset at OnPlayerDeath. Something like that.
The player with most kills can be done after the round timer is ended, make a loop through the enum of all the connected player's info (you can make something like "KILLS") or even checl their score if you script the score directly as the kills counter. If I were to script the player with highest killstreak thing, I would create two enum such as "KILLS_BEFORE_DEATH" and "HIGHEST_KILLSTREAK", and he "HIGHEST_KILLSTREAK" will only change if it is more than "KILLS_BEFORE_DEATH". "KILLS_BEFORE_DEATH" will be reset at OnPlayerDeath. Something like that.