Skip to main content

Server Events

To start an action on a player from a server script, trigger useItem on their client. The client then runs the interaction UX (closest player, animation) and sends a server-validated request.

msk_handcuffs:useItem

Signature TriggerClientEvent('msk_handcuffs:useItem', source, action, payload)

ParamTypeDescription
sourcenumberServer id of the officer (the acting player)
actionstring'cuff', 'hardcuff', 'uncuff', 'ankletracker', 'headbag', 'tape'
payloadstring | booleanFor cuff actions: the item. For ankletracker/headbag/tape: true to force removal
-- Cuff the closest player (auto item from job/restrictions)
TriggerClientEvent('msk_handcuffs:useItem', source, 'cuff')

-- Cuff with a specific item
TriggerClientEvent('msk_handcuffs:useItem', source, 'cuff', 'cuffs')

-- Uncuff
TriggerClientEvent('msk_handcuffs:useItem', source, 'uncuff', 'cuff_keys')

-- Toggle ankletracker / headbag / tape
TriggerClientEvent('msk_handcuffs:useItem', source, 'ankletracker')
TriggerClientEvent('msk_handcuffs:useItem', source, 'headbag')
TriggerClientEvent('msk_handcuffs:useItem', source, 'tape')
tip

useItem always acts on the closest player to source. To target a specific player from the client, use the client exports with a player argument.

Migrating from v2

This single event replaces the old msk_handcuffs:cuff / :hardcuff / :uncuff / :setAnkletracker / :setHeadbag / :setTape events. See Migration.