🚙VEHICLE RENTAL

📖 Description

Vehicle rental script for FiveM compatible with ESX and QB-Core. This script allows players to rent vehicles at different locations on the map, with an automatic hourly billing system and damage management.

✨ Features

  • ✅ Compatible with ESX and QB-Core

  • ✅ Modern and intuitive NUI interface

  • ✅ Automatic hourly billing system

  • ✅ Damage management with financial penalties

  • ✅ Vehicle return system

  • ✅ Map blips for rental locations

  • ✅ NPCs with customizable props

  • ✅ Support for multiple simultaneous locations

  • ✅ Maximum 10 vehicles per location

  • ✅ Automatic license plate generation

🚀 Installation

Prerequisites

  • ESX or QB-Core framework installed and functional

  • FiveM Server with base resources

Installation Steps

  1. Download the script and place it in your resources folder

  2. Rename the folder to rental (or your preferred name)

  3. Configure the framework in shared/_main.lua :

  4. Add the script to your server.cfg :

  5. Restart your server

⚙️ Configuration

Framework Configuration

Open shared/_main.lua to configure your framework:

Location Configuration

All main configurations are located in shared/config.lua:

General Settings

Location Structure

Text Configuration

Texts are configurable in shared/dialogue.lua:

🎮 Usage

For Players

  1. Approach a rental NPC (visible on the map with a blip)

  2. Press E to open the rental menu

  3. Select a vehicle from the list

  4. Pay the rental price

  5. Pick up your vehicle at the indicated spawn point

  6. Return the vehicle at the return point before the time expires

Billing System

  • Automatic billing: If the player exceeds the allowed time, they are automatically billed

  • Damage management: Vehicle damage is charged upon return

  • Payment priority: The system first withdraws from the bank, then from cash

📁 File Structure

🔧 Customization

Adding a New Location

  1. Open shared/config.lua

  2. Add a new entry in Config.Locations:

Changing NPC Models

Check the list of Ped models at: https://wiki.rage.mp/index.php?title=Peds

Changing Props

Check prop models at: https://gtahash.ru/

Modifying Blips

Check blip sprites and colors at: https://wiki.rage.mp/index.php?title=Blips

🐛 Troubleshooting

  • Check that the script is started (ensure rental)

  • Check for errors in the F8 console

  • Make sure you are close enough to the NPC (< 2.5 units)

Vehicle doesn't spawn

  • Check that the spawn point is not blocked

  • Check that the vehicle name is correct

  • Check for errors in the server console

Billing doesn't work

  • Check the framework configuration in shared/_main.lua

  • Check that the player has enough money

  • Enable debug to see logs: ConfigShared.Debug = true

📝 Important Notes

  • ⚠️ Maximum 10 vehicles per location in configuration

  • ⚠️ The system checks rentals every 30 seconds

  • ⚠️ Make sure spawn coordinates are free and accessible

  • ⚠️ The script automatically generates plates in "LOC XXX" format


Note: This script is compatible with ESX and QB-Core frameworks. Make sure to properly configure the framework in shared/_main.lua before use.

Last updated