mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
28 lines
606 B
Plaintext
28 lines
606 B
Plaintext
|
/*
|
||
|
Name: AGM_Explosives_fnc_DefuseExplosive
|
||
|
|
||
|
Author: Garth de Wet (LH)
|
||
|
|
||
|
Description:
|
||
|
Defuses an Explosive
|
||
|
|
||
|
Parameters:
|
||
|
0: OBJECT - unit
|
||
|
1: OBJECT - Explosive
|
||
|
|
||
|
Returns:
|
||
|
Nothing
|
||
|
|
||
|
Example:
|
||
|
[player, AGM_Interaction_Target] call AGM_Explosives_fnc_DefuseExplosive;
|
||
|
*/
|
||
|
private ["_unit", "_explosive"];
|
||
|
_unit = _this select 0;
|
||
|
_explosive = _this select 1;
|
||
|
|
||
|
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof _explosive >> "AGM_explodeOnDefuse") == 1) exitWith {
|
||
|
[_unit, -1, [_explosive, 1], true] call AGM_Explosives_fnc_DetonateExplosive;
|
||
|
};
|
||
|
|
||
|
_unit action ["Deactivate", _unit, _explosive];
|