This wiki is archived and useful information is being migrated to the main bzflag.org website

bz_isCountDownInProgress

From BZFlagWiki
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;