BetterDeadThanZed Posted November 11, 2014 Report Share Posted November 11, 2014 I'm creating some custom missions. I've turned on vehicle saving in the database. Sometimes the vehicles at the missions despawn. This is the error I'm getting in my log: 14:57:03 "Deleting object MtvrRefuel_DES_EP1_DZ with invalid ID at pos [12985.5,10095.8,0]" What causes this? Link to comment Share on other sites More sharing options...
Defent Posted November 11, 2014 Report Share Posted November 11, 2014 It's caused by this inside server_updateObject.sqf if (_isNotOk) exitWith { deleteVehicle _object; diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",typeOf _object,_object_position select 0,_object_position select 1, _object_position select 2]); }; I have it commented out with // just because it keeps deleting stuff that does not have an invalid id. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted November 11, 2014 Author Report Share Posted November 11, 2014 Will commenting that out have any adverse effects on anything else? Link to comment Share on other sites More sharing options...
Defent Posted November 11, 2014 Report Share Posted November 11, 2014 Not really. I have noticed zero problems. I suppose it's there to stop vehicles that are hacked in or spawned in in the wrong way but that doesn't really matter for me since I use infistar vehicle whitelist. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted November 11, 2014 Author Report Share Posted November 11, 2014 Ok, when I comment that out, the vehicle doesn't despawn, but if I get in, I die and the vehicle explodes. Here's the log: 18:09:59 "Vehicle killed: Vehicle 1aec3040# 1062085: hmmwv.p3d REMOTE (TYPE: HMMWV_DZ), CharacterID: 0, ObjectID: 0, ObjectUID: 0, Position: [12997.9,10074.7,0.144448]" 18:09:59 "PDEATH: Player Died 76561197975079952" Link to comment Share on other sites More sharing options...
Defent Posted November 11, 2014 Report Share Posted November 11, 2014 Does it say "CLEANUP: Killing a hacker" in your logs anywhere? If so, check for if (!((isNil "_x") || {(isNull _x)})) then { if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x) && !((typeOf vehicle _x) in DZE_safeVehicle)) then { //diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x)); //(vehicle _x) setDamage 1; //_x setDamage 1; //sleep 0.25; }; }; in server_functions.sqf and comment out what I have commented out. Link to comment Share on other sites More sharing options...
CordIAsis Posted November 11, 2014 Report Share Posted November 11, 2014 It seems to me like you could fix your issue by assigning the vehicle an ObjectID and ObjectUID value that is greater than 0 then adding them to the PVDZE_serverObjectMonitor array. myvehicle setVariable ["ObjectID",str(ceil(random 99999)),true]; myvehicle setVariable ["ObjectUID",str(ceil(random 99999)),true]; PVDZE_serverObjectMonitor set [(count PVDZE_serverObjectMonitor),myvehicle]; This should allow you avoid removing things that are designed to stop hackers. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted November 11, 2014 Author Report Share Posted November 11, 2014 It makes no sense that I'd have to edit these things since the mission vehicles worked fine in the default missions that come with DZMS. I'm not spawning in any weird or unusual vehicles. Link to comment Share on other sites More sharing options...
Defent Posted November 11, 2014 Report Share Posted November 11, 2014 Well I suppose it's all to stop hackers and is a remnant from the DayZ vanilla mod days. Altough I'm not sure :) Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted November 11, 2014 Author Report Share Posted November 11, 2014 Well I suppose it's all to stop hackers and is a remnant from the DayZ vanilla mod days. Altough I'm not sure :) Well, there's no "Killing a hacker" in the log. Only the previously mentioned "Vehicle Killed", etc. I haven't done many missions lately but I know I've never had this problem in the past. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted November 11, 2014 Author Report Share Posted November 11, 2014 Could the fact that I'm specifying coordinates, rather than making it random, cause a problem? Here's where I'm creating the vehicles: _veh1 = ["small"] call DZMSGetVeh; _vehicle = createVehicle [_veh1,[12997.872, 10074.729, -2.1457672e-005],[], 0, "CAN_COLLIDE"]; _vehicle setDir 6.8135815; _veh2 = ["fuel"] call DZMSGetVeh; _vehicle2 = createVehicle [_veh2,[12985.497, 10095.752, 3.3378601e-006],[], 0, "CAN_COLLIDE"]; _vehicle2 setDir 110.71783; _vehicle2 setFuel 0; I created a "fuel" category for vehicles that has all of the fuel trucks in it so it randomly picks one to spawn. Link to comment Share on other sites More sharing options...
BetterDeadThanZed Posted November 11, 2014 Author Report Share Posted November 11, 2014 Ok, I'm an idiot. :) I based this mission off of a mission without vehicles so I was missing this section: //DZMSSetupVehicle prevents the vehicle from disappearing and sets fuel and such [_vehicle] call DZMSSetupVehicle; [_vehicle2] call DZMSSetupVehicle; Add that and it now works fine. TheVampire 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now