A modern, fully-featured car rental system for FiveM servers with a beautiful UI, contract system, and automatic expiry management.
- ๐จ Modern Dark UI - Beautiful, responsive interface with smooth animations
- ๐ Digital Contracts - Usable rental contract items with all rental details
- โฐ Automatic Expiry System - Warnings before expiry and late fee management
- ๐ My Rentals Tab - Track all your active rentals in one place
- ๐ฐ Flexible Pricing - Hourly-based pricing with customizable durations
- ๐ Vehicle Keys Integration - Automatic key assignment (qb-vehiclekeys/qbx_vehiclekeys)
- ๐พ Vehicle Persistence - Rented vehicles persist across reconnects
- ๐บ๏ธ Return Location GPS - Automatic waypoint to return location on expiry
Click to view screenshots
- ox_target / qb-target / interact
- ox_inventory / qb-inventory
- qb-vehiclekeys / qbx_vehiclekeys
-
Download the resource and place it in your
resourcesfolder -
Import the SQL - Run the SQL file in your database:
-- Located in: sql/rental_history.sql -
Add to server.cfg:
ensure ox_lib ensure oxmysql ensure F4-Rental
-
Configure - Edit
config.luato customize:- Rental locations
- Available vehicles
- Rental durations
- Pricing
- And more...
Config.Locations = {
{
name = "Premium Rentals",
coords = vector3(-50.0, -1090.0, 26.5),
spawnPoint = vector4(-47.0, -1095.0, 26.5, 160.0),
blip = { sprite = 56, color = 5, scale = 0.8 },
},
}Config.RentalDurations = {
{ label = "1 Hour", hours = 1, multiplier = 1.5 },
{ label = "3 Hours", hours = 3, multiplier = 1.3 },
{ label = "6 Hours", hours = 6, multiplier = 1.2 },
{ label = "12 Hours", hours = 12, multiplier = 1.1 },
{ label = "24 Hours", hours = 24, multiplier = 1.0 },
}Config.Vehicles = {
{
model = "sultan",
label = "Sultan",
manufacturer = "Karin",
category = "Sports",
price = 500,
image = "https://docs.fivem.net/vehicles/sultan.webp",
stats = { speed = 75, acceleration = 70, braking = 65, handling = 72 },
},
}| Framework | Status |
|---|---|
| QBox (qbx_core) | โ Full Support |
| QBCore | โ Full Support |
| ESX Legacy | โ Full Support |
This resource is free to use and redistribute. Resale is not permitted.
For support, please open an issue on GitHub or contact the author
| Issue | Status |
|---|---|
| Vehicle duplication after server restart | โ Fixed |
| Multiple rentals bypass after disconnect | โ Fixed |
| Retrieve spawning duplicate vehicles | โ Fixed |
| Return not updating database | โ Fixed |
-
DoesEntityExist Script Error (interact/sleepless_interact)
- โ Fixed entity parameter validation in return vehicle event
- โ Added comprehensive type checking and conversion
- โ No more script errors when using target systems
-
Rental Data Not Deleting After Return
- โ Changed database operation from UPDATE to DELETE
- โ Rentals now properly removed from database on return
- โ Clean database without leftover rental records
-
QBCore Callback Data Handling
- โ Fixed callback bridge for QBCore framework
- โ Proper data passing between client and server
- โ DELETE operations now work correctly in QBCore
- ๐ฐ Negative Balance Support - Late fees apply even with insufficient funds
- ๐ Continuous Charging - Fees continue until vehicle is returned
- ๐ฏ Smart Detection - Only charges online players
- ๐๏ธ Auto-Cleanup - Offline expired rentals are deleted without fees
- ๐๏ธ Clean Records - All returns now DELETE instead of UPDATE status
- ๐ Better Performance - Fewer database records to query
- ๐ Accurate Tracking - Only active rentals in database
- ๐ Enhanced Debugging - Comprehensive debug logging for troubleshooting
- โ Better Validation - Improved entity and data validation
- ๐ Safer Operations - Proper error handling and fallbacks
// Before (Old Code)
UPDATE rental_history SET status = 'returned' WHERE id = ?
// After (New Code)
DELETE FROM rental_history WHERE id = ? AND citizenid = ?- โ Smoother return process without errors
- โ Clear balance warnings when going negative
- โ Fair system: only online players pay late fees
- โ Offline players don't accumulate charges




