2015-03-20 03:53:58 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2015-03-20 03:53:58 +00:00
|
|
|
* Create one action per passenger
|
|
|
|
*
|
2015-05-09 02:47:15 +00:00
|
|
|
* Arguments:
|
2015-03-20 03:53:58 +00:00
|
|
|
* 0: Vehicle <OBJECT>
|
|
|
|
* 1: Player <OBJECT>
|
|
|
|
* 3: Parameters <ARRAY>
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* Children actions <ARRAY>
|
|
|
|
*
|
2015-05-09 02:47:15 +00:00
|
|
|
* Example:
|
2015-05-14 18:00:56 +00:00
|
|
|
* [target, player, [params]] call ace_interaction_fnc_addPassengersActions
|
2015-05-09 02:47:15 +00:00
|
|
|
*
|
2015-03-20 03:53:58 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
EXPLODE_3_PVT(_this,_vehicle,_player,_parameters);
|
|
|
|
|
|
|
|
private ["_actions"];
|
|
|
|
_actions = [];
|
|
|
|
|
|
|
|
{
|
2015-05-01 23:12:24 +00:00
|
|
|
private ["_unit"];
|
2015-03-20 03:53:58 +00:00
|
|
|
_unit = _x;
|
2015-05-17 22:52:56 +00:00
|
|
|
if ((_unit != _player) && {(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"}) then {
|
2015-03-20 03:53:58 +00:00
|
|
|
_actions pushBack
|
|
|
|
[
|
|
|
|
[
|
|
|
|
str(_unit),
|
|
|
|
[_unit, true] call EFUNC(common,getName),
|
|
|
|
"",
|
2015-03-21 18:32:32 +00:00
|
|
|
{},
|
2015-03-20 03:53:58 +00:00
|
|
|
{true},
|
|
|
|
{_this call FUNC(addPassengerActions);},
|
|
|
|
[_unit]
|
|
|
|
] call EFUNC(interact_menu,createAction),
|
|
|
|
[],
|
|
|
|
_unit
|
|
|
|
];
|
|
|
|
};
|
|
|
|
} forEach crew _vehicle;
|
|
|
|
|
2015-05-09 02:47:15 +00:00
|
|
|
_actions
|