Skip to content

ax.util

Source: gamemode/framework/util/util_find.lua

Utility helpers used across the Parallax framework (printing, file handling, text utilities, etc.).

Section: find_utilities

Documented functions: 4

Functions


ax.util:FindCharacter(identifier)

Find a character by ID or name (case-insensitive, partial match).

Parameters

Name Type Description
identifier number\|string Character ID or name to search for

Returns

  • ax.character.meta|nil: The found character or nil

Usage

local char = ax.util:FindCharacter("John")

ax.util:FindPlayer(identifier)

Find a player by SteamID, SteamID64, name, entity or numeric index.

Parameters

Name Type Description
identifier number\|string\|Entity\|table Player identifier or list of identifiers

Returns

  • Player|NULL: The found player entity or NULL

Usage

local client = ax.util:FindPlayer("7656119...")

ax.util:FindString(str, find, caseSensitive, startPos, usePatterns)

Utility helpers used across the Parallax framework (printing, file handling, text utilities, etc.). User and character finder utilities. Find a specific piece of text within a larger body of text (case-insensitive).

Parameters

Name Type Description
str string The string to search in
find string The substring to search for

Returns

  • boolean: True if substring exists in string

Usage

if ax.util:FindString("Hello World", "world") then print("found") end

ax.util:FindText(txt, find)

Search each word in a text for a substring (case-insensitive).

Parameters

Name Type Description
txt string The text to search
find string The substring to search for across words

Returns

  • boolean: True when any word in txt contains find

Usage

ax.util:FindText("the quick brown fox", "quick")