MSK Scripts
TebexGithubDiscordMusiker15
  • MSK Scripts
    • Welcome
  • Common Issues
    • Keymaster
  • Miscellaneous
    • Change Notifications
  • Scripts
    • MSK Core
      • Installation
      • Functions
        • Client
          • Ace Permission
          • Commands
          • Coords
          • Player
          • Points
          • Request
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
          • Vehicle
        • Shared
          • String
          • Math
          • Table
          • Timeout
          • Vector
        • Server
          • Ace Permission
          • Ban System
          • Commands
          • Player
          • Scaleform
          • UI
            • Input
            • Numpad
            • Progressbar
            • TextUI
    • MSK Banking
      • Installation
        • Paycheck Transaction
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Server Callbacks
    • MSK EngineToggle
      • Guides
      • Exports
        • Client
      • Event Handler
        • Client
        • Server
    • MSK Fuel
      • Config
      • Exports
        • Client
    • MSK Garage
      • Config
      • Exports
        • Client
    • MSK Handcuffs
      • Guides
        • General Edits for Jobs
        • Jaksam Job Creator
        • Multichar
        • ox_inventory
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
      • Events
        • Client
        • Server
      • Event Handlers
    • MSK Radio
      • Config
      • Exports
        • Client
        • Server
      • Events
        • Server
    • MSK Simcard
      • Installation
        • Config.Database
      • Config
    • MSK VehicleKeys
      • Guides
        • Installation
        • Integrations
      • Config
      • Admin Commands
      • Exports
        • Client
        • Server
    • MSK Whitelist
      • Config
      • Exports
        • Client
        • Server
    • MSK Weaponammo
Powered by GitBook
On this page
  • getDatabase
  • getPlayerFromDatabase
  • getIsPlayerHandcuffed
  • getIsPlayerHardcuffed
  • gethasPlayerAnkleTracker
  • gethasPlayerHeadbag
  • gethasPlayerTape
  1. Scripts
  2. MSK Handcuffs
  3. Exports

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

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

Parameters player - table - specific Player

Returns isHardcuffed - 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

Parameters player - table - specific Player

Returns hasAnkletracker - 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

Parameters player - table - specific Player

Returns hasHeadbag - 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

Parameters player - table - specific Player

Returns hasTape - 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

Last updated 7 months ago