HEX
HexscriptsJobscreatorExportsClient Exports

Permissions

Check whether the local player may use a given action, across both job slots.

hasPlayerAccess

Whether the local player may use a given action, checking both job slots and taking grade limits and duty state into account.

local ok, err = exports['hex_jobscreator']:hasPlayerAccess('handcuffs')

Prop

Type

Accepted names

action accepts three kinds of name.

Single action

CategoryActions
Civilhandcuff_back handcuff_front release search drag put_in_vehicle out_vehicle
EMSrevive small big ems_putin ems_putout
Vehiclevehicle_info hijack repair wash impound plate_lookup low_loader
Licensegive_license revoke_license

Whole category

Passing a category returns true if any action in it is allowed.

civil · ems · vehicle · license

Friendly alias

AliasCovers
handcuffsany of the three cuff actions
draggingthe drag action
workerIdthe worker ID action
menu / jobmenuthe job menu
billingbilling
objects / object_spawnerthe object spawner

Case sensitivity

Aliases are case-insensitive; raw action names are not.

Returns

ValueMeaning
trueallowed right now
false, reasonsee the reasons below

Reasons

CodeMeaning
invalid_actionaction must be a non-empty string
unknown_actionnot an action, category or alias check the spelling
no_accessthe job does not grant this action, or the grade is too low
not_on_dutythe job has a duty point and the player is clocked out

Server side

The server has its own check, hasPlayerActionAccess, which takes raw action names only no categories or aliases.