Hello everyone today I am presenting you my first script to release. This is simple one but I could not find it anywhere and I think it will be very useful for a lot of server owners out here!
It is a Automatic and Manual Vehicles cleanup for unoccupied vehicles which can be adjusted for the time you like the cleanup to start or by typing in the chat: /delallveh
Requirement is cron as the script uses the server time for the automatic cleanup:
Preview:
Installation:
Download the resouce you can name it to whatever you like.
Drag the folder into resources in your server
Start (name of your folder)
Enjoy
If you have any questions please don’t hesitate to ask!
What about players cars…? If a player spawns his vehicle and doesn’t drive it for about 30mns and vehicle cleanup is coming, will it despawn the vehicle…?
So I will explain really quick how it works again. Every Vehicle that does not have player in it will be deleted after 30 seconds from the script initiating. If the person is in the car it will not be deleted, that’s the whole reason I added the 30 seconds so if people jumped out of their car can hop back in for a brief second and wait for the vehicle cleanup. This could be improved for example make it that if the car was unoccupied for lets say 2 minutes and the vehicle cleanup starts it will be deleted otherwise stay.
I deleted the comment but anyway, what I said is that I don’t find it usefull if it doesn’t check if a player owns the car is going to be deleted in order to avoid the unnecesary cleanup in some vehicles… There are some natives that might help HasVehicleBeenOwnedByPlayer, IsVehiclePreviouslyOwnedByPlayer