/*
* Ladder Bottleneck (olds_bottleneck) API, for an Arms Race core or a bridge plugin.
* Copyright (C) 2026 daemon (olds.ro)
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#if defined _olds_bottleneck_included
#endinput
#endif
#define _olds_bottleneck_included
#pragma reqlib olds_bottleneck
#if !defined AMXMODX_NOAUTOLOAD
#pragma loadlib olds_bottleneck
#endif
/* Why a player's level changed. */
enum
{
OBN_PLAY = 0, // levelled up (or down) by playing
OBN_START, // a new session put the player on their first level
OBN_FORCED, // the core forced the level (balance, catch-up, mode change)
OBN_ADMIN // an admin set the level
}
/**
* The team's ladder definition, as one text (for example its weapon list in
* order). Call it at map start and whenever the ladder is reconfigured; a text
* different from the last one discards that ladder's stored times.
*
* @param team 1 = T, 2 = CT
* @param definition the ladder as text (up to 511 characters are compared)
* @return 1 if the ladder changed, 0 if it is the same
*/
native olds_bottleneck_ladder(team, const definition[]);
/**
* The player is now on this level.
*
* @param id player
* @param level new level, 1-64
* @param reason OBN_PLAY, OBN_START, OBN_FORCED or OBN_ADMIN
* @param activeClock the player's active-play seconds (stops while dead,
* spectating or in other downtime)
* @return 1 if the visit to the previous level was recorded
*/
native olds_bottleneck_level(id, level, reason, Float:activeClock);