mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Disarm Types Examples
This commit is contained in:
parent
13c9db75a7
commit
a7004cf0e9
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)];
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user