This wiki is archived and useful information is being migrated to the main bzflag.org website
bz_isCountDownInProgress
From BZFlagWiki
Revision as of 09:27, 19 October 2011 by Sigonasr2 (Talk | contribs) (Create API Function Page. Include Example.)
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;