Configuration
All FR Dealership configuration lives in config.lua. No other file needs to be touched to customise the script.
General options
| Key | Type | Default | Description |
|---|---|---|---|
Config.Locale | string | 'es' | Default language: 'en' or 'es' |
Config.Brand | string | 'FiveRank Motors' | Dealership name shown in the NUI |
Config.Accent | string | '#C62828' | UI accent colour (hex) |
Config.Notify | bool | true | Use fr_notify if it is running |
Config.SellPercent | number | 50 | % of original price refunded when selling |
Config.OpenKey | string | 'E' | Interaction key (also rebindable in Key Bindings) |
Test drive (Config.TestDrive)
Config.TestDrive = {
Enabled = true, -- false hides the button entirely
Duration = 30, -- seconds the test lasts
Spawn = vector4(-1387.6, -3018.5, 13.94, 327.0), -- airport tarmac
Area = { center = vector3(-1336.0, -3044.0, 13.9), radius = 600.0 },
UseSelectedColour= true, -- paint the test car with the showroom colour
}
Built-in security: the test car cannot be stored, sold or kept; the player cannot exit the vehicle; leaving the area ends the test.
Financing (Config.Finance)
Config.Finance = {
Enabled = true,
Account = 'bank', -- 'cash' or 'bank'
DownPaymentPercent = 20, -- % paid upfront
InterestPercent = 10, -- % interest on the financed amount
Instalments = 6, -- number of instalments
InstalmentIntervalMinutes = 1440, -- time between instalments (1440 = 1 real day)
LateFeePercent = 5, -- % penalty per missed instalment
AutoCharge = true, -- charge automatically when player is online
RepossessAfterDays = 7, -- days impounded before repossession
FinanceBanDays = 30, -- days banned from financing after repossession
CheckIntervalSeconds = 60, -- how often the server checks loans
MinPrice = 0, -- minimum price to allow financing (0 = any)
}
How financing works
- The player pays the down payment (
DownPaymentPercent) at purchase time. - The rest is split into
Instalmentsequal instalments (plus interest) charged everyInstalmentIntervalMinutesreal-world minutes. - If an instalment cannot be paid, the vehicle is impounded and cannot be taken out of the garage. Debt grows with late fees on every missed cycle.
- If the vehicle stays impounded for more than
RepossessAfterDaysdays, it is repossessed and the player is banned from financing forFinanceBanDaysdays.
The player can pay an instalment or settle the full loan early from the garage menu at any time.
Showrooms (Config.Showrooms)
Each entry in the list is an independent showroom. All of them sell the same catalog.
Config.Showrooms = {
{
label = 'FiveRank Motors',
Entry = vector3(-56.94, -1096.6, 26.42), -- where the "press E" prompt appears
Ped = { Model = 's_m_m_autoshop_01', heading = 160.0 }, -- false to disable
Podium = vector4(-46.0, -1095.6, 26.42, 30.0), -- where the preview car is shown
Camera = { offset = vector3(5.2, -5.6, 1.4), lookAtZ = 0.4, fov = 50.0 },
TurnSpeed = 14.0, -- turntable rotation speed (degrees/sec)
Blip = { sprite = 326, color = 3, scale = 0.9 }, -- false to hide
},
}
Cloning a showroom: copy the block and only change Entry and Podium. Camera.offset is relative to the podium so the camera aligns automatically.
Garages (Config.Garages)
Config.Garages = {
{
label = 'Legion Square Garage',
Entry = vector3(-30.0, -1090.0, 26.0),
Spawn = vector4(-25.7, -1086.5, 25.9, 240.0), -- where a retrieved vehicle appears
Blip = { sprite = 357, color = 3, scale = 0.8 },
},
}
A player's vehicles are accessible from any garage in the list.
Vehicle catalog (Config.Categories)
Add a custom / add-on car
Add one line to any category's vehicles list:
{ model = 'mycustomcar', label = 'My Custom Car', price = 150000, type = 'car' }
| Field | Description |
|---|---|
model | Vehicle spawn name (same as /car) |
label | Name shown in the NUI |
price | Cost in game money |
type | 'car' or 'bike' |
The custom vehicle's resource must be started before a player tries to buy it.
Add a new category
{
id = 'custom', label_en = 'Custom', label_es = 'Personalizado',
vehicles = {
{ model = 'mycustomcar', label = 'My Car', price = 150000, type = 'car' },
},
},
Prices are validated server-side: no player can pay a different amount than the one set here.
Colours (Config.Colors)
Config.Colors = {
{ name = 'Pearl White', r = 245, g = 245, b = 245 },
{ name = 'Jet Black', r = 10, g = 10, b = 12 },
-- add or remove colours as needed
}