fixes to bicycle trades

This commit is contained in:
[VB]AWOL
2013-10-08 01:13:53 -05:00
parent 597f941db0
commit be46e52327
2 changed files with 14 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
private ["_veh","_location","_isOk","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID"];
private ["_veh","_location","_isOk","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_keyColor","_keyNumber","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID"];
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
@@ -111,14 +111,12 @@ if (_qty >= _qty_in) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected];
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,dayz_characterID];
publicVariableServer "PVDZE_veh_Publish2";
player reveal _veh;
cutText [format[("Bought %3 for %1 %2."),_qty_in,_textPartIn,_textPartOut], "PLAIN DOWN"];
} else {
player removeMagazine _keySelected;
};
} else {

View File

@@ -3,13 +3,22 @@ private ["_isOK","_object","_worldspace","_location","_dir","_class","_uid","_ke
_object = _this select 0;
_worldspace = _this select 1;
_class = _this select 2;
// _spawnDMG = _this select 3;
_donotusekey = _this select 3;
_keySelected = _this select 4;
_isOK = isClass(configFile >> "CfgWeapons" >> _keySelected);
if(_donotusekey) then {
_isOK = true;
} else {
_isOK = isClass(configFile >> "CfgWeapons" >> _keySelected);
};
if(!_isOK) exitWith { diag_log ("HIVE: CARKEY DOES NOT EXIST: "+ str(_keySelected)); };
_characterID = str(getNumber(configFile >> "CfgWeapons" >> _keySelected >> "keyid"));
if(_donotusekey) then {
_characterID = _keySelected;
} else {
_characterID = str(getNumber(configFile >> "CfgWeapons" >> _keySelected >> "keyid"));
};
diag_log ("PUBLISH: Attempt " + str(_object));
_dir = _worldspace select 0;