Configuration
All settings are in config.lua. Some of them (fees, speed, default prices, blips) can also be changed in-game on the Settings page of the admin tablet. Those changes are saved in the database and override config.lua.
General
| Setting | Default | What it does |
|---|---|---|
Config.Brand | 'Volt Ride' | The name shown in the tablet, phone and notifications |
Config.Locale | 'en' | en or es. Add more in locales/ |
Config.Framework | 'auto' | auto, qbox, qbcore or esx |
Config.AdminCommand | 'gsdocks' | Opens the admin tablet |
Config.AdminAce | 'gs_voltride.admin' | The ACE permission for admins |
Config.Debug | false | Prints debug logs and enables /gs_testscooter |
Integrations
config.lua
Config.Integrations = {
target = 'auto', -- ox_target | qb-target
notify = 'default', -- default | gs | ox_lib | qb | esx | okok | custom
keys = 'auto', -- qbx_vehiclekeys | qb-vehiclekeys | wasabi_carlock | cd_garage | none | custom
fuel = 'auto', -- statebag | lc_fuel | legacyfuel | cdn-fuel | ps-fuel | native | none | custom
}
The default notification is styled like the tablet. Config.Notify sets its position and duration.
For custom, edit the hook files (they stay readable):
client/hooks.lua:GS.CustomNotify(n)for notifications andGS.CustomFuel(vehicle)for fuelserver/hooks.lua:Config.GiveKeys(source, vehicle, plate)for keys andConfig.SetFuel(vehicle)for fuel
client/hooks.lua
function GS.CustomNotify(n)
exports['my_notify']:Send(n.title, n.description, n.type)
end
Phone
config.lua
Config.Phone = {
enabled = true,
type = 'auto', -- auto | lb | qs | 17mov | gks
identifier = 'gs-voltride',
defaultApp = false, -- true = already on the home screen
}
Rentals and fees
| Setting | Default | What it does |
|---|---|---|
Config.MaxMinutes | 60 | Longest a rental can last before the late fee is charged |
Config.LateFee | 500 | Charged when the time limit is reached |
Config.DamageFee | 300 | Charged when a scooter is returned damaged |
Config.DamageThreshold | 600.0 | Body health below which a scooter counts as damaged |
Config.ReturnRadius | 5.0 | How close to a dock the scooter must be to return it |
If a player can't pay, the amount is stored and must be paid before their next rental.
New dock defaults
config.lua
Config.Defaults = {
stock = 5, -- scooters in a new dock
maxStock = 8, -- dock capacity
unlockFee = 50, -- paid when renting
perMinute = 10, -- paid per minute of riding
blip = true,
}
Each dock can have its own values; edit them in the admin tablet.
Map, blips and lights
Config.Blipsets the dock blip.Config.SpawnDistanceis how close players must be before a dock's props spawn.Config.NightLightlights up the docks at night (fromfromtotoo'clock), with its own colour, range and brightness.Config.TabletMaplines up the tablet map with the game world. Only change it if you replaceui/map.jpg.
Placing docks
Config.Placement sets how far each key press rotates or raises a dock while placing it, how far away you can place it, and how much free space the exit needs.
Player-owned docks
config.lua
Config.Owner = {
enabled = true,
command = 'mydocks',
maxDocksPerPlayer = 3,
defaultPrice = 25000,
buyDistance = 6.0,
maxUnlockFee = 500, -- highest unlock fee an owner can set
maxPerMinute = 100, -- highest per-minute price an owner can set
restockCost = 40, -- per scooter
upgradeCostPerSlot = 1500,
maxCapacity = 24,
notifyRentals = true, -- tell the owner when someone rents from their dock
}
Config.Stats.keepDays (default 90) is how long ride statistics are kept.
Scooter
| Setting | Default | What it does |
|---|---|---|
Config.ModelName | 'gs_scoot' | The scooter model (included) |
Config.PlatePrefix | 'VOLT' | Start of the scooter plate |
Config.MaxSpeedKmh | 45.0 | Top speed |
Config.AnimateScooter | true | Plays the dock animations |
Config.NoHelmet | true | Riders don't put on a helmet |
Config.InstantMount | false | Skip the get-on animation |
Config.Kickstand | Shows the kickstand when the scooter is parked | |
Config.RideAnim | The riding animation and how it reacts to speed and steering |