Disarm Types Examples

This commit is contained in:
PabstMirror 2015-02-11 02:33:18 -06:00
parent 13c9db75a7
commit a7004cf0e9
3 changed files with 22 additions and 18 deletions

View File

@ -1,10 +1,7 @@
ace_captives
ace_disarming
============
Allows taking people captive/handcuffed
####Items:
`ACE_CableTie` - adds ability to take someone captive
Adds ability to make units drop items/weapons/magazines.
## Maintainers

View File

@ -11,7 +11,7 @@
* The return value <BOOL>
*
* Example:
* TODO
* [player, cursorTarget, "backpack"] call ace_disarming_fnc_canDisarm
*
* Public: No
*/
@ -20,13 +20,16 @@
PARAMS_2(_caller,_target);
DEFAULT_PARAM(2,_type,"");
if (false) exitWith {false};
_returnValue = true;
switch (_type) do {
_returnValue = false;
if ((_target getVariable ["ACE_isUnconscious", false]) || {_target getVariable [QEGVAR(captives,isHandcuffed), false]} || {_target getVariable [QEGVAR(captives,isSurrendering), false]}) then {
switch (_type) do {
case (""): {_returnValue = true;};
case ("uniform"): {_returnValue = ((uniform _target) != "");};
case ("backpack"): {_returnValue = ((backpack _target) != "");};
case ("weapons"): {_returnValue = ((count (weapons _target)) > 0);};
default {systemChat "type unknown"; ERROR("type unknown");};
};
};
_returnValue

View File

@ -12,7 +12,7 @@
* None
*
* Example:
*
*
*
* Public: No
*/
@ -25,12 +25,16 @@ _doNotDropAmmo = false;
switch (toLower _type) do {
case ("backpack"): {
_listOfItemsToRemove pushBack (backpack _target);
};
_listOfItemsToRemove pushBack (backpack _target);
};
case ("weapons"): {
_listOfItemsToRemove = _listOfItemsToRemove + (weapons _target);
_doNotDropAmmo = true;
};
_listOfItemsToRemove = _listOfItemsToRemove + (weapons _target);
_doNotDropAmmo = true;
};
case ("uniform"): {
_listOfItemsToRemove = [(uniform _target)];
};
};