ax.relay¶
Source: gamemode/framework/libraries/sh_relay.lua
Entity and global variable relay system for synchronized data storage.
Documented functions: 2
Functions¶
GetRelay(name, fallback)¶
Get a global relay variable.
Retrieves a stored global value that can be accessed from anywhere.
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
The variable name to retrieve |
fallback |
any |
Optional fallback value if variable is not set |
Returns
any: The stored value or fallback if not found
Usage
SetRelay(name, value, bNoNetworking, recipients)¶
Set a global relay variable with optional networking.
Stores a global value that can be accessed from anywhere and optionally syncs to clients.
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
The variable name to set |
value |
any |
The value to store (will be networked if on server) |
bNoNetworking |
boolean |
Optional flag to disable networking (server only) |
recipients |
table |
Optional specific recipients for networking (server only) |
Usage