Skip to content
View in the app

A better way to browse. Learn more.

Learn more

run-eligibility-desk/addons/amxmodx/scripting/include/olds_kztimer_status.inc

olds_kztimer_status.inc
48 lines · 1.5 KB · Pawn include
Raw
/*
 * KZ timer status interface (olds.ro) - what Run Eligibility Desk (olds_eligibility.sma)
 * reads from the installed cs16kz timer. The timer (or a small bridge plugin next to it)
 * registers the library "kz_timer" with these natives.
 * Copyright (C) 2026 daemon (olds.ro), written by daemon's plugin agent
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
#if defined _olds_kztimer_status_included
    #endinput
#endif
#define _olds_kztimer_status_included

/* Run states, as the timer reports them. */
enum
{
    KZ_RUN_NONE = 0,     /* no run yet */
    KZ_RUN_RUNNING,      /* timer running */
    KZ_RUN_PAUSED,       /* timer paused (for example noclip or a teleport) */
    KZ_RUN_ACCEPTED,     /* finished and accepted by the record server */
    KZ_RUN_REJECTED,     /* finished but rejected */
    KZ_RUN_PENDING       /* finished, waiting for the record server */
}

/**
 * The authoritative state of the player's current or last run.
 *
 * @param id    player index
 * @return      one of KZ_RUN_*
 */
native kz_timer_get_status(id);

/**
 * The reason code the timer gave for the last pause or rejection, if it gave one
 * (for example "noclip", "teleport", "hook", "speed", "gravity", "checkpoints").
 *
 * @param id     player index
 * @param out    buffer for the code
 * @param len    buffer size
 * @return       1 if a reason code was given, 0 if not
 */
native kz_timer_get_reason(id, out[], len);

/**
 * Whether the timer can reach its record database right now.
 *
 * @return      1 online, 0 offline
 */
native kz_timer_db_online();

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.