From BZFlagWiki
Revision as of 09:43, 19 October 2011 by Sigonasr2 (Talk | contribs) (Create API Function Page. Include Example.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

void bz_startCountdown (int delay, float limit, const char* byWho)

Begins the starting countdown process as if a player were to type /countdown.

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.


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(ePurpleTeam)>=4 &&
		(!bz_isCountDownActive() || !bz_isCountDownInProgress)) {
		bz_sendTextMessage(BZ_SERVER,BZ_ALLUSERS,"Enough players have joined, starting countdown.");