2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2022-08-29 00:24:24 +00:00
|
|
|
/*
|
|
|
|
* Author: Dystopian
|
|
|
|
* Adds rope to vehicle inventory.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Vehicle <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* cursorObject call ace_towing_fnc_addRopeToVehicle
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (!GVAR(addRopeToVehicleInventory)) exitWith {};
|
|
|
|
params ["_vehicle"];
|
|
|
|
|
|
|
|
if (0 == getNumber (configOf _vehicle >> QEGVAR(cargo,hasCargo))) exitWith {};
|
|
|
|
|
2024-02-04 17:50:24 +00:00
|
|
|
private _ropeType = ["ACE_rope6", "ACE_rope12"] select (
|
2022-08-29 00:24:24 +00:00
|
|
|
-1 < ["Tank", "Wheeled_APC_F", "Truck_F"] findIf {_vehicle isKindOf _x}
|
2024-02-04 17:50:24 +00:00
|
|
|
);
|
2022-08-29 00:24:24 +00:00
|
|
|
|
|
|
|
_vehicle addItemCargoGlobal [_ropeType, 1];
|