2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
*
|
|
|
|
* Check if the given backpack is an actual backpack that can store items. Parachute backpacks will return false for example.
|
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: A backpack (Object or String)
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* Boolean (Bool)
|
|
|
|
*/
|
2015-01-18 06:56:09 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
private ["_backpack", "_config"];
|
|
|
|
|
|
|
|
_backpack = _this select 0;
|
|
|
|
|
|
|
|
if (typeName _backpack == "OBJECT") then {
|
2015-01-18 06:56:09 +00:00
|
|
|
_backpack = typeOf _backpack;
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_config = configFile >> "CfgVehicles" >> _backpack;
|
|
|
|
|
|
|
|
getText (_config >> "vehicleClass") == "backpacks" && {getNumber (_config >> "maximumLoad") > 0}
|