Files
GTA4RP/scripts/server/item/handcuff.js
2022-03-16 17:06:57 -05:00

36 lines
1.3 KiB
JavaScript

// ===========================================================================
// Vortrex's Roleplay Resource
// https://github.com/VortrexFTW/gtac_roleplay
// ===========================================================================
// FILE: handcuff.js
// DESC: Provides features and usage for the handcuff item type
// TYPE: Server (JavaScript)
// ===========================================================================
// ===========================================================================
function isPlayerHandCuffed(client) {
return (getPlayerData(client).pedState == VRR_PEDSTATE_BINDED);
}
// ===========================================================================
function handCuffPlayer(client) {
getPlayerData(client).pedState = VRR_PEDSTATE_BINDED;
setPlayerControlState(client, false);
}
// ===========================================================================
function unHandCuffPlayer(client) {
getPlayerData(client).pedState = VRR_PEDSTATE_READY;
setPlayerControlState(client, true);
}
// ===========================================================================
function isPlayerSurrendered(client) {
return true; //(getPlayerData(client).pedState == VRR_PEDSTATE_TAZED || getPlayerData(client).pedState == VRR_PEDSTATE_HANDSUP);
}
// ===========================================================================