Files
GTA4RP/scripts/server/item/handcuff.js
2022-07-08 14:03:55 -05:00

37 lines
1.4 KiB
JavaScript

// ===========================================================================
// Asshat Gaming Roleplay
// https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming
// ===========================================================================
// FILE: handcuff.js
// DESC: Provides features and usage for the handcuff item type
// TYPE: Server (JavaScript)
// ===========================================================================
// ===========================================================================
function isPlayerHandCuffed(client) {
return (getPlayerData(client).pedState == AGRP_PEDSTATE_BINDED);
}
// ===========================================================================
function handCuffPlayer(client) {
getPlayerData(client).pedState = AGRP_PEDSTATE_BINDED;
setPlayerControlState(client, false);
}
// ===========================================================================
function unHandCuffPlayer(client) {
getPlayerData(client).pedState = AGRP_PEDSTATE_READY;
setPlayerControlState(client, true);
}
// ===========================================================================
function isPlayerSurrendered(client) {
return true; //(getPlayerData(client).pedState == AGRP_PEDSTATE_TAZED || getPlayerData(client).pedState == AGRP_PEDSTATE_HANDSUP);
}
// ===========================================================================