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
| Value | Meaning |
|---|---|
true | business is closed |
false, reason | see the reasons below |
Reasons
| Code | Meaning |
|---|---|
invalid_job | job name must be a non-empty string |
unknown_job | no job with that name |
open | the 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
| Value | Meaning |
|---|---|
true | state applied already being in that state also returns true |
false, reason | invalid_job · unknown_job · invalid_state |