HEX
HexscriptsJobscreatorExportsServer Exports

Worker ID & Menus

Server exports to hand a worker ID or restaurant menu from one player to another, and to read a job's menu image.

showWorkerId

Has playerId present their configured worker ID to targetId hand-over animation on one side, card on the other.

local ok, err = exports['hex_jobscreator']:showWorkerId(5, 12)

Prop

Type

No distance check

Unlike the in-game action this skips the distance check, so it works for scripted hand-overs.

Returns

ValueMeaning
truecard sent
false, reasonsee the reasons below

Reasons

CodeMeaning
invalid_playerplayer id must be a number
same_playersource and target must differ
player_not_foundno such sender on the server
target_not_foundno such target player on the server
no_workerid_configuredneither of the sender's jobs has a worker ID set up

showJobMenu

The same thing for the restaurant menu.

local ok, err = exports['hex_jobscreator']:showJobMenu(5, 12)

Prop

Type

No distance check

This also skips the distance check.

Returns

ValueMeaning
truemenu sent
false, reasonsee the reasons below

Reasons

CodeMeaning
invalid_playerplayer id must be a number
same_playersource and target must differ
player_not_foundno such sender on the server
target_not_foundno such target player on the server
no_menu_configuredno restaurant menu is set up

getJobMenuUrl

The menu image URL configured for a job.

local url, err = exports['hex_jobscreator']:getJobMenuUrl('unicorn')

Prop

Type

Returns

ValueMeaning
stringthe menu image URL
nil, reasoninvalid_job · unknown_job · no_menu_configured