Configuration
Config, Lang, Noti = {}, {}, {}
CONFIGURATION FILE
Config, Lang, Noti = {}, {}, {}
-- $$$$$$\ $$$$$$\ $$\ $$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\ $$$$$$$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\
--$$ __$$\ $$ __$$\ $$$\ $$ |$$ _____|\_$$ _|$$ __$$\ $$ | $$ |$$ __$$\ $$ __$$\\__$$ __|\_$$ _|$$ __$$\ $$$\ $$ |
--$$ / \__|$$ / $$ |$$$$\ $$ |$$ | $$ | $$ / \__|$$ | $$ |$$ | $$ |$$ / $$ | $$ | $$ | $$ / $$ |$$$$\ $$ |
--$$ | $$ | $$ |$$ $$\$$ |$$$$$\ $$ | $$ |$$$$\ $$ | $$ |$$$$$$$ |$$$$$$$$ | $$ | $$ | $$ | $$ |$$ $$\$$ |
--$$ | $$ | $$ |$$ \$$$$ |$$ __| $$ | $$ |\_$$ |$$ | $$ |$$ __$$< $$ __$$ | $$ | $$ | $$ | $$ |$$ \$$$$ |
--$$ | $$\ $$ | $$ |$$ |\$$$ |$$ | $$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ | $$ | $$ | $$ | $$ |$$ |\$$$ |
--\$$$$$$ | $$$$$$ |$$ | \$$ |$$ | $$$$$$\ \$$$$$$ |\$$$$$$ |$$ | $$ |$$ | $$ | $$ | $$$$$$\ $$$$$$ |$$ | \$$ |
--\______/ \______/ \__| \__|\__| \______| \______/ \______/ \__| \__|\__| \__| \__| \______| \______/ \__| \__|
--Use "esx" or "qb"
Config.Framework = "esx"
--Default ESX: "esx:getSharedObject" | Default QB: "qb-core"
Config.Core = "esx:getSharedObject"
--Link to receive discord notifications
Config.DiscordWebhookLink = ""
--Vehicle rental time
Config.RentTime = 1800000 -- 30min
--When the first warning appears
Config.WarningRentTime1 = 900000 -- 15min
--When the last warning appears
Config.WarningRentTime2 = 60000 -- 1min
--Coordinates where the rental vehicle will be located
Config.CarSpawn = vector3(-237.36, -992.27, 28.72)
--Coordinates for the rental vehicle
Config.CarSpawnHeading = 160.0
--Marker location coordinates and color
Config.Marker = vector3(-235.52, -978.42, 29.29)
Config.MarkerColor = {
x = 249,
y = 52,
z = 9,
}
--$$\ $$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$\ $$\ $$\ $$$$$$\
--$$$\ $$ |$$ __$$\\__$$ __|\_$$ _|$$ _____|\_$$ _|$$ __$$\ $$ __$$\\__$$ __|\_$$ _|$$ __$$\ $$$\ $$ |$$ __$$\
--$$$$\ $$ |$$ / $$ | $$ | $$ | $$ | $$ | $$ / \__|$$ / $$ | $$ | $$ | $$ / $$ |$$$$\ $$ |$$ / \__|
--$$ $$\$$ |$$ | $$ | $$ | $$ | $$$$$\ $$ | $$ | $$$$$$$$ | $$ | $$ | $$ | $$ |$$ $$\$$ |\$$$$$$\
--$$ \$$$$ |$$ | $$ | $$ | $$ | $$ __| $$ | $$ | $$ __$$ | $$ | $$ | $$ | $$ |$$ \$$$$ | \____$$\
--$$ |\$$$ |$$ | $$ | $$ | $$ | $$ | $$ | $$ | $$\ $$ | $$ | $$ | $$ | $$ | $$ |$$ |\$$$ |$$\ $$ |
--$$ | \$$ | $$$$$$ | $$ | $$$$$$\ $$ | $$$$$$\ \$$$$$$ |$$ | $$ | $$ | $$$$$$\ $$$$$$ |$$ | \$$ |\$$$$$$ |
--\__| \__| \______/ \__| \______|\__| \______| \______/ \__| \__| \__| \______| \______/ \__| \__| \______/
function notifications(notitype, message, time)
--Change this trigger for your notification system keeping the variables
TriggerEvent('codem-notification', message, time, notitype)
end
--Notifications types:
Noti.info = 'info'
Noti.check = 'check'
Noti.error = 'error'
--Notification time:
Noti.time = 5000
-- $$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\
--$$ __$$\ $$ __$$\ $$ __$$\ $$ __$$\
--$$ / \__|$$ / $$ |$$ | $$ |$$ / \__|
--$$ | $$$$$$$$ |$$$$$$$ |\$$$$$$\
--$$ | $$ __$$ |$$ __$$< \____$$\
--$$ | $$\ $$ | $$ |$$ | $$ |$$\ $$ |
--\$$$$$$ |$$ | $$ |$$ | $$ |\$$$$$$ |
--\______/ \__| \__|\__| \__| \______/
Config.Cars = {
Sport1 = "t20",
Sport1Image = "url(https://cs2.gtaall.net/screenshots/d9802/2015-08/original/45ba6bcfeeaaae1075d3a5898f197119b3af8fbd/288276-gta-sa-2015-08-20-22-46-33-556.jpg)",
Sport1Price = 1000,
Sport1PriceText = "1000$ / 30min",
Sport2 = "adder",
Sport2Image = "url(https://www.gtagaming.com/images/26171/1392060462_gtaiv2014011306120254.jpg)",
Sport2Price = 1000,
Sport2PriceText = "1000$ / 30min",
Sport3 = "zentorno",
Sport3Image = "url(https://pm1.narvii.com/6913/fcdd1fd5cdc8a9f1c087fc34d5a092363f1d4a96r1-970-536v2_hq.jpg)",
Sport3Price = 1000,
Sport3PriceText = "1000$ / 30min",
Classic1 = "btype",
Classic1Image = "url(https://cs2.gtaall.com/screenshots/4dc09/2019-10/original/fb3d6791b9e3b060be144f424cf2be71191f5801/745667-GTAIV-2019-10-23-16-59-40-36.jpg)",
Classic1Price = 300,
Classic1PriceText = "300$ / 30min",
Classic2 = "swinger",
Classic2Image = "url(https://www.gtabase.com/images/user/vehicles/cac3965510_PGTA51557287321.jpg)",
Classic2Price = 300,
Classic2PriceText = "300$ / 30min",
Classic3 = "cheburek",
Classic3Image = "url(https://static.wikia.nocookie.net/gtawiki/images/8/8e/Cheburek-GTAO-front.png/revision/latest?cb=20180720130340)",
Classic3Price = 300,
Classic3PriceText = "300$ / 30min",
Moto1 = "vortex",
Moto1Image = "url(http://i.imgur.com/E3Vws8Y.jpg)",
Moto1Price = 150,
Moto1PriceText = "150$ / 30min",
Moto2 = "avarus",
Moto2Image = "url(https://www.gta5rides.com/vehicleImages/cropped/Avarus-GTAO-front.png.jpg)",
Moto2Price = 150,
Moto2PriceText = "150$ / 30min",
Moto3 = "hakuchou",
Moto3Image = "url(http://pm1.narvii.com/7261/d926c7b46b7188c8568d951aa50c12affbeac44dr1-1280-720v2_uhq.jpg)",
Moto3Price = 150,
Moto3PriceText = "150$ / 30min",
}
--$$\ $$$$$$\ $$\ $$\ $$$$$$\ $$\ $$\ $$$$$$\ $$$$$$\ $$$$$$$$\
--$$ | $$ __$$\ $$$\ $$ |$$ __$$\ $$ | $$ |$$ __$$\ $$ __$$\ $$ _____|
--$$ | $$ / $$ |$$$$\ $$ |$$ / \__|$$ | $$ |$$ / $$ |$$ / \__|$$ |
--$$ | $$$$$$$$ |$$ $$\$$ |$$ |$$$$\ $$ | $$ |$$$$$$$$ |$$ |$$$$\ $$$$$\
--$$ | $$ __$$ |$$ \$$$$ |$$ |\_$$ |$$ | $$ |$$ __$$ |$$ |\_$$ |$$ __|
--$$ | $$ | $$ |$$ |\$$$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ |
--$$$$$$$$\ $$ | $$ |$$ | \$$ |\$$$$$$ |\$$$$$$ |$$ | $$ |\$$$$$$ |$$$$$$$$\
--\________|\__| \__|\__| \__| \______/ \______/ \__| \__| \______/ \________|
Lang.t30min = "You have 30 minutes left to return the vehicle"
Lang.t15min = "You have 15 minutes left to return the vehicle"
Lang.t1min = "You have 1 minute left to return the vehicle"
Framework Setup
The configuration supports both ESX and QBCore frameworks. Set the Config.Framework value to "esx" or "qb" depending on your server setup. The Config.Core value should match your framework's core event name.
Rental Times
- RentTime: Total rental duration (default: 30 minutes = 1800000ms)
- WarningRentTime1: First warning time (default: 15 minutes before = 900000ms)
- WarningRentTime2: Final warning time (default: 1 minute before = 60000ms)
Vehicle Spawn
Configure the spawn location for rental vehicles using Config.CarSpawn coordinates and Config.CarSpawnHeading for the vehicle direction.
Marker Configuration
Set up the rental marker location with Config.Marker coordinates and customize the marker color using RGB values in Config.MarkerColor.
Vehicle Configuration
You can add unlimited vehicles in three categories:
- Sport: High-end performance vehicles
- Classic: Classic and vintage cars
- Moto: Motorcycles
Each vehicle requires:
- Model name (spawn code)
- Image URL (used as background)
- Price
- Price display text
Notifications
Configure your notification system by modifying the notifications() function. The default uses codem-notification but can be replaced with your custom notification system. Set notification types and duration using the Noti table.
Discord Integration
Set Config.DiscordWebhookLink to receive notifications about rental activities on your Discord server.