mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
23 lines
417 B
Plaintext
23 lines
417 B
Plaintext
/*
|
|
* Author: Glowbal
|
|
* Get the cargo size of an object
|
|
*
|
|
* Arguments:
|
|
* 0: Object <OBJECT>
|
|
*
|
|
* Return value:
|
|
* Cargo size. <NUMBER> (default: -1)
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
private "_config";
|
|
params ["_item"];
|
|
_config = (configFile >> "CfgVehicles" >> typeof _item >> QGVAR(size));
|
|
if (isNumber (_config)) exitwith {
|
|
_item getvariable [QGVAR(size), getNumber (_config)];
|
|
};
|
|
-1
|