Partial revert
9b96ddd2c3
Thanks @ndavalos
This commit is contained in:
oiad
2017-12-19 19:10:36 +13:00
parent efaf1f9399
commit 1941832b3b

View File

@@ -1,4 +1,4 @@
private ["_activatingPlayer","_bTotal","_backpack","_backpacksToBuy","_buyVehicle","_buyingType","_canBuy","_count","_dir","_enoughMoney","_hasPrimary","_helipad","_isKeyOK","_item2Add","_itemsToLog","_keySelected","_location","_moneyInfo","_wealth","_parentClasses","_part_out","_pistolMagsToBuy","_priceToBuy","_primaryToBuy","_regularMagsToBuy","_sidearmToBuy","_sign","_success","_tCost","_toolAmounts","_toolClasses","_toolsToBuy","_vehiclesToBuy","_weaponsToBuy","_result"]; private ["_activatingPlayer","_bTotal","_backpack","_backpacksToBuy","_buyVehicle","_buyingType","_canBuy","_count","_dir","_enoughMoney","_hasPrimary","_helipad","_isKeyOK","_item2Add","_itemsToLog","_keySelected","_location","_moneyInfo","_wealth","_parentClasses","_part_out","_pistolMagsToBuy","_priceToBuy","_primaryToBuy","_regularMagsToBuy","_sidearmToBuy","_sign","_success","_tCost","_toolAmounts","_toolClasses","_toolsToBuy","_vehiclesToBuy","_weaponsToBuy","_keyNumber"];
if (count Z_BuyingArray < 1) exitWith { systemChat localize "STR_EPOCH_TRADE_BUY_NO_ITEMS"; }; if (count Z_BuyingArray < 1) exitWith { systemChat localize "STR_EPOCH_TRADE_BUY_NO_ITEMS"; };
@@ -123,9 +123,9 @@ if (_enoughMoney) then {
if (_buyingType in DZE_tradeVehicleKeyless) then { if (_buyingType in DZE_tradeVehicleKeyless) then {
_isKeyOK = true; _isKeyOK = true;
} else { } else {
_result = call epoch_generateKey; _keyNumber = (floor(random 2500)) + 1;
_isKeyOK = _result select 0; _keySelected = format["%1%2",DZE_itemKeys call BIS_fnc_selectRandom,_keyNumber];
_keySelected = _result select 1; _isKeyOK = isClass(configFile >> "CfgWeapons" >> _keySelected);
}; };
if (!_isKeyOK) exitWith {localize "str_epoch_player_107" call dayz_rollingMessages; "";}; if (!_isKeyOK) exitWith {localize "str_epoch_player_107" call dayz_rollingMessages; "";};
_activatingPlayer = player; _activatingPlayer = player;