ACE3/addons/rearm/functions/fnc_setSupplyCount.sqf

24 lines
434 B
Plaintext
Raw Normal View History

2016-02-27 19:31:07 +00:00
/*
* Author: GitHawk
* Sets the supply count.
*
* Argument:
2016-02-27 20:05:19 +00:00
* 0: Ammo Truck <OBJECT>
2016-02-27 19:31:07 +00:00
* 1: Supply Count <NUMBER>
*
* Return value:
* None
*
* Example:
* [ammo_truck, 1000] call ace_rearm_fnc_setSupplyCount
*
* Public: Yes
*/
#include "script_component.hpp"
2016-02-27 20:05:19 +00:00
params [["_truck", objNull, [objNull]], ["_supply", 0, [0]]];
2016-02-27 19:31:07 +00:00
2016-02-27 20:05:19 +00:00
if (isNull _truck) exitWith {};
2016-02-27 19:31:07 +00:00
2016-02-27 20:05:19 +00:00
_truck setVariable [QGVAR(currentSupply), (_supply max 0), true];