HEX
HexscriptsJobscreatorExportsServer Exports

Business State

Server exports to read and change whether a business is open or closed.

isJobClosed

Whether a business is closed.

local closed, err = exports['hex_jobscreator']:isJobClosed('mechanic')

Prop

Type

Returns

ValueMeaning
truebusiness is closed
false, reasonsee the reasons below

Reasons

CodeMeaning
invalid_jobjob name must be a non-empty string
unknown_jobno job with that name
openthe business is open

setJobClosed

Opens or closes a business and pushes the new state to every client, updating blips exactly as the in-game open/close point does.

exports['hex_jobscreator']:setJobClosed('mechanic', true)

Prop

Type

Returns

ValueMeaning
truestate applied already being in that state also returns true
false, reasoninvalid_job · unknown_job · invalid_state