Flosstradamus
New Member
Basically the title is what explains my situation. After patching to 1.0.4 I am not able to sell any vehicles from a mission to the trader.
Any idea's?
Any idea's?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
_notSetup = (_objectID == "0" && _objectUID == "0");
if(local _obj and !isNull _obj and alive _obj and !_notSetup) then {
...
};
} else {
cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"];
};
if (_afile=="trade_any_vehicle") then {
_File = "fixes\" + _afile + ".sqf";
} else {
_File = "\z\addons\dayz_code\actions\" + _afile + ".sqf";
};
if(local _obj and !isNull _obj and alive _obj) then {
if(_okToSell) then {
if(_objectID != "0" && _objectUID != "0") then {
PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer];
publicVariableServer "PVDZE_obj_Delete";
};
deleteVehicle _obj;
// payout
_canAfford = [[[_part_out,_qty_out]],1] call epoch_returnChange;
cutText [format[(localize "str_epoch_player_181"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
} else {
cutText [format[(localize "str_epoch_player_182"),_textPartIn] , "PLAIN DOWN"];
};
} else {
cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"];
};
if (!isDedicated) then {
// trader menu code fix
call compile preprocessFileLineNumbers "fixes\player_traderMenu.sqf";
};
^Easier way is to just set a random object UID and ID on the vehicle like this:
Code:_object = "Old_bike_TK_INS_EP1" createVehicle (position player); _uniqueid = str(round(random 999999)); _object setVariable ["ObjectID", _uniqueid, true]; _object setVariable ["ObjectUID", _uniqueid, true];
This also prevents it from being deleted by server_updateObject.sqf, but does not make it save after restart.