Installations
server.cfg
Add the command to your server.cfg file and make sure that the script is started.
ensure mt_parkingconfig.lua
You can configure everything in config.lua. Once you have made your desired changes, you'll need to restart your server to ensure that everything works smoothly.
Config = {}
-- This parameter dictates the spawning distance of vehicles in relation to the nearest player, measured in meters.
Config.spawnDistance = 500.0
-- This parameter determines the timeframe for removing a vehicle entry from the database table upon invoking the cleanup function. The timeframe is specified in hours; for instance, 24 * 7 equals one week.
Config.cleanUpThresholdTime = 24 * 7
-- Set this to true if you also want the cleanup to run at a specific time of day.
Config.useCleanUpTask = true
-- Used exclusively when the 'useCleanUpTask' parameter is configured to 'true'.
Config.cleanUpTaskTime = {
hours = 3,
minutes = 0,
seconds = 0
}
-- This feature allows you to set a time limit for vehicle deletion (in minutes). Set it to 0 if you do not wish to utilize this function. This option proves particularly beneficial for managing vehicles on expansive servers with high player traffic.
Config.deleteTimer = 0
-- Despawns any vehicles located more than x meters away from a player.
Config.deleteDistance = 25.0
-- The timing for displaying notifications prior to despawning must be in descending order in minutes and less than the Config.deleteTimer.
Config.deleteNotificationTimes = { 5, 3, 2, 1 }
-- Notification to be displayed to players before vehicle deletion (utilize %s as a placeholder for the remaining time in minutes).
Config.timeLeftNotification = "Vehicles will be despawned in %s minutes."
-- Notification to alert players when deleting vehicles.
Config.deleteNotification = "Removing vehicles..."
-- Set this to false if you prefer entities not to appear scorched when they are completely broken.
Config.renderScorched = true
-- Please list the vehicle classes you do not wish to save here. If you want a specific number blacklisted, simply remove '--' in front of it.
Config.blacklistclasse = {
-- 0, -- Compacts
-- 1, -- Sedans
-- 2, -- SUVs
-- 3, -- Coupes
-- 4, -- Muscle
-- 5, -- Sports Classics
-- 6, -- Sports
-- 7, -- Super
-- 8, -- Motorcycles
-- 9, -- Off-road
--10, -- Industrial
--11, -- Utility
--12, -- Vans
--13, -- Cycles
--14, -- Boats
--15, -- Helicopters
--16, -- Planes
--17, -- Service
--18, -- Emergency
--19, -- Military
--20, -- Commercial
--21, -- Trains
}
-- Any other vehicles that you do not wish to save can be inserted here (using 'MODELNAME' as a placeholder).
Config.blacklistcar = {
--`mule`,
--`t20`,
}
-- Please deposit any unwanted vehicle license plates here. Case sensitivity is not an issue, and partial strings are acceptable.
Config.blacklistplates = {
--"MTservice",
--"LS 1234",
}es_extandet
Please adjust the code in your file functions.lua in the directory es_extended/client/ as follows:
Find the following function:
Change it to:
MySQL
Please insert the following MySQL code into your MySQL server to record the positions of the cars.
Last updated
Was this helpful?