Server Exports
All status getters accept a player table identifying the player:
{source = playerId} -- server id
{identifier = playerIdentifier} -- ESX license / QBCore citizenid
{player = xPlayer} -- a framework player object
getIsPlayerHandcuffed
Returns boolean | string — false, the cuffItem string, or 'isAdminCuffed'.
local state = exports.msk_handcuffs:getIsPlayerHandcuffed({source = playerId})
local state = exports.msk_handcuffs:getIsPlayerHandcuffed({identifier = playerIdentifier})
-- Alternative (statebag):
local isCuffed = Player(playerId).state.isHandcuffed
getIsPlayerHardcuffed
local state = exports.msk_handcuffs:getIsPlayerHardcuffed({source = playerId})
-- Alternative:
local isHardcuffed = Player(playerId).state.isHardcuffed
gethasPlayerAnkleTracker
local hasAnkletracker = exports.msk_handcuffs:gethasPlayerAnkleTracker({source = playerId})
-- Alternative:
local hasAnkletracker = Player(playerId).state.hasAnkleTracker
gethasPlayerHeadbag
local hasHeadbag = exports.msk_handcuffs:gethasPlayerHeadbag({source = playerId})
-- Alternative:
local hasHeadbag = Player(playerId).state.hasHeadbag
gethasPlayerTape
local hasTape = exports.msk_handcuffs:gethasPlayerTape({source = playerId})
-- Alternative:
local hasTape = Player(playerId).state.hasTape
Removed in v3
getDatabase, getPlayerFromDatabase and the admin exports (cuffAdmin, uncuffAdmin, …)
were removed. Use statebags, the getters above, or the
admin commands. See Migration.