Is there any way I can auto delete unused vehicles?

robbiedarza

Well-Known Member
Hello there, I have a lot of locked vehicles all over my map, and I cant delete them in case they are still being used.

So I was wondering if there was a script or something that would auto delete vehicles that have not been used within a month.


Many thanks

Robbie
 
DELETE FROM instance_vehicle WHERE DATE(`last_updated`) < CURDATE() - INTERVAL 30 DAY or
DELETE FROM object_data WHERE DATE(`last_updated`) < CURDATE() - INTERVAL 30 DAY
pmain within the tab function before the end

#update number of same class already spawned
SELECT COUNT(*)
INTO iNumClassExisting
FROM Object_DATA
WHERE Instance = sInstance
AND Classname = @rsClassname;

END IF;
END IF;

SET iTimeout = iTimeout + 1; #raise timeout counter
IF (iTimeout >= iTimeoutMax) THEN
SET iNumVehExisting = iVehSpawnMax;
END IF;
END WHILE;
SET i = i + 1;

#repair all vehicles
update object_data set hitpoints="[]", fuel=1, damage=0.01;
#delete unused vehicle in 30 days
DELETE FROM object_data WHERE DATE(`last_updated`) < CURDATE() - INTERVAL 30 DAY
END
 
Back
Top