Orbit StudiosOrbit Studios
Orbit Studios Resourcesorbit-craftingsystem

Exports

Server and client exports available in orbit-craftingsystem.

Exports

Use server exports from another server script and client exports from another client script. Calling a client export from server code, or a server export from client code, will not work.

Prop

Type

Server Examples

resources/[custom]/server/main.lua
local source = source
local created = exports['orbit-craftingsystem']:CreateBlueprint(source, 'weapon_pistol', 1)

if not created then
    print('[my-resource] Blueprint could not be created')
end
resources/[custom]/server/main.lua
local level, xp = exports['orbit-craftingsystem']:getPlayerLevel(source)
print(('Player level: %s, XP: %s'):format(level, xp))
resources/[custom]/server/main.lua
local itemData = exports['orbit-craftingsystem']:getItemData(true, 'weapon_station', 'weapon_pistol', false)

if itemData then
    print(('Base odds: %s'):format(itemData.baseOdds))
end

Client Examples

resources/[custom]/client/main.lua
exports['orbit-craftingsystem']:previewProp('weapon-crafting_bench', 'prop_tool_bench02', nil, nil)
resources/[custom]/client/main.lua
exports['orbit-craftingsystem']:checkNearbyBenches('weapon_pistol', nil, nil)

The client helpers are mainly useful for advanced integrations. For normal setup, let the included bench item and blueprint item handlers call them automatically.

On this page