Vehicle Configuration

The vehicle configuration defines the categories and available vehicles that can be rented throughout the system.

Categories Configuration

The categories section defines the organization of vehicles into different types and categories:

categories = {
    vehicles = {
        sports = { 
            label = 'Sports', 
            icon = 'car-side' 
        },
        suvs = { 
            label = 'SUVs', 
            icon = 'truck-monster' 
        }
    },
    bikes = {
        motorcycles = { 
            label = 'Motorcycles', 
            icon = 'motorcycle' 
        }
    }
}
categoriesrequiredtable
The main categories table containing all vehicle types.
categories[type]requiredtable
A table for each vehicle type (vehicles, bikes, boats, planes).
categories[type][category].labelrequiredstring
The display label for the vehicle category.
categories[type][category].iconrequiredstring
The icon identifier for the vehicle category.

Available Categories

vehicles = {
    sports = { label = 'Sports', icon = 'car-side' },
    suvs = { label = 'SUVs', icon = 'truck-monster' },
    coupes = { label = 'Coupes', icon = 'car' }
}

Vehicle List Configuration

The list section defines all available vehicles that can be rented:

list = {
    sultanrs = {
        category = 'sports',
        type = 'vehicles',
        hash = `sultanrs`
    }
}
listrequiredtable
A table containing all available vehicles.
list[vehicle].categoryrequiredstring
The category this vehicle belongs to.
list[vehicle].typerequiredstring
The type of vehicle (vehicles, bikes, boats, planes).
list[vehicle].hashrequiredstring
The game hash identifier for the vehicle.

Vehicle Types

sultanrs = {
    category = 'sports',
    type = 'vehicles',
    hash = `sultanrs`
}

Complete Configuration Example

return {
    categories = {
        vehicles = {
            sports = { 
                label = 'Sports', 
                icon = 'car-side' 
            },

            suvs = { 
                label = 'SUVs', 
                icon = 'truck-monster' 
            },

            coupes = { 
                label = 'Coupes', 
                icon = 'car' 
            }
        },
        
        bikes = {
            motorcycles = { 
                label = 'Motorcycles', 
                icon = 'motorcycle' 
            },

            bicycles = { 
                label = 'Bicycles', 
                icon = 'bicycle' 
            }
        },
        
        boats = {
            speedboats = {
                label = 'Speed Boats',
                icon = 'ship'
            },
            
            jetskis = {
                label = 'Jet Skis',
                icon = 'water'
            }
        },
        
        planes = {
            helicopters = {
                label = 'Helicopters',
                icon = 'helicopter'
            },

            aircraft = {
                label = 'Planes',
                icon = 'plane'
            }
        }
    },

    list = {
        sultanrs = {
            category = 'sports',
            type = 'vehicles',
            hash = `sultanrs`
        },

        futo = {
            category = 'sports',
            type = 'vehicles',
            hash = `futo`
        },

        bison = {
            category = 'suvs',
            type = 'vehicles',
            hash = `bison`
        },

        sentinel = {
            category = 'coupes',
            type = 'vehicles',
            hash = `sentinel`
        },

        sanchez = {
            category = 'motorcycles',
            type = 'bikes',
            hash = `sanchez`
        },
        
        bmx = {
            category = 'bicycles',
            type = 'bikes',
            hash = `bmx`
        },
        
        seashark = {
            category = 'jetskis',
            type = 'boats',
            hash = `seashark`
        },
        
        dinghy = {
            category = 'speedboats',
            type = 'boats',
            hash = `dinghy`
        },
        
        frogger = {
            category = 'helicopters',
            type = 'planes',
            hash = `frogger`
        },
        
        mammatus = {
            category = 'aircraft',
            type = 'planes',
            hash = `mammatus`
        },
        
        granger = {
            category = 'suvs',
            type = 'vehicles',
            hash = `granger`
        }
    }
}