ACE3/addons/refuel/functions/fnc_setFuel.sqf

25 lines
444 B
Plaintext
Raw Normal View History

2015-08-13 17:33:55 +00:00
/*
* Author: GitHawk
2015-08-20 20:10:26 +00:00
* Set the remaining fuel amount.
2015-08-13 17:33:55 +00:00
*
* Arguments:
2015-08-21 20:43:45 +00:00
* 0: Fuel Truck <OBJECT>
* 1: Amount (in liters)<NUMBER>
2015-08-13 17:33:55 +00:00
*
* Return Value:
2015-08-14 01:18:54 +00:00
* None
2015-08-13 17:33:55 +00:00
*
* Example:
2015-08-21 20:43:45 +00:00
* [fuelTruck, 42] call ace_refuel_fnc_setFuel
2015-08-13 17:33:55 +00:00
*
2015-08-14 01:18:54 +00:00
* Public: No
2015-08-13 17:33:55 +00:00
*/
#include "script_component.hpp"
2015-08-14 01:18:54 +00:00
private ["_maxFuel"];
2015-08-21 20:43:45 +00:00
params ["_target", "_fuel"];
2015-08-13 17:33:55 +00:00
2015-08-21 20:43:45 +00:00
if (isNull _target ||
{isNil "_fuel"}) exitWith {};
2015-08-13 17:33:55 +00:00
2015-08-21 20:43:45 +00:00
_target setVariable [QGVAR(currentFuelCargo), _fuel, true];