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

bz_pauseCountdown

From BZFlagWiki
Revision as of 08:34, 22 August 2015 by Allejo (Talk | contribs) (Added new function with int param)

Jump to: navigation, search

void bz_pauseCountdown (int playerID)


Minimum API Version: 2.4.3
Pauses the countdown that is currently running.

Parameters:
playerID  -  The id of the player stopping the countdown. Note that this value does not have to be a callsign of a player in the server, it can be any string.


void bz_pauseCountdown (const char* pausedBy)


Pauses the countdown that is currently running.

Parameters:
pausedBy  -  The name of the player stopping the countdown. Note that this value does not have to be a callsign of a player in the server, it can be any string.


Example

Pause the countdown if a player pauses, saying the player that paused decided to pause the countdown also.

case bz_ePlayerPausedEvent:
{
   if (bz_isCountDownActive() && ((bz_PlayerPausedEventData_V1*)eventData)->pause) {
       bz_pauseCountdown(bz_getPlayerCallsign(((bz_PlayerPausedEventData_V1*)eventData)->playerID));
   }
}
break;