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?:
Copied this outta pMain but I think portions of it need to be changed.
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.