This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.
bz_startCountdown
Jump to navigation
Jump to search
void bz_startCountdown (int delay, float limit, const char* byWho)
Begins the starting countdown process as if a player were to type /countdown.
Parameters:
delay - How many seconds to countdown before the real countdown timer for the match starts.
limit - How many seconds to set the countdown timer to? (Basically, setting the match length.)
byWho - The name of the player starting the countdown. Note that the name displayed does not have to be a player in the server, it can be any string.
Example
Once 4 players have joined, the countdown will automatically begin by SERVER using the default time limit set by the server with a 10 second starting delay.
case bz_ePlayerJoinEvent: {
if (bz_getTeamCount(eBlueTeam)+
bz_getTeamCount(eRedTeam)+
bz_getTeamCount(eRogueTeam)+
bz_getTeamCount(eGreenTeam)+
bz_getTeamCount(ePurpleTeam)>=4 &&
(!bz_isCountDownActive() || !bz_isCountDownInProgress)) {
bz_sendTextMessage(BZ_SERVER,BZ_ALLUSERS,"Enough players have joined, starting countdown.");
bz_startCountdown(10,bz_getTimeLimit(),"SERVER");
}
}break;