Rent a Car App: Configuration
Every option in the app's config/config.lua, and the phone rules that live in hype-rentacar.
Tip
After editing, restart only the resource with ensure hype-rentacar-app; a full server restart is not needed.
The app has only a few options of its own in config/config.lua. Vehicles, prices, durations, offices, the license
check, the phone service fee and the respawn fee are all set in
hype-rentacar's config. Distances are in meters.
General
Debug = false,
Framework = "auto",Prop
Type
App
How the app appears in lb-phone and its App Store.
App = {
identifier = "hype-rentacar",
name = "Rent a Car",
description = "Rent a vehicle from your phone and keep track of your rentals.",
developer = "Los Santos Rent a Car",
defaultApp = false,
price = 0,
size = 42500,
},Prop
Type
The app icon is web/build/icon.svg (source: web/public/icon.svg). Replace it to use your own.
GPS and respawn
SetWaypoint = true,
SpawnRadius = 30.0,Prop
Type
"Bring to Me" looks for a free road node within SpawnRadius. Without one it uses the spot 4 m in front of the player.
The point is checked again on the server against Respawn.maxDistance.
Rental rules
The phone specific rules are part of hype-rentacar's config/config.lua:
Respawn = {
enabled = true,
remote = true,
fee = 250,
maxDistance = 40.0,
},
Remote = {
enabled = true,
fee = 100,
pickupRadius = 15.0,
},| Option | Description |
|---|---|
Remote.enabled | Allows renting from the phone |
Remote.fee | Service fee added to phone rentals |
Remote.pickupRadius | Max distance to the office when collecting a phone rental |
Respawn.enabled / Respawn.remote | Allows respawning lost rentals at all / from the phone |
Respawn.fee | Fee per respawn |
Respawn.maxDistance | Max distance between the player and a phone respawn point |
The app also takes CompanyName, UI (currency and number format), PaymentAccounts, MaxActiveRentals and the
license rule from hype-rentacar. See Rent a Car configuration.
Locales
The language comes from ox_lib, so it is set in server.cfg rather than in the config:
setr ox:locale "en"en and tr are included. To add a language, copy locales/en.json, translate it, save it with the language code
as its name (e.g. de.json) and set ox:locale to that code. The app has its own locale files, so a new vehicle
category needs a label under ui.categories here as well as in hype-rentacar.
Building the UI
The app ships prebuilt in web/build. To change it, edit the Vue source in web/ and rebuild:
cd web
pnpm install
pnpm buildpnpm dev opens a browser preview with mock data.