Vehicle respawn script

Zeehond23

Valued Member!
Hi,

For my server I' m looking for a script that respawns all destroyed vehicles that are in the database. I' ve found a script that reverts all cars to their original position using a .sqf, but this isn' t exactly what I' m looking for, cause people won' t be able to keep a car after RS.
 
Any server files will have a spawn_vehicles.pl script included.

Just enter db username/pw and run it at restart.
 
Code:
UPDATE `object_data` SET `Damage`=0 WHERE `Damage` > 0

make an event that executes like once every 30 minutes or so and you should catch your restarst ^^ have the destroyed vehicles alive again :) (with empty cargo, cause that is gone when they get updated to damage 1)
 
Yeas I have one running every 3 hours, but that means that they get rrspawned at the same place they are destroyed right?
 
You are correct.

If you run like dayz_epoch you could go into your init.sqf from the mission and set this higher:

MaxVehicleLimit = 300;

and instead of

UPDATE `object_data` SET `Damage`=0 WHERE `Damage` > 0

use

DELETE FROM `object_data` WHERE Damage=1

your destroyed vehicles will be deleted in the limit will fill up automatically with random vehicles at random positions


if you don't run epoch, well why would you? ^^
 
Back
Top