Skip to content
View in the app

A better way to browse. Learn more.

Learn more

cue-profiles/addons/amxmodx/scripting/include/olds_cues.inc

olds_cues.inc
43 lines · 1.5 KB · Pawn include
Raw
/*
 * Cue Profiles interface (olds.ro workshop card AMX-083)
 *
 * Include this in a plugin that gives cues (a beep, a short text) and wants
 * to honour each player's choice of text, sound or both, made with /cues.
 * The natives come from olds_cueprofile.amxx, which must be running: a
 * plugin that includes this file does not load without it.
 *
 * Copyright (C) 2026 alexit (olds.ro workshop)
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#if defined _olds_cues_included
	#endinput
#endif
#define _olds_cues_included

#pragma reqlib olds_cues

/**
 * Registers a cue once (in plugin_init or later). sound is the path under
 * sound/ as "spk" takes it, for example "buttons/blip1"; leave it empty for
 * a text-only cue. A custom sound must be precached by your plugin as usual.
 *
 * @return  The cue id (0 or more), or -1 when the name is empty or no room
 *          is left. Registering the same name again returns the same id.
 */
native olds_cue_register(const name[], const sound[] = "");

/**
 * Gives a registered cue to one player in the way they chose: text, sound or
 * both. text is the cue's text equivalent and follows the format rules.
 * A cue without a sound always shows its text; a cue given without text
 * always plays its sound.
 *
 * @return  1 if the player got text or sound, 0 otherwise.
 */
native olds_cue_play(id, cue, const text[] = "", any:...);

/**
 * @return  The player's setting: 0 text, 1 sound, 2 both; -1 for a bad index.
 */
native olds_cue_get_mode(id);

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.