ACE3/addons/medical_treatment/functions/fnc_canUnloadUnit.sqf
2024-07-17 21:49:23 +02:00

25 lines
470 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: LinkIsGrim
* Checks if unit can be unloaded.
*
* Arguments:
* 0: Unloader <OBJECT>
* 1: Target <OBJECT>
*
* Return Value:
* Can Unload <BOOL>
*
* Example:
* [player, bob] call ace_medical_treatment_fnc_canUnloadUnit
*
* Public: No
*/
if !(GETEGVAR(medical,enabled,false)) exitWith {false};
params ["_unloader", "_target"];
!isNull objectParent _target &&
{!(lifeState _target in ["HEALTHY", "INJURED"])}