mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
5e103ba398
Added code for nozzle object Params and private update
28 lines
565 B
Plaintext
28 lines
565 B
Plaintext
/*
|
|
* Author: GitHawk, Jonpas
|
|
* Get the remaining fuel amount.
|
|
*
|
|
* Arguments:
|
|
* 0: Target <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Fuel left (in liters) <NUMBER>
|
|
*
|
|
* Example:
|
|
* [fuelTruck] call ace_refuel_fnc_getFuel
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params [["_target", objNull, [objNull]]];
|
|
|
|
private _fuel = _target getVariable QGVAR(currentFuelCargo);
|
|
|
|
if (isNil "_fuel") then {
|
|
_fuel = getNumber (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(fuelCargo));
|
|
_target setVariable [QGVAR(currentFuelCargo), _fuel, true];
|
|
};
|
|
|
|
_fuel
|