ACE3/addons/common/functions/fnc_getDoorTurrets.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

36 lines
712 B
Plaintext

/*
* Author: bux578
* Returns all turret indecies of door gunners.
*
* Arguments:
* 0: Vehicle <OBJECT>
*
* Return Value:
* All turret indecies of the Vehicle <ARRAY>
*
* Example:
* [car] call ace_common_fnc_getDoorTurrets
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_vehicle"];
private _turrets = allTurrets [_vehicle, true];
private _doorTurrets = [];
{
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_config = [_config, _x] call FUNC(getTurretConfigPath);
if (((getNumber (_config >> "isCopilot")) == 0) && {count getArray (_config >> "weapons") > 0}) then {
_doorTurrets pushBack _x;
};
false
} count _turrets;
_doorTurrets