3d vehicles disapear

zcrown

New Member
Hello people, I have been trying to make the cars not dissapear when getting on them after 20 secs I managed to make them not explode, I tried doing what Hospital chair did and couldn't manage to do it I'm aware u can make then a mission but the problem is idk were to add the vehicles.sqf but I can do the other parts from server_clean.sqf and the monitor. Sqf as well can anyone help me solve this o would gladly appricate it
 
You added the getvariable( sarge) in the server cleanup? Follow the directions from sarge AI.

Then wherever your vehicle is actually created, add the setvariable(sarge ) for that instance. So right after the creatvehicle line put in the setvariable(sarge).

I will put up a detailed howto when I get home. To clarify what is needed I will create a vehicle in the 3d editor and add that into my DayZ server without getting deleted.... is this correct?
 
You might want to add the object to the list of server objects. The cleanup scripts goes through and deletes vehicles that are not in this list since those are the ones spawned by clients ( aka hackers).
Here is the entire bit of code I use in my server scripts to spawn in vehicles. For Epoch and OverPochCrap, replace the dayz_serverObjectMonitor with PVDZE_serverObjectMonitor
Code:
if (true) then
{
_this = createVehicle ["MV22_DZ", [4453.7368, 10812.178], [], 0, "CAN_COLLIDE"];
_this setDir -27.19553;
_this setPos [4453.7368, 10812.178];
_this setVariable ["ObjectID", [getdir _this,getPos _this] call dayz_objectUID2, true];
_this setVariable ["Sarge",1,true];
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor ,_this];
[_this,"MV22_DZ"] spawn server_updateObject;
};
repeat code block for each vehicle.
Change the classname on the last line to match the classname of the vehicle you created on the first line
 
Back
Top