Files
GTA4RP/scripts/server/item/handcuff.js
2021-01-15 03:44:09 -06:00

31 lines
1.2 KiB
JavaScript

// ===========================================================================
// Asshat-Gaming Roleplay
// https://github.com/VortrexFTW/gtac_asshat_rp
// Copyright (c) 2021 Asshat-Gaming (https://asshatgaming.com)
// ---------------------------------------------------------------------------
// FILE: handcuff.js
// DESC: Provides features and usage for the handcuff item type
// TYPE: Server (JavaScript)
// ===========================================================================
// ---------------------------------------------------------------------------
function isPlayerHandCuffed(client) {
return (getPlayerData(client).pedState == AG_PEDSTATE_BINDED);
}
// ---------------------------------------------------------------------------
function handCuffPlayer(client) {
getPlayerData(client).pedState = AG_PEDSTATE_BINDED;
setPlayerControlState(client, false);
}
// ---------------------------------------------------------------------------
function unHandCuffPlayer(client) {
getPlayerData(client).pedState = AG_PEDSTATE_READY;
setPlayerControlState(client, true);
}
// ---------------------------------------------------------------------------