bz_isCountDownInProgress

From BZFlagWiki
Revision as of 09:27, 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

bool bz_isCountDownInProgress ()


Retrieves whether or not the countdown to the start of the match is occurring.

Returns:
Whether or not the match is going to start.


Example[edit]

Kick a player if they join when a match is about to start and they are not an observer.

case bz_eAllowPlayer: {
	if (bz_isCountDownInProgress() && bz_getPlayerTeam(((bz_AllowPlayerEventData_V1*)eventData)->playerID)!=eObservers) {
		((bz_AllowPlayerEventData_V1*)eventData)->allow=false;
		((bz_AllowPlayerEventData_V1*)eventData)->reason="Sorry! A match is about to start.";
	}
}break;