HEX
HexscriptsJobscreatorExportsClient Exports

Handcuffs & Escorting

Client exports to cuff and uncuff the local player, and to read the current carry and escort state.

isPlayerHandcuffed

Whether the local player is currently cuffed.

if exports['hex_jobscreator']:isPlayerHandcuffed() then
    -- the player is cuffed
end

Returns

ValueMeaning
trueplayer is cuffed
false, 'not_handcuffed'player is not cuffed

isPlayerCarrying

Whether a ped is playing one of the carry animations.

local carrying = exports['hex_jobscreator']:isPlayerCarrying()

Prop

Type

Returns

ValueMeaning
trueped is carrying someone
false, reasonsee the reasons below

Reasons

CodeMeaning
invalid_pedthat ped does not exist
not_carryingthe ped is not carrying anyone

isPlayerEscorting

Whether the local player is dragging someone, being dragged, or neither.

local escorting, target = exports['hex_jobscreator']:isPlayerEscorting()

if escorting then
    print('dragging player ' .. target)
end

Returns

ValueMeaning
true, targetServerIdplayer is dragging someone; the second value is who
false, 'being_escorted'the player is the one being dragged
false, 'not_escorting'neither

stopEscort

Ends an escort in either direction and tells the server, so both sides drop out of it.

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

Returns

ValueMeaning
trueescort ended
false, 'not_escorting'nothing to stop

addHandcuffs

Cuffs the local player.

Plays the cuff sound, applies the animation, blocks the usual controls and writes the state so it survives a reconnect exactly like being cuffed by a police officer in game.

local ok, err = exports['hex_jobscreator']:addHandcuffs(0)

Prop

Type

Returns

ValueMeaning
truecuffs applied
false, reasonsee the reasons below

Reasons

CodeMeaning
invalid_cuff_typecuff type must be 0 or 1
already_handcuffedthe player is already cuffed
player_deadthe player is fatally injured

removeHandcuffs

Removes the local player's cuffs.

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

Returns

ValueMeaning
truecuffs removed
false, 'not_handcuffed'player was not cuffed