ACE3/addons/disarming/functions/fnc_startDisarmTarget.sqf

43 lines
865 B
Plaintext
Raw Normal View History

2015-02-11 01:55:53 +00:00
/*
* 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:
2015-02-11 08:33:18 +00:00
*
2015-02-11 01:55:53 +00:00
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_3(_caller,_target,_type);
_listOfItemsToRemove = [];
_doNotDropAmmo = false;
switch (toLower _type) do {
case ("backpack"): {
2015-02-11 08:33:18 +00:00
_listOfItemsToRemove pushBack (backpack _target);
};
2015-02-11 01:55:53 +00:00
case ("weapons"): {
2015-02-11 08:33:18 +00:00
_listOfItemsToRemove = _listOfItemsToRemove + (weapons _target);
_doNotDropAmmo = true;
};
case ("uniform"): {
_listOfItemsToRemove = [(uniform _target)];
};
2015-02-11 01:55:53 +00:00
};
[_caller, _target, _listOfItemsToRemove, _doNotDropAmmo] call FUNC(disarmDropItems);