1.8.1 DB events

Inkko

Valued Member!
I have dayz.st for my server provider and with the 1.8.1 update there are practically no vehicles. I don't have access to pMain to modify it so I was thinking about it today and thought about the possibility of making an event to spawn cars in. I have added several vehicles to the Object_SPAWNS table and what I had been doing was just manually spawning the vehicles I added into Object_DATA. Would it be possible to make an event that runs everyday to check if vehicle with X objectUID is damage = 1 then spawn a new vehicle at the spawn point?

Something like this?:
Code:
CREATE EVENT RespawnVehicles
ON SCHEDULE EVERY 1 DAY
COMMENT 'Respawning dead vehicles'
DO
INSERT INTO
Object_DATA (ObjectUID, Instance, Classname, Damage, CharacterID, Worldspace, Inventory, Hitpoints, Fuel, Datestamp)
SELECT ObjectUID, sInstance, Classname, RAND(@rsDamage), '0', Worldspace, Inventory, Hitpoints, RAND(1), SYSDATE()FROM object_spawnsWHERE Classname=@rsClassnameAND NOT ObjectUID IN (select objectuid fromObject_DATA where instance = sInstance)
);

Copied this outta pMain but I think portions of it need to be changed.
 
not to hijack your thread or anything, but how does the spawning in dayz 1.8.1 actually work?
Seems it doesn't delete damaged vehicles and respawn them on restart like the older versions did?

I have access to the pmain i believe, but i don't know anything about that. Would like to find a way to make the game respawn vehicles like it used to.
 
not to hijack your thread or anything, but how does the spawning in dayz 1.8.1 actually work?
Seems it doesn't delete damaged vehicles and respawn them on restart like the older versions did?

I have access to the pmain i believe, but i don't know anything about that. Would like to find a way to make the game respawn vehicles like it used to.
Not exactly sure myself, I have another server with vilayer and the pMain just doesn't seem to like to spawn vehicles in mass quantities. It seems to only like to spawn a few at most. I'd pretty much just like to make an event that runs each day to respawn all the vehicles that are destroyed like how it use to happen.
 
Check the vilayer spawn script. they updated it and added stuff for removing damaged vehicles and respawning them. seems very nice.

sBQ.png


might help us both alot.
 
I'll have to look at that, but the my issue would still remain the same where I need to somehow improve vehicles spawning without being able to modify pMain.
 
Back
Top