Ares-Armory Exports

All exports use the resource name weaponGame.

-- client
exports.weaponGame:exportName(...)
-- or
exports['weaponGame']:exportName(...)

-- server (same syntax)
exports.weaponGame:exportName(...)

Client Exports

openWorkbench

Opens the workbench UI on the local client.

local opened = exports.weaponGame:openWorkbench(weapons)
Param
Type
Required
Description

weapons

string | table | nil

No

Which weapons to show. See below.

weapons values:

  • nil or 'all' — show every weapon

  • { 'ak47', 'beretta' } — show only these weapon keys

Returns: booleantrue if the menu opened, false if blocked (player is crafting or menu is on cooldown).


closeWorkbench

Closes the workbench UI and releases NUI focus.

No parameters, no return value.


isCrafting

Check if the player is currently in a crafting action (progress bar is active).

Returns: boolean


isMenuOpen

Check if the workbench menu is currently open and holding NUI focus.

Returns: boolean


isNearTable

Check if the player is near any crafting table (within the configured interaction distance).

Returns: boolean


getConfig

Get the full Config table, including weapons, materials, tables, and options.

Returns: table — the full Config object.


getWeapons

Get the weapon definitions table.

Returns: table — keyed by weapon ID.


getMaterials

Get the materials / craftable parts table.

Returns: table — keyed by material ID.


Server Exports

openWorkbench

Open the workbench UI for a specific player (from the server).

Param
Type
Required
Description

source

number

Yes

Server ID of the target player.

weapons

string | table | nil

No

Same as the client version: nil/'all' for everything, or a table of keys.

No return value (fires a client event).


closeWorkbench

Close the workbench UI for a specific player.

Param
Type
Required
Description

source

number

Yes

Server ID of the target player.


getConfig

Get the full Config table.

Returns: table — same structure as the client getConfig.


getWeapons

Get the weapon definitions.

Returns: table — same format as client getWeapons.


getMaterials

Get the materials table.

Returns: table — same format as client getMaterials.


getTableLocations

Get the coordinates of every crafting table as a flat list of vec3 values.

Returns: table — array of vec3.


isPlayerNearTable

Check if a player is within interaction range of any crafting table (server-side distance check).

Param
Type
Required
Description

source

number

Yes

Server ID of the player.

Returns: boolean


isPlayerCrafting

Check if a player is currently crafting anything (part or weapon).

Param
Type
Required
Description

source

number

Yes

Server ID of the player.

Returns: boolean


getNearestTable

Get the raw Config.Tables entry for the table closest to the player (within range).

Param
Type
Required
Description

source

number

Yes

Server ID of the player.

Returns: vec3 | table | nil — the raw entry from Config.Tables, or nil if not near any table.

The returned value depends on how the table was defined in config:

  • Plain format: vec3(-151.23, -984.49, 114.12)

  • Extended format: { coords = vec3(145.87, 142.44, 111.92), weapons = { 'ak47', 'beretta' } }

Use the shared helpers GetTableCoords(entry) and GetTableWeapons(entry) to normalize.


getAvailableWeapons

Get the weapon filter for the table nearest to a player.

Param
Type
Required
Description

source

number

Yes

Server ID of the player.

Returns:

  • 'all' (string) — table shows every weapon

  • { 'ak47', 'beretta' } (table) — table only shows these weapons

  • nil — player is not near any table

Last updated

Was this helpful?