Returnsdatabase - table - Content of database.json
local database = exports.msk_handcuffs:getDatabase()
getPlayerFromDatabase
Get content of a specific Player from database
Parametersidentifier - The identifier of a Player
Returnsdata - table - Content of database.json
local xPlayer = ESX.GetPlayerFromId(source)local data = exports.msk_handcuffs:getPlayerFromDatabase(xPlayer.identifier)--[[data.isCuffed -> booleandata.cuffItem -> string or nildata.isHardcuffed -> booleandata.hardcuffItem -> string or nildata.isAdminCuffed -> booleandata.hasAnkleTracker -> booleandata.hasHeadbag -> booleandata.hasTape -> boolean]]
getIsPlayerHandcuffed
Check if a specific player is handcuffed or not
Parametersplayer - table - specific Player
ReturnsisHandcuffed - boolean - If the Player is handcuffed or not
local isHandcuffed = exports.msk_handcuffs:getIsPlayerHandcuffed({source = playerId})local isHandcuffed = exports.msk_handcuffs:getIsPlayerHandcuffed({identifier = playerIdentifier})local isHandcuffed = exports.msk_handcuffs:getIsPlayerHandcuffed({player = xPlayer})-- You can also use this:Player(source).state.isHandcuffed
getIsPlayerHardcuffed
Check if a specific player is hardcuffed or not
Parametersplayer - table - specific Player
ReturnsisHardcuffed - boolean - If the Player is hardcuffed or not
local isHardcuffed = exports.msk_handcuffs:getIsPlayerHardcuffed({source = playerId})local isHardcuffed = exports.msk_handcuffs:getIsPlayerHardcuffed({identifier = playerIdentifier})local isHardcuffed = exports.msk_handcuffs:getIsPlayerHardcuffed({player = xPlayer})-- You can also use this:Player(source).state.isHardcuffed
gethasPlayerAnkleTracker
Check if a specific player has an Ankletracker or not
Parametersplayer - table - specific Player
ReturnshasAnkletracker - boolean - If the Player has an Ankletracker or not
local hasAnkletracker = exports.msk_handcuffs:gethasPlayerAnkleTracker({source = playerId})local hasAnkletracker = exports.msk_handcuffs:gethasPlayerAnkleTracker({identifier = playerIdentifier})local hasAnkletracker = exports.msk_handcuffs:gethasPlayerAnkleTracker({player = xPlayer})-- You can also use this:Player(source).state.hasAnkletracker
gethasPlayerHeadbag
Check if a specific has a Headbag or not
Parametersplayer - table - specific Player
ReturnshasHeadbag - boolean - If the Player has a Headbag or not
local hasHeadbag = exports.msk_handcuffs:gethasPlayerHeadbag({source = playerId})local hasHeadbag = exports.msk_handcuffs:gethasPlayerHeadbag({identifier = playerIdentifier})local hasHeadbag = exports.msk_handcuffs:gethasPlayerHeadbag({player = xPlayer})-- You can also use this:Player(source).state.hasHeadbag
gethasPlayerTape
Check if a specific has a Tape or not
Parametersplayer - table - specific Player
ReturnshasTape - boolean - If the Player has a Tape or not
local hasTape = exports.msk_handcuffs:gethasPlayerTape({source = playerId})local hasTape = exports.msk_handcuffs:gethasPlayerTape({identifier = playerIdentifier})local hasTape = exports.msk_handcuffs:gethasPlayerTape({player = xPlayer})-- You can also use this:Player(source).state.hasTape