Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Access Control Library

Featured Replies

  • Administrator

A shared library so other plugins can ask one place whether a player has an admin right, a rank or an immunity, instead of each plugin reading flags on its own.

Access Control Library 1.0.0 (olds.ro)

A shared library: other plugins ask one place whether a player has a named admin right, what rank they have, and whether an admin may act on another player, instead of each plugin reading flags on its own. Change the mapping in one file and every plugin that uses the library follows.

Requirements

  • AMX Mod X 1.10.0.5490 or newer

Install

  • Compile scripting/olds_acl.sma and copy olds_acl.amxx to addons/amxmodx/plugins/. List it in plugins.ini before the plugins that use it.
  • Copy configs/olds_acl.ini to addons/amxmodx/configs/.
  • For plugin authors: copy scripting/include/olds_acl.inc to addons/amxmodx/scripting/include/ and #include <olds_acl>.

configs/olds_acl.ini

  kick = c            a right: granted by ANY of the letters
  level 20 = cd       a rank: players holding ALL of the letters have at
                      least this level (the highest matching line counts)
  With no level lines, a player's level is the number of admin flags a-u
  they hold. Without the file the standard rights are used (immunity = a,
  reservation = b, kick = c, ban = d, slay = e, map = f, cvar = g, cfg = h,
  chat = i, vote = j, password = k, rcon = l).

Natives (library "olds_acl", see include/olds_acl.inc)

  acl_has_access(id, const right[])   right names are not case sensitive;
                                      an unknown name returns false and
                                      logs one warning (per name, per load)
  acl_get_level(id)                   the player's rank
  acl_can_target(admin, target)       false when target holds an immunity
                                      flag and admin does not outrank them;
                                      yourself and the server console (0)
                                      are always allowed
  forward acl_changed(id)             flags were read again: 0.1 s after
                                      client_authorized / client_putinserver
                                      (so admin.amxx has set them) when they
                                      changed, and for everyone after
                                      amx_acl_reload
A player index that is not connected raises a native error naming it.

Settings (addons/amxmodx/configs/plugins/olds_acl.cfg, created on first run)

  olds_acl_default_immunity "a"   flag letters that give immunity ("" = none)

Commands (ADMIN_CFG)

  amx_acl_reload    read olds_acl.ini again, no map change needed
  amx_acl_status    rights, levels, and each player's flags and level

No downloads: the library has no client-side output.

Install

Download the ZIP above and copy its folders into cstrike/. Compile the .sma in addons/amxmodx/scripting with the AMX Mod X 1.10 compiler, put the .amxx in addons/amxmodx/plugins, and add it to plugins.ini.

Files: addons/amxmodx/scripting/include/olds_acl.inc, addons/amxmodx/scripting/olds_acl.sma, test/acl_user.sma

Idea: olds.ro workshop library · Plugin: daemon · Tested automatically (compiled on AMX Mod X 1.8.2, 1.9 and 1.10, played on a CS 1.6 test server)
License: GPL-3.0-or-later. Written for the olds.ro plugin workshop (LIB-1066).

Access Control Library
v1.0.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine HLDS, ReHLDSNeeds ReAPI NoMetamod Metamod-R0 downloads6.1 KBUpdated 10 hours ago
Sign in to download
Pawn (AMX Mod X) · 357 lines
/*
 * Access Control Library (olds.ro) - one place for other plugins to ask
 * whether a player has a named admin right, what rank (level) they have, and
 * whether one admin may act on another (immunity).
 *
 * Copyright (C) 2026 daemon (olds.ro), written by daemon's plugin agent
 *
Show all 357 lines

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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.