mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Captives - Add modded cable tie support (#9350)
* Update fnc_canApplyHandcuffs.sqf * Update fnc_canApplyHandcuffs.sqf * Update fnc_doApplyHandcuffs.sqf * Update XEH_preStart.sqf * Update fnc_doApplyHandcuffs.sqf * Update fnc_canApplyHandcuffs.sqf * Update XEH_preInit.sqf * Update fnc_doApplyHandcuffs.sqf stray bracket * Update addons/captives/XEH_preStart.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update CfgWeapons.hpp * Update CfgWeapons.hpp * Update fnc_canApplyHandcuffs.sqf * Change to restraints Update XEH_preInit.sqf * Update XEH_preStart.sqf * Update fnc_canApplyHandcuffs.sqf * Update fnc_doApplyHandcuffs.sqf * Update CfgWeapons.hpp --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
parent
bee0362921
commit
c88695fb82
@ -4,6 +4,7 @@ class CfgWeapons {
|
||||
|
||||
class ACE_CableTie: ACE_ItemCore {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
GVAR(restraint) = 1;
|
||||
displayName = CSTRING(CableTie);
|
||||
descriptionShort = CSTRING(CableTieDescription);
|
||||
model = QPATHTOF(models\ace_cabletie.p3d);
|
||||
|
@ -8,6 +8,8 @@ PREP_RECOMPILE_END;
|
||||
|
||||
GVAR(captivityEnabled) = false;
|
||||
|
||||
GVAR(restraints) = call (uiNamespace getVariable QGVAR(restraints));
|
||||
|
||||
#include "initSettings.sqf"
|
||||
|
||||
ADDON = true;
|
||||
|
@ -1,3 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
private _restraints = (QUOTE(getNumber (_x >> QQGVAR(restraint)) > 0) configClasses (configFile >> "CfgWeapons") apply {configName _x});
|
||||
uiNamespace setVariable [QGVAR(restraints), compileFinal str _restraints];
|
||||
|
@ -20,7 +20,7 @@ params ["_unit", "_target"];
|
||||
//Check sides, Player has cableTie, target is alive and not already handcuffed
|
||||
|
||||
(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) &&
|
||||
{"ACE_CableTie" in (_unit call EFUNC(common,uniqueItems))} &&
|
||||
{((_unit call EFUNC(common,uniqueItems)) findAny GVAR(restraints)) != -1} &&
|
||||
{alive _target} &&
|
||||
{!(_target getVariable [QGVAR(isHandcuffed), false])} &&
|
||||
{
|
||||
|
@ -23,4 +23,6 @@ playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (get
|
||||
|
||||
[QGVAR(setHandcuffed), [_target, true, _unit], [_target]] call CBA_fnc_targetEvent;
|
||||
|
||||
_unit removeItem "ACE_CableTie";
|
||||
private _cuffs = (_unit call EFUNC(common,uniqueItems)) arrayIntersect GVAR(restraints);
|
||||
|
||||
_unit removeItem (_cuffs#0);
|
||||
|
Loading…
Reference in New Issue
Block a user