1.0.2.39 dev

This commit is contained in:
[VB]AWOL
2013-10-01 17:57:08 -05:00
parent fc6a0144fd
commit 276d06b2ab
14 changed files with 115 additions and 53 deletions

View File

@@ -16,6 +16,22 @@ switch (_iClass) do
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iClass)) select 0);
_index = dayz_CLBase find _iClass;
_weights = dayz_CLChances select _index;
_cntWeights = count _weights;
_index = floor(random _cntWeights);
_index = _weights select _index;
_canType = _itemTypes select _index;
_item addMagazineCargoGlobal [_canType,1];
};
case "single":
{
//Item is sigle, add 1 item from cfgloot
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_itemTypes = [] + ((getArray (configFile >> "cfgLoot" >> _iItem)) select 0);
_index = dayz_CLBase find _iItem;
_weights = dayz_CLChances select _index;
_cntWeights = count _weights;