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

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

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

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

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

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)

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)

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)

ankleTrackerPlayer

Activate/Deactivate an Ankletracker for a player

Parameters player - player - The target Player - Optional

headbagPlayer

Activate/Deactivate a Headbag for a player

Parameters player - player - The target Player - Optional

tapePlayer

Activate/Deactivate a Tape for a player

Parameters player - player - The target Player - Optional

dragPlayer / escortPlayer

Drag/Escort the closest player

Parameters player - player - The target Player - Optional

putPlayerInCar

Puts the closest player in the car

Parameters player - player - The target Player - Optional

putPlayerOutOfCar

Puts the closest player out of a car

Parameters player - player - The target Player - Optional

Last updated