mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
b4c72d8255
* Can disarm captives in vehicles * Can blindfold captives in vehicles * Fix dropping goggles/blindfold into large vehicles * Apply suggestions from code review Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
26 lines
600 B
Plaintext
26 lines
600 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: johnb43
|
|
* Checks if caller can remove blindfold from the captive.
|
|
*
|
|
* Arguments:
|
|
* 0: Caller (player) <OBJECT>
|
|
* 1: Target <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can remove blindfold <BOOL>
|
|
*
|
|
* Example:
|
|
* [player, cursorTarget] call ace_captives_fnc_canRemoveBlindfoldCaptive
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit", "_target"];
|
|
// Alive, handcuffed, not being escorted, and target is wearing a blindfold
|
|
|
|
(_target getVariable [QGVAR(isHandcuffed), false]) &&
|
|
{isNull (attachedTo _target)} &&
|
|
{alive _target} &&
|
|
{(goggles _target) in GVAR(blindfolds)}
|