Client

Exports - Clientside

getObjectState

Get the current Object attached to the local player

Parameters key - string - The current object key name

Returns object - entity - The entity that is attached to the local player or nil if nothing is attached

local object = exports.msk_handcuffs:getObjectState(key)

-- Example
local object = exports.msk_handcuffs:getObjectState('cuffObject')
local object = exports.msk_handcuffs:getObjectState('uncuffObject')
local object = exports.msk_handcuffs:getObjectState('ankletrackerObject')
local object = exports.msk_handcuffs:getObjectState('headbagObject')
local object = exports.msk_handcuffs:getObjectState('tapeObject')

-- You can also use this:
local object = LocalPlayer.state[key]

getIsHandcuffed

Check if a player is handcuffed or not

Parameters player - table - This is options and only for other players

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

-- Self
local isHandcuffed = exports.msk_handcuffs:getIsHandcuffed()

-- Self: You can also use this
local isHandcuffed = LocalPlayer.state.isHandcuffed

-- Other Players
local isHandcuffed = exports.msk_handcuffs:getIsHandcuffed({source = targetId})

getIsHardcuffed

Check if a player is hardcuffed or not

Parameters player - table - This is options and only for other players

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

-- Self
local isHardcuffed = exports.msk_handcuffs:getIsHardcuffed()

-- Self: You can also use this
local isHardcuffed = LocalPlayer.state.isHardcuffed

-- Other Players
local isHardcuffed = exports.msk_handcuffs:getIsHardcuffed({source = targetId})

getHasAnkletracker

Check if a player has an Ankletracker or not

Parameters player - table - This is options and only for other players

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

-- Self
local hasAnkletracker = exports.msk_handcuffs:getHasAnkletracker()

-- Self: You can also use this
local hasAnkletracker = LocalPlayer.state.hasAnkletracker

-- Other Players
local hasAnkletracker = exports.msk_handcuffs:getHasAnkletracker({source = targetId})

getHasHeadbag

Check if a player has a Headbag or not

Parameters player - table - This is options and only for other players

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

-- Self
local hasHeadbag = exports.msk_handcuffs:getHasHeadbag()

-- Self: You can also use this
local hasHeadbag = LocalPlayer.state.hasHeadbag

-- Other Players
local hasHeadbag = exports.msk_handcuffs:getHasHeadbag({source = targetId})

getHasTape

Check if a player has a Tape or not

Parameters player - table - This is options and only for other players

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

-- Self
local hasTape = exports.msk_handcuffs:getHasTape()

-- Self: You can also use this
local hasTape = LocalPlayer.state.hasTape

-- Other Players
local hasTape = exports.msk_handcuffs:getHasTape({source = targetId})

cuffPlayer

Cuff a player

Parameters item - string - The Item with which the player gets cuffed - Optional player - player - The target Player that gets cuffed - Optional

Description If item is nil then the Script will check the correct item from Config.RestrictItems if it's enabled or it will cuff the Player without an item (isAdminCuffed)

exports.msk_handcuffs:cuffPlayer(item, player)

-- The player next to your player gets cuffed // Read Description
exports.msk_handcuffs:cuffPlayer()
-- The player next to your player gets cuffed with item cuffs
exports.msk_handcuffs:cuffPlayer('cuffs')
-- closestPlayer gets cuffed // Read Description
exports.msk_handcuffs:cuffPlayer(nil, closestPlayer)
-- closestPlayer gets cuffed with item cuffs
exports.msk_handcuffs:cuffPlayer('cuffs', closestPlayer)

hardcuffPlayer

Hardcuff a player

Parameters item - string - The Item with which the player gets hardcuffed - Optional player - player - The target Player that gets hardcuffed - Optional

Description If item is nil then the Script will check the correct item from Config.RestrictItems if it's enabled or it will hardcuff the Player without an item (isAdminCuffed)

exports.msk_handcuffs:hardcuffPlayer(item, player)

-- The player next to your player gets hardcuffed // Read Description
exports.msk_handcuffs:hardcuffPlayer()
-- The player next to your player gets hardcuffed with item hardcuff
exports.msk_handcuffs:hardcuffPlayer('hardcuff')
-- closestPlayer gets hardcuffed // Read Description
exports.msk_handcuffs:hardcuffPlayer(nil, closestPlayer)
-- closestPlayer gets hardcuffed with item hardcuff
exports.msk_handcuffs:hardcuffPlayer('hardcuff', closestPlayer)

uncuffPlayer

Uncuff a player

It will check if the item is correct or not to uncuff someone.

Parameters item - string - The Item with which the player gets uncuffed - Optional player - player - The target Player that gets uncuffed - Optional

Description If item is nil then the Script will check the correct item from Config.RestrictItems if it's enabled or it will uncuff the Player without an item (isAdminCuffed)

exports.msk_handcuffs:uncuffPlayer(item, player)

-- The player next to your player gets uncuffed // Read Description
exports.msk_handcuffs:uncuffPlayer()
-- The player next to your player gets uncuffed with item cuff_keys
exports.msk_handcuffs:uncuffPlayer('cuff_keys')
-- closestPlayer gets uncuffed // Read Description
exports.msk_handcuffs:uncuffPlayer(nil, closestPlayer)
-- closestPlayer gets uncuffed with item cuff_keys
exports.msk_handcuffs:uncuffPlayer('cuff_keys', closestPlayer)

ankleTrackerPlayer

Activate/Deactivate an Ankletracker for a player

Parameters player - player - The target Player - Optional

exports.msk_handcuffs:ankleTrackerPlayer(player)

-- The player next to your player
exports.msk_handcuffs:ankleTrackerPlayer()
-- Specific Player
exports.msk_handcuffs:ankleTrackerPlayer(closestPlayer)

headbagPlayer

Activate/Deactivate a Headbag for a player

Parameters player - player - The target Player - Optional

exports.msk_handcuffs:headbagPlayer(player)

-- The player next to your player
exports.msk_handcuffs:headbagPlayer()
-- Specific Player
exports.msk_handcuffs:headbagPlayer(closestPlayer)

tapePlayer

Activate/Deactivate a Tape for a player

Parameters player - player - The target Player - Optional

exports.msk_handcuffs:tapePlayer(player)

-- The player next to your player
exports.msk_handcuffs:tapePlayer()
-- Specific Player
exports.msk_handcuffs:tapePlayer(closestPlayer)

dragPlayer / escortPlayer

Drag/Escort the closest player

Parameters player - player - The target Player - Optional

exports.msk_handcuffs:dragPlayer(player)
-- You can also use
exports.msk_handcuffs:escortPlayer(player)

-- The player next to your player
exports.msk_handcuffs:escortPlayer()
-- Specific Player
exports.msk_handcuffs:escortPlayer(closestPlayer)

putPlayerInCar

Puts the closest player in the car

Parameters player - player - The target Player - Optional

exports.msk_handcuffs:putPlayerInCar(player)

-- The player next to your player
exports.msk_handcuffs:putPlayerInCar()
-- Specific Player
exports.msk_handcuffs:putPlayerInCar(closestPlayer)

putPlayerOutOfCar

Puts the closest player out of a car

Parameters player - player - The target Player - Optional

exports.msk_handcuffs:putPlayerOutOfCar(player)

-- The player next to your player
exports.msk_handcuffs:putPlayerOutOfCar()
-- Specific Player
exports.msk_handcuffs:putPlayerOutOfCar(closestPlayer)

Last updated