General Settings

The general settings configuration defines core functionality and behavior of the rental system.

General Configuration

maxActiveRentals = 3,

returnRadius = 10.0,

teleportIntoVehicle = true
maxActiveRentalsrequirednumber
3
The maximum number of active rentals a player can have at once.
returnRadiusrequirednumber
10.0
The radius in meters within which a player must be to return a rented vehicle.
teleportIntoVehiclerequiredboolean
true
Whether to automatically teleport the player into the vehicle when renting.

Rental Papers Configuration

The rentalPapers section defines settings for rental papers functionality:

rentalPapers = {
    enabled = true,
    
    item = 'rental_papers'
}
rentalPapers.enabledrequiredboolean
true
Whether to give players rental papers as proof of rental.
rentalPapers.itemrequiredstring
'rental_papers'
The item name to use for rental papers in the inventory system.

License Plate Configuration

The plateFormat section defines how rental vehicle license plates are generated:

plateFormat = {
    prefix = 'RENT',
    length = 4,
    useNumbers = true,
    useLetters = false
}
plateFormat.prefixrequiredstring
'RENT'
The prefix to use on all rental vehicle license plates.
plateFormat.lengthrequirednumber
4
The length of the random part of the license plate.
plateFormat.useNumbersrequiredboolean
true
Whether to use numbers in the random part of the license plate.
plateFormat.useLettersrequiredboolean
false
Whether to use letters in the random part of the license plate.

Rental Duration Configuration

The durations section defines available rental periods and their discounts:

durations = {
    { days = 1, label = '1 Day', discount = 0 },
    { days = 3, label = '3 Days', discount = 10 },
    { days = 7, label = '1 Week', discount = 20 },
    { days = 14, label = '2 Weeks', discount = 35 },
    { days = 30, label = '1 Month', discount = 50 }
}
durationsrequiredarray
An array of available rental duration options.
durations[].daysrequirednumber
The number of days for this rental duration.
durations[].labelrequiredstring
The display label for this rental duration.
durations[].discountrequirednumber
The percentage discount applied to the rental price for this duration.

Refund Amount Configuration

The returnAmount table defines how much of the rental price is refunded based on the percent of time left when returning a vehicle. Keys are the minimum percent of time left, values are the percent of the price refunded.

returnAmount = {
    [100] = 80,
    [75] = 60,
    [50] = 40,
    [25] = 20,
    [0] = 0
}
returnAmountrequiredobject
A table mapping percent of time left to percent of price refunded.

Complete Configuration Example

return {
    maxActiveRentals = 3,
    returnRadius = 10.0,
    teleportIntoVehicle = true,
    
    rentalPapers = {
        enabled = true,
        item = 'rental_papers'
    },
    
    plateFormat = {
        prefix = 'RENT',
        length = 4,
        useNumbers = true,
        useLetters = false
    },

    durations = {
        { days = 1, label = '1 Day', discount = 0 },
        { days = 3, label = '3 Days', discount = 10 },
        { days = 7, label = '1 Week', discount = 20 },
        { days = 14, label = '2 Weeks', discount = 35 },
        { days = 30, label = '1 Month', discount = 50 }
    },

    returnAmount = {
        [100] = 80,
        [75] = 60,
        [50] = 40,
        [25] = 20,
        [0] = 0
    }
}