initial commit
This commit is contained in:
28
functions/Arsenal/fn_addFullArsenal.sqf
Normal file
28
functions/Arsenal/fn_addFullArsenal.sqf
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Author: Djeeberjr
|
||||
|
||||
Description:
|
||||
Enables a full Arsenal on a object
|
||||
|
||||
Effect: local
|
||||
|
||||
Parameter(s):
|
||||
0: OBJECT - the object of the arsenal
|
||||
*/
|
||||
params ["_obj"];
|
||||
|
||||
//Check if the is already an arsenal on it
|
||||
if( isNull (_obj getVariable ["DLib_arsenal",objNull]))then{
|
||||
|
||||
_bisArsenal = _obj addAction ["BIS Arsenal",{
|
||||
[ "Open", [ true ] ] call BIS_fnc_arsenal;
|
||||
},[],1.5,true,true,"","true",5];
|
||||
|
||||
_obj setvariable ["DLib_arsenal",_bisArsenal];
|
||||
|
||||
if (isClass(configFile >> "CfgPatches" >> "ace_main")) then {
|
||||
[_obj, true] call ace_arsenal_fnc_initBox;
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
27
functions/Arsenal/fn_removeFullArsenal.sqf
Normal file
27
functions/Arsenal/fn_removeFullArsenal.sqf
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
Author: Djeeberjr
|
||||
|
||||
Description:
|
||||
Disables a full Arsenal on a object
|
||||
|
||||
Effect: local
|
||||
|
||||
Parameter(s):
|
||||
0: OBJECT - the object of the arsenal
|
||||
*/
|
||||
|
||||
params ["_obj"];
|
||||
|
||||
//Check if the arsenal is already removes
|
||||
if(typeName (_obj getVariable ["DLib_arsenal",objNull]) == "SCALAR")then{
|
||||
|
||||
_obj removeAction (_obj getVariable "DLib_arsenal");
|
||||
|
||||
if (isClass(configFile >> "CfgPatches" >> "ace_main")) then {
|
||||
[_obj, true] call ace_arsenal_fnc_removeBox;
|
||||
};
|
||||
|
||||
// Remove arsenal actionId
|
||||
_obj setVariable ["DLib_arsenal",objNull];
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user