#if defined _opmanager_api_included
	#endinput
#endif
#define _opmanager_api_included

enum OPMState
{
    OPMState_MatchNotFound,
    OPMState_WarmUP,
    OPMState_Knife,
    OPMState_Mode
};

enum OPMMode
{
    OPMMode_MatchNotFound = -1,
    OPMMode_CW,
    OPMMode_AIM
};

enum OPMOverStatus
{
    OPMOver_FinishedSuccessfully,
    OPMOver_GameDenied,
    OPMOver_LeaveTeam
};

/**
 * Function called after match started.
 *
 * @param match         Match id
 * @param teamANmae     Team A name
 * @param teamBName     Team B name
 * @param mode          Game mode
 */
forward opm_match_started(const match, const teamAName[], const teamBName[], const OPMMode: mode);

/**
 * Function called after match started, with a player index.
 *
 * @param match         Match id
 * @param player        Player index
 * @param teamANmae     Team A name
 * @param teamBName     Team B name
 * @param mode          Game mode
 */
forward opm_match_started_with_player(const match, const player, const teamAName[], const teamBName[], const OPMMode: mode);

/**
 * Function called after game state was changed.
 *
 * @param match         Match id
 * @param stateCurrent  Current game state
 * @param stateOld      Previous game state
 */
forward opm_change_state(const match, const OPMState: stateCurrent, const OPMState: stateOld);

/**
 * Function called match was ended.
 *
 * @param match         Match id
 * @param overStatus    Reason for ending the match. See OPMOverStatus enum
 */
forward opm_match_over(const match, const OPMOverStatus: overStatus);

/**
 * Get current or previous game state.
 *
 * @param current       Current or previous game state
 *
 * @return Game state. See OPMState enum
 */
native OPMState: opm_get_state(const bool: current = true);

/**
 * Get current game mode.
 *
 * @return Game state. See OPMState enum
 */
native OPMMode: opm_get_mode();