ACE3/addons/common/functions/fnc_getVehicleCargo.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

32 lines
739 B
Plaintext

/*
* Author: commy2
* Get the vehicle cargo positions. Codrivers and ffv positions are not listed.
*
* Arguments:
* 0: Vehicle type <STRING>
*
* Return Value:
* Vehicle cargo positions <ARRAY>
*
* Example:
* [car] call ace_common_fnc_getVehicleCargo
*
* Public: Yes
*/
#include "script_component.hpp"
params [["_vehicle", objNull, [objNull]]];
private _config = configFile >> "CfgVehicles" >> _vehicle;
private _cargo = [];
private _codrivers = getArray (_config >> "cargoIsCoDriver");
for "_index" from 0 to (getNumber (_config >> "transportSoldier") - 1) do {
if !(_index in _codrivers && {_vehicle isKindOf "Car"} && {!(_vehicle isKindOf "Wheeled_APC_F")}) then {
_cargo pushBack _index;
};
};
_cargo