ax.relay¶
Source: gamemode/framework/libraries/sh_relay.lua
Entity and global variable relay system for synchronized data storage.
Documented functions: 4
Functions¶
ENTITY:GetRelay(name, fallback)ENTITY:SetRelay(name, value, bNoNetworking, recipients)GetRelay(name, fallback)SetRelay(name, value, bNoNetworking, recipients)
ENTITY:GetRelay(name, fallback)¶
Get a relay variable from an entity. Retrieves a stored value associated with this entity.
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
ENTITY:SetRelay(name, value, bNoNetworking, recipients)¶
Set a relay variable on an entity with optional networking. Stores a value associated with this entity and optionally syncs it 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
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