ACE3/addons/disarming/functions/fnc_startDisarmTarget.sqf
2015-02-10 19:55:53 -06:00

39 lines
758 B
Plaintext

/*
* Author: PabstMirror
* Starts disarming the target from the target
* Generates the specific list of items that should be removed from a disarm type
*
* Arguments:
* 0: caller (player) <OBJECT>
* 1: target <OBJECT>
* 1: type of disarm <STRING>
*
* Return Value:
* None
*
* Example:
*
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_3(_caller,_target,_type);
_listOfItemsToRemove = [];
_doNotDropAmmo = false;
switch (toLower _type) do {
case ("backpack"): {
_listOfItemsToRemove pushBack (backpack _target);
};
case ("weapons"): {
_listOfItemsToRemove = _listOfItemsToRemove + (weapons _target);
_doNotDropAmmo = true;
};
};
[_caller, _target, _listOfItemsToRemove, _doNotDropAmmo] call FUNC(disarmDropItems);