fixes to qty check on purchases
This commit is contained in:
vbawol
2013-01-23 01:14:55 -06:00
parent 8700946793
commit b8c3d6a325
3 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos"]; private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos","_isOk"];
// [part_out,part_in, qty_out, qty_in,]; // [part_out,part_in, qty_out, qty_in,];
_activatingPlayer = _this select 1; _activatingPlayer = _this select 1;
@@ -21,6 +21,7 @@ if (_qty >= _qty_in) then {
_bos = 1; _bos = 1;
}; };
_isOk = false;
if(_buy_o_sell == "buy") then { if(_buy_o_sell == "buy") then {
_config = (configFile >> "cfgMagazines" >> _part_out); _config = (configFile >> "cfgMagazines" >> _part_out);
_isOk = [player,_config] call BIS_fnc_invAdd; _isOk = [player,_config] call BIS_fnc_invAdd;

View File

@@ -16,6 +16,7 @@ _qty = {_x == _part_in} count magazines player;
if (_qty >= _qty_in) then { if (_qty >= _qty_in) then {
_isOk = false;
if(_buy_o_sell == "buy") then { if(_buy_o_sell == "buy") then {
_config = (configFile >> "cfgMagazines" >> _part_out); _config = (configFile >> "cfgMagazines" >> _part_out);
_isOk = [player,_config] call BIS_fnc_invAdd; _isOk = [player,_config] call BIS_fnc_invAdd;

View File

@@ -1,4 +1,4 @@
private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos"]; private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_isOk"];
// [part_out,part_in, qty_out, qty_in,"buy"]; // [part_out,part_in, qty_out, qty_in,"buy"];
_activatingPlayer = _this select 1; _activatingPlayer = _this select 1;
@@ -23,7 +23,7 @@ if(_buy_o_sell == "buy") then {
if (_qty >= _qty_in) then { if (_qty >= _qty_in) then {
_isOk = false;
if(_buy_o_sell == "buy") then { if(_buy_o_sell == "buy") then {
_config = (configFile >> "cfgWeapons" >> _part_out); _config = (configFile >> "cfgWeapons" >> _part_out);
_isOk = [player,_config] call BIS_fnc_invAdd; _isOk = [player,_config] call BIS_fnc_invAdd;