Server

Exports - Serverside

getDatabase

Get the content of database

Returns database - table - Content of database.json

local database = exports.msk_handcuffs:getDatabase()

getPlayerFromDatabase

Get content of a specific Player from database

Parameters identifier - The identifier of a Player

Returns data - table - Content of database.json

local xPlayer = ESX.GetPlayerFromId(source)
local data = exports.msk_handcuffs:getPlayerFromDatabase(xPlayer.identifier)

--[[
data.isCuffed -> boolean
data.cuffItem -> string or nil
data.isHardcuffed -> boolean
data.hardcuffItem -> string or nil
data.isAdminCuffed -> boolean
data.hasAnkleTracker -> boolean
data.hasHeadbag -> boolean
data.hasTape -> boolean
]]

getIsPlayerHandcuffed

Check if a specific player is handcuffed or not

Parameters player - table - specific Player

Returns isHandcuffed - boolean - If the Player is handcuffed or not

getIsPlayerHardcuffed

Check if a specific player is hardcuffed or not

Parameters player - table - specific Player

Returns isHardcuffed - boolean - If the Player is hardcuffed or not

gethasPlayerAnkleTracker

Check if a specific player has an Ankletracker or not

Parameters player - table - specific Player

Returns hasAnkletracker - boolean - If the Player has an Ankletracker or not

gethasPlayerHeadbag

Check if a specific has a Headbag or not

Parameters player - table - specific Player

Returns hasHeadbag - boolean - If the Player has a Headbag or not

gethasPlayerTape

Check if a specific has a Tape or not

Parameters player - table - specific Player

Returns hasTape - boolean - If the Player has a Tape or not

Last updated