Skip to content

ax.flag

Source: gamemode/framework/libraries/sh_flags.lua

Flag management system for character permissions and abilities.

Documented functions: 3

Functions


ax.flag:Create(letter, flagData)

Create a new flag with associated data. Registers a flag letter with its description and metadata.

Realm: shared

Parameters

Name Type Description
letter string Single letter flag identifier (A-Z, a-z)
flagData table Flag metadata including name, description, etc.

Usage

ax.flag:Create("a", {name = "Admin", description = "Administrative access"})

ax.flag:Get(letter)

Get a flag definition by its letter. Retrieves the flag data associated with a specific flag letter.

Realm: shared

Parameters

Name Type Description
letter string Single letter flag identifier

Returns

  • table|nil: Flag data if found, nil otherwise

Usage

local adminFlag = ax.flag:Get("a")

ax.flag:GetAll()

Get all registered flags. Returns the complete registry of flag letters and their data.

Realm: shared

Returns

  • table: Table of all flag definitions

Usage

local allFlags = ax.flag:GetAll()