Done is Done, make the rest of it to a localSetVariable

This commit is contained in:
Skaronator
2014-02-02 20:15:34 +01:00
parent da7635b2ee
commit bc21f81f03
3 changed files with 26 additions and 16 deletions

View File

@@ -914,4 +914,25 @@ server_getLocalObjVars = {
PVDZE_localVarsResult = _vals;
(owner _player) publicVariableClient "PVDZE_localVarsResult";
};
server_setLocalObjVars = {
private ["_obj", "_holder", "_weapons", "_magazines", "_backpacks"];
_obj = _this select 0;
_holder = _this select 1;
_weapons = getWeaponCargo _obj;
_magazines = getMagazineCargo _obj;
_backpacks = getBackpackCargo _obj;
if (count _weapons > 0) then {
_holder setVariable ["WeaponCargo", _weapons];
};
if (count _magazines > 0) then {
_holder setVariable ["MagazineCargo", _magazines];
};
if (count _backpacks > 0) then {
_holder setVariable ["BackpackCargo", _backpacks];
};
};