More questions about db_spawn_vehicles.pl

RoaRk

New Member
A quick question about our vehicle spawn script..

We are currently running about 200-215 vehicles on our server. We have a total of about 15 airborne vehicles after a fresh restart, but they are quickly destroyed do to our static foggy weather.

These destroyed vehicles (damage = 1.0) are not deleting from the database or respawning as far as I can tell. I run the db_spawn_vehicles.pl.bat but it doesn't spawn any new vehicles because it's reading that the destroyed vehicles are still in the database, and they are in fact in the instance table. I'm weary of running the script with the --cleanup bounds because I don't want to delete the vehicles that people are probably hoarding out in debug (there's enough for everyone).

So, how can I reset these damaged vehicles. I feel like I'm missing something quite simple here. If I change all the Damage 1.0 values to 0 then the vehicles will be completely repaired but they will stay where they exploded and not reset to the spawn location that I gave them in the database.

Help? Thanks.
 
on line 58 change it to this:
Code:
if ($cleanup ne 'none') {
    print "INFO: Cleaning up damaged vehicles\n";
    my $sth = $dbh->prepare(<<EndSQL
update
  instance_vehicle set damage=0
where
  instance_id = ?
  and damage = 1
EndSQL
) or die "FATAL: SQL Error - " . DBI->errstr . "\n";
    $sth->execute($db{'instance'}) or die "FATAL: Could not clean up destroyed vehicles - " . $sth->errstr . "\n";

This will respawn all your vehicles that are destroyed IE damage = 1, at full health where ever they currently are, if you dont want that and want people to work for them set this line " instance_vehicle set damage=0" to this " instance_vehicle set damage=0.8" this will make them spawn where they are about to blow up but can still be repaired
 
Back
Top