From 7b0c1749b94614ffa06feecdf337e328f4ddf637 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 4 Mar 2016 01:14:02 +0100 Subject: [PATCH] params in action argument --- addons/common/fnc_actionArgument.sqf | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/addons/common/fnc_actionArgument.sqf b/addons/common/fnc_actionArgument.sqf index 8c1cc5c60..a4857a921 100644 --- a/addons/common/fnc_actionArgument.sqf +++ b/addons/common/fnc_actionArgument.sqf @@ -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; -}; \ No newline at end of file +};