Vehicles despawning and respawning @ original location

Hurtz

New Member
Here's my problem
Using pwnzors 1.7.4.4 files
I have the server up for two weeks and perform regular shutdowns and backups.
Tonight I do a shutdown, backup and restart and most of the vehicles that players had are gone.
I restore to latest backup and load up the DB only.
Check object_data and it looks good, all vehicles are where they should be and I have 30 or so vehicles with loot in them.
I Load up the server and pmain executes and it removes most of the vehicles and spawns them in original location. Only 10 objects stayed and the rest respawned at original locaiton

So whats going on here? Seems there is a problem with the cleanup funtions but IDK. I've seen tents disappear but couldn't confirm if this was a db problem or a dayz problem. I'm pretty sure I have all the latest dll's and funtions. Help please
 
Find this part in pCleanup

Code:
    DELETE
        FROM object_data
        WHERE DATE(Datestamp) < CURDATE() - INTERVAL 12 DAY
            AND Classname != 'dummy'
            AND Classname != 'TentStorage'
            AND Classname != 'Hedgehog_DZ'
            AND Classname != 'Wire_cat1'
            AND Classname != 'Sandbag1_DZ'
            AND Classname != 'TrapBear';

And check what your interval is.
 
Here's my pcleanup, this shouldn't delete vehicles unless damage is = 1 thought should it

Code:
BEGIN
 
    CALL pCleanupOOB();
 
    DELETE
        FROM object_data
        WHERE Damage = '1'; 
 
    DELETE
        FROM object_data
        WHERE DATE(Datestamp) < CURDATE() - INTERVAL 8 DAY
            AND Classname != 'dummy'
            AND Classname != 'TentStorage'
            AND Classname != 'Hedgehog_DZ'
            AND Classname != 'Wire_cat1'
            AND Classname != 'Sandbag1_DZ'
            AND Classname != 'TrapBear';
 
    DELETE
        FROM object_data
        USING object_data, character_data
        WHERE object_data.Classname = 'TentStorage'
            AND object_data.CharacterID = character_data.CharacterID
            AND character_data.Alive = 0
            AND DATE(character_data.Datestamp) < CURDATE() - INTERVAL 4 DAY;
 
    DELETE
        FROM object_data
        WHERE Classname = 'TentStorage'
            AND DATE(Datestamp) < CURDATE() - INTERVAL 8 DAY
            AND Inventory = '[[[],[]],[[],[]],[[],[]]]';         
 
    DELETE
        FROM object_data
        WHERE Classname = 'TentStorage'
            AND DATE(Datestamp) < CURDATE() - INTERVAL 8 DAY
            AND Inventory = '[]';     
 
    DELETE
        FROM object_data
        WHERE Classname = 'Wire_cat1'
            AND DATE(Datestamp) < CURDATE() - INTERVAL 3 DAY;
 
    DELETE
        FROM object_data
        WHERE Classname = 'Hedgehog_DZ'
            AND DATE(Datestamp) < CURDATE() - INTERVAL 4 DAY;
 
    DELETE
        FROM object_data
        WHERE Classname = 'Sandbag1_DZ'
            AND DATE(Datestamp) < CURDATE() - INTERVAL 8 DAY;
 
    DELETE
        FROM object_data
        WHERE Classname = 'TrapBear'
            AND DATE(Datestamp) < CURDATE() - INTERVAL 5 DAY;
 
END
 
That pCleanup looks fine to me. Are your vehicles being entered into the database with a recent datestamp?
 
I'm not in front of it right now but I'm thinking that that date stamp shouldn't matter on vehicles should it? If damage=1 delete else do nothing. I'll have a look at the date stamps anyway when I get home to be sure.
 
I'm not in front of it right now but I'm thinking that that date stamp shouldn't matter on vehicles should it? If damage=1 delete else do nothing. I'll have a look at the date stamps anyway when I get home to be sure.

The -8 days is from the last datestamp, just a thought on what may be causing your strange despawns
 
I have had the same problem where the cleanup script is not "cleaning" the vehicles because they remain in the db, but some of them just don't spawn on restart. I spawned 20 different types of vehicles in a straight line and after restart, only 15 appeared. Strange....
 
Hmm that's an entirely different issue there. Check the vehicles you are trying to spawn are not banned in DayZ. Any vehicles banned in DayZ will not spawn - you can see which vehicles are allowed by clicking on [How-To] Spawn and test all non-banned vehicles in my signature. Only the vehicles in the selection are allowed
 
Yeah thanks Doc. The vehicles are unbanned ones and do actually spawn, but sometimes after restart theï½™ don't spawn in but are in the database. I haven't messed with it recently because I've been busy with other builds, but I thought I would just add that because it may help.
 
The vehicles already spawned at least once, after a reboot they were still in the objects table and then when pMain execuites and runs the other funtions they respawn to original location . It was working all along and all of a sudden everyone loses their vehicles with no damage and loot. The tents are another issue but only happened a few times. I restored to a couple different backups and i run mysql.bat to load the db. I check the objects table and the vehicles are in the right location where players moved them and have inventory. I run pmain and they get wiped out with original spawns and they didn't have 100 percent damage.
 
Something is wrong with your pMain/pCleanup then i guess. Try using my pSpawnVehicles (see link in my signature - [How-To] Improved vehicle spawn function)
 
Another thought. Are you changing your system time to change the in-game time at all? That would interfere with the pCleanup time.
 
Back
Top