Deleting and respawning specific vehicles at each restart

Althasil

Well-Known Member
Hi,

I would like to be able to reset certain vehicle types - boats, bicycles and planes - at each restart. Not to simply delete them, but to also respawn them. Is this possible? If so could someone advise me on how I should do this, or perhaps point me in the right direction?

Thanks.
 
Might be possible with a database trigger? Delete an array of vehicle ID's before each restart?

I'd be pissed if I was one of your players inside a boat/plane and you respawned it :D
 
as part of my vehicle reset .bat I have a SQL script that
resets some buses, bikes, and a "storage ural" (at a trading post area) to their spawn locations, with fully fixed parts and 0 damage.

just have this run before you relaunch the server
 
batch:
Code:
set path_sql=C:\MySQL\bin
set path_sql_query=C:\foo
set db_host=127.0.0.1
set db_port=3306
set db_name=
set db_user=
set db_pass=
 
:mysql
echo executing sql queries...
cd /d %path_sql%
 
echo remove foo
@mysql.exe -u %db_user% -p%db_pass% -D%db_name% < %path_sql_query%\foo.txt
 
:respawn
echo respawning vehicles
cd /d %path_sql_query%
@perl spawn.pl

https://github.com/thevisad/DayZ-Private-master/blob/master/db_spawn_vehicles.pl

foo.txt:
Code:
DELETE FROM instance_vehicle WHERE world_vehicle_id IN (SELECT id FROM world_vehicle WHERE vehicle_id = 25);
25 = pbx (just look at your vehicle table)
 
Back
Top