Skip to content

Commit

Permalink
params in action argument
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 committed Mar 4, 2016
1 parent 8a4d6c2 commit 7b0c174
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions addons/common/fnc_actionArgument.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,19 @@ Returns:
Examples:
(begin example)
captive addaction ["rescue",CBA_fnc_actionargument_path,[[],{[_target] join (group _caller)},true]] //captive joins action callers group, action is removed (true)
captive addaction ["rescue",CBA_fnc_actionargument_path,[[],{[_target] join (group _caller)},true]] //captive joins action callers group, action is removed (true)
(end)
Author:
Rommel
---------------------------------------------------------------------------- */
#include "script_component.hpp"
SCRIPT(actionArgument);

private ["_target","_caller","_id","_arguments"];
_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_arguments = _this select 3;
params ["_target", "_caller", "_id", "_arguments"];

(_arguments select 0) call (_arguments select 1);

if (count _arguments > 2 && {_arguments select 2}) then {
if (_arguments param [2, false]) then {
_target removeAction _id;
};
};

0 comments on commit 7b0c174

Please sign in to comment.