Auto Vehicles Deleter - Server Optimization - FiveM Standalone Script

Auto Vehicles Deleter - Server Optimization - FiveM Standalone Script

The Auto Vehicles Deleter is a FiveM simple script that optimize your server by removing the empty, abandoned and destroyed vehicles all over your server’s map, except certain areas you can configure in the config file called The Ignore Zones, with a live countdown timer that synchronize with all your server’s players to notify them.
The script is fully configurable, from the time between each Auto Delete, to the timer’s duration, and the timer’s screen position etc…
And ready to use commands, to control the Auto Deleter manually, from start the countdown manually to stop it.

Config File:

Config = {}

Config.TimeLoop = 55 -- In Minutes - Every 55 minues the counter shows on screen before the auto vehicles deleter
Config.TimerDuration = 5  -- In Minutes - The timer start counting 5 minutes before the auto vehicles deleter
Config.TimerLastAlert = 20  -- In Seconds - The timer's color change to red when it reachs 20 seconds to alert players

Config.ScreenTimer = { -- Timer screen position
	Text = {0.025, 0.486}, -- Timer text screen position
	Rect = {0.08, 0.50}, -- Timer background screen position
	
	Font = 4, -- Timer text font type
	CustomFont = { -- This option for servers that use custom fonts or other languages - Used Natives: RegisterFontFile(FontName) / RegisterFontId(FontName)
		UseCustomFont = false, -- Set to "true" to enable using custom font
		FontName = '', -- Custom font file name
	}
}

------------------------------------------------------------------------------------------------------------------
------------------------------------------------ Ignore Zones ----------------------------------------------------

Config.IgnoreZones = { -- Vehicle in this custom zones will not be deleted
	{ Coords = vector3(-41.26, -1097.4, 26.0), Radius = 42.0 }, -- Cardealer Zone example
	-- { Coords = vector3(0.0, 0.0, 0.0), Radius = 100.0 },
	-- { Coords = vector3(0.0, 0.0, 0.0), Radius = 100.0 },
}

------------------------------------------------------------------------------------------------------------------
------------------------------------------------- Translation ----------------------------------------------------

Config.Translation = {
	['auto_vehs_del']	= 'Auto vehicles deleter',
	['all_clear']		= 'All clear, enjoy your game',
}

------------------------------------------------------------------------------------------------------------------
------------------------------------ Pre-Configured Timer Screen Position ----------------------------------------

-- Right Side:

	-- Top Right:
		-- Text = {0.87, 0.036},
		-- Rect = {0.925, 0.05},

	-- Middle Right:
		-- Text = {0.87, 0.486},
		-- Rect = {0.925, 0.50},

	-- Bottom Right:
		-- Text = {0.87, 0.936},
		-- Rect = {0.925, 0.95},



-- Left Side:

	-- Top Left:
		-- Text = {0.025, 0.036},
		-- Rect = {0.08, 0.05},

	-- Middle Left:
		-- Text = {0.025, 0.486},
		-- Rect = {0.08, 0.50},

	-- Bottom Left:
		-- Text = {0.025, 0.936},
		-- Rect = {0.08, 0.95},

Preview: Youtube Link
Buy Here : Tebex Link ($6.99 + Tax)

You might like one of my scripts

Code is accessible config file
Subscription-based No
Lines (approximately) 270
Requirements No
Support Yes
10 Likes

We (Enemy of the State RP) were JUST thinking about making something like this last night! Then you released it today… Great work! Excellent.

2 Likes

What’s the difference between your script and the way the RAGE engine deletes abandoned vehicles?

2 Likes

Thank you for your sweet words :blush:

As long as the player is in-game, his spawned vehicles (vehicles owned and controlled by the player’s client also called networked vehicles) will stay always in the server, even the vehicle is a 1000 mile away.
The RAGE’s engine only deletes - as I call them - the non controlled vehicles, like the NPCs vehicles and the offline players spawned vehicles.

Nice release

1 Like

this is not the case for me , I spawn cars get outside and after the auto delete all the cars are gone

can you add a configurable message for when deletion is about to occur?

1 Like

Hi @Archxn
of course, I can add anything :slightly_smiling_face:

Let me know when you do I’ll purchaser

1 Like

just join my discord server so you can be notified with the latest updates.

Clean, and simple great work, keep it up!

2 Likes

Thank you :blush: I really appreciate your sweet review.

1 Like

Thank you a lot. Nice Script!

Thank you for you sweet words :smiling_face_with_three_hearts:

can u add option to show or hide the text in the game!!

1 Like

Hi @klashproZ :blush:
If you have any suggestions about things to add or change, just open a ticket in our discord server.

Servers really need to use scripts like this!

1 Like

Imagine charging money for a script that is just running a constant loop of clear area for the map.

1 Like

You might like one of my scripts: (20% off discount)