mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
28 lines
554 B
Plaintext
28 lines
554 B
Plaintext
/*
|
|
* Author: GitHawk
|
|
* Get the supply count.
|
|
*
|
|
* Argument:
|
|
* 0: Ammo Truck <OBJECT>
|
|
*
|
|
* Return value:
|
|
* Supply count <NUMBER>
|
|
*
|
|
* Example:
|
|
* [ammo_truck] call ace_rearm_fnc_getSupplyCount
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params [["_truck", objNull, [objNull]]];
|
|
|
|
private _supply = _truck getVariable QGVAR(currentSupply);
|
|
|
|
if (isNil "_supply") then {
|
|
_supply = getNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply));
|
|
_truck setVariable [QGVAR(currentSupply), _supply, true];
|
|
};
|
|
|
|
_supply
|