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 getCountdownRemaining: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{apicall | name = bz_getCountdownProgress | returns = The amount of time remaining in a match in seconds, or <code>-1</code> if a match is not currently in pro..." |
(No difference)
|
Revision as of 09:16, 25 September 2015
int bz_getCountdownProgress ()
Retrieves the time remaining in a running countdown.
Returns:
The amount of time remaining in a match in seconds, or
-1 if a match is not currently in progress.
Example
Display the remaining time to a user upon joining.
case bz_ePlayerJoinEvent: {
int player = (bz_PlayerJoinPartEventData_V1*)eventData)->playerID;
if (bz_isCountDownActive()) {
bz_sendTextMessagef(BZ_SERVER, player,
"Welcome! The current match will finish in %d seconds!", bz_getCountdownProgress());
} else {
bz_sendTextMessage(BZ_SERVER, player,
"Welcome! No match is currently running.");
}
}break;