Get the current Object attached to the local player
Parameterskey - string - The current object key name
Returnsobject - entity - The entity that is attached to the local player or nil if nothing is attached
local object = exports.msk_handcuffs:getObjectState(key)-- Examplelocal 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
Parametersplayer - table - This is options and only for other players
ReturnsisHandcuffed - boolean - If the Player is handcuffed or not
-- Selflocal isHandcuffed = exports.msk_handcuffs:getIsHandcuffed()-- Self: You can also use thislocal isHandcuffed = LocalPlayer.state.isHandcuffed-- Other Playerslocal isHandcuffed = exports.msk_handcuffs:getIsHandcuffed({source = targetId})
getIsHardcuffed
Check if a player is hardcuffed or not
Parametersplayer - table - This is options and only for other players
ReturnsisHardcuffed - boolean - If the Player is hardcuffed or not
-- Selflocal isHardcuffed = exports.msk_handcuffs:getIsHardcuffed()-- Self: You can also use thislocal isHardcuffed = LocalPlayer.state.isHardcuffed-- Other Playerslocal isHardcuffed = exports.msk_handcuffs:getIsHardcuffed({source = targetId})
getHasAnkletracker
Check if a player has an Ankletracker or not
Parametersplayer - table - This is options and only for other players
ReturnshasAnkletracker - boolean - If the Player has an Ankletracker or not
-- Selflocal hasAnkletracker = exports.msk_handcuffs:getHasAnkletracker()-- Self: You can also use thislocal hasAnkletracker = LocalPlayer.state.hasAnkletracker-- Other Playerslocal hasAnkletracker = exports.msk_handcuffs:getHasAnkletracker({source = targetId})
getHasHeadbag
Check if a player has a Headbag or not
Parametersplayer - table - This is options and only for other players
ReturnshasHeadbag - boolean - If the Player has a Headbag or not
-- Selflocal hasHeadbag = exports.msk_handcuffs:getHasHeadbag()-- Self: You can also use thislocal hasHeadbag = LocalPlayer.state.hasHeadbag-- Other Playerslocal hasHeadbag = exports.msk_handcuffs:getHasHeadbag({source = targetId})
getHasTape
Check if a player has a Tape or not
Parametersplayer - table - This is options and only for other players
ReturnshasTape - boolean - If the Player has a Tape or not
-- Selflocal hasTape = exports.msk_handcuffs:getHasTape()-- Self: You can also use thislocal hasTape = LocalPlayer.state.hasTape-- Other Playerslocal hasTape = exports.msk_handcuffs:getHasTape({source = targetId})
cuffPlayer
Cuff a player
Parametersitem - string - The Item with which the player gets cuffed - Optional player - player - The target Player that gets cuffed - Optional
DescriptionIf 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 Descriptionexports.msk_handcuffs:cuffPlayer()-- The player next to your player gets cuffed with item cuffsexports.msk_handcuffs:cuffPlayer('cuffs')-- closestPlayer gets cuffed // Read Descriptionexports.msk_handcuffs:cuffPlayer(nil, closestPlayer)-- closestPlayer gets cuffed with item cuffsexports.msk_handcuffs:cuffPlayer('cuffs', closestPlayer)
hardcuffPlayer
Hardcuff a player
Parametersitem - string - The Item with which the player gets hardcuffed - Optional player - player - The target Player that gets hardcuffed - Optional
DescriptionIf 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 Descriptionexports.msk_handcuffs:hardcuffPlayer()-- The player next to your player gets hardcuffed with item hardcuffexports.msk_handcuffs:hardcuffPlayer('hardcuff')-- closestPlayer gets hardcuffed // Read Descriptionexports.msk_handcuffs:hardcuffPlayer(nil, closestPlayer)-- closestPlayer gets hardcuffed with item hardcuffexports.msk_handcuffs:hardcuffPlayer('hardcuff', closestPlayer)
uncuffPlayer
Uncuff a player
It will check if the item is correct or not to uncuff someone.
Parametersitem - string - The Item with which the player gets uncuffed - Optional player - player - The target Player that gets uncuffed - Optional
DescriptionIf 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 Descriptionexports.msk_handcuffs:uncuffPlayer()-- The player next to your player gets uncuffed with item cuff_keysexports.msk_handcuffs:uncuffPlayer('cuff_keys')-- closestPlayer gets uncuffed // Read Descriptionexports.msk_handcuffs:uncuffPlayer(nil, closestPlayer)-- closestPlayer gets uncuffed with item cuff_keysexports.msk_handcuffs:uncuffPlayer('cuff_keys', closestPlayer)
ankleTrackerPlayer
Activate/Deactivate an Ankletracker for a player
Parametersplayer - player - The target Player - Optional
exports.msk_handcuffs:ankleTrackerPlayer(player)-- The player next to your playerexports.msk_handcuffs:ankleTrackerPlayer()-- Specific Playerexports.msk_handcuffs:ankleTrackerPlayer(closestPlayer)
headbagPlayer
Activate/Deactivate a Headbag for a player
Parametersplayer - player - The target Player - Optional
exports.msk_handcuffs:headbagPlayer(player)-- The player next to your playerexports.msk_handcuffs:headbagPlayer()-- Specific Playerexports.msk_handcuffs:headbagPlayer(closestPlayer)
tapePlayer
Activate/Deactivate a Tape for a player
Parametersplayer - player - The target Player - Optional
exports.msk_handcuffs:tapePlayer(player)-- The player next to your playerexports.msk_handcuffs:tapePlayer()-- Specific Playerexports.msk_handcuffs:tapePlayer(closestPlayer)
dragPlayer / escortPlayer
Drag/Escort the closest player
Parametersplayer - player - The target Player - Optional
exports.msk_handcuffs:dragPlayer(player)-- You can also useexports.msk_handcuffs:escortPlayer(player)-- The player next to your playerexports.msk_handcuffs:escortPlayer()-- Specific Playerexports.msk_handcuffs:escortPlayer(closestPlayer)
putPlayerInCar
Puts the closest player in the car
Parametersplayer - player - The target Player - Optional
exports.msk_handcuffs:putPlayerInCar(player)-- The player next to your playerexports.msk_handcuffs:putPlayerInCar()-- Specific Playerexports.msk_handcuffs:putPlayerInCar(closestPlayer)
putPlayerOutOfCar
Puts the closest player out of a car
Parametersplayer - player - The target Player - Optional
exports.msk_handcuffs:putPlayerOutOfCar(player)-- The player next to your playerexports.msk_handcuffs:putPlayerOutOfCar()-- Specific Playerexports.msk_handcuffs:putPlayerOutOfCar(closestPlayer)