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 pauseCountdown: Difference between revisions
Jump to navigation
Jump to search
Create API Function Page. Include Example. |
m Fix spacing and make use of "removed" parameter |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{apicall | {{apicall | ||
| name = bz_pauseCountdown | | name = bz_pauseCountdown | ||
| version = 2.4.3 | |||
| returns = | |||
| returntype = void | |||
| description = Pauses the countdown that is currently running. | |||
| param1 = playerID | |||
| param1type = int | |||
| param1desc = 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. | |||
}} | |||
{{apicall | |||
| name = bz_pauseCountdown | |||
| deprecated = 2.4.3 | |||
| removed = 2.5.0 | |||
| returns = | | returns = | ||
| returntype = void | | returntype = void | ||
| Line 8: | Line 20: | ||
| param1desc = 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. | | param1desc = 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=== | ===Example=== | ||
Pause the countdown if a player pauses, saying the player that paused decided to pause the countdown also. | Pause the countdown if a player pauses, saying the player that paused decided to pause the countdown also. | ||
case bz_ePlayerPausedEvent:{ | case bz_ePlayerPausedEvent: | ||
{ | |||
if (bz_isCountDownActive() && ((bz_PlayerPausedEventData_V1*)eventData)->pause) { | |||
bz_pauseCountdown(bz_getPlayerCallsign(((bz_PlayerPausedEventData_V1*)eventData)->playerID)); | |||
}break; | } | ||
} | |||
break; | |||
Latest revision as of 08:44, 22 August 2015
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)
Deprecated API Version: 2.4.3
Removed API Version: 2.5.0
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;