Configuration
We have 2 configuration files, client and server.
Note
If a key like Parent.Child is required but the Parent isn't required and you didn't make Parent an object then Parent.Child (of course) cannot be set thus can be skipped.
Example of syncDatabaseContent.method when required
export const UserConfig: IUserConfig = {
// ...
// "syncDatabaseContent" is an object and that makes "method" required
syncDatabaseContent: {
method: "sync"
},
// ...
}
Example of syncDatabaseContent.method when NOT required
export const UserConfig: IUserConfig = {
// ...
// "syncDatabaseContent" is NOT an object and that makes "method" NOT required
syncDatabaseContent: false,
// ...
}
Server configuration
You can find the server configuration under config/server/config.ts.
Danger
DO NOT edit the config file that is located at dist/config/server/config.js!
It will be overwritten when the config changes and you will miss out on type safety (checks).
| Key | Type | Required / Default | Description |
|---|---|---|---|
| allowedToManageConfigScreen | AllowedTo | AllowedToSpecific | Yes | A function or object with functions to decide if a given user is allowed to open the config screen or do specific actions. |
| allowedToAdminCar | AllowedAdminCar | Yes | A function to decide if the given user is allowed to run the admincar commmand. |
| adminLogging | LoggingFunc | String | No | If you want custom logging of what admins do you can create a function or discord webhook here. |
| fallbackExit | Vector4 | Yes | Coordinates that will be used if the script gets confused and don't know where to put you when you exit a garage. |
| adminCarCommand | String | Yes | The admincar command. |
| impoundCommand | String | Yes | The impound command. |
| releaseCommand | String | Yes | The release command. |
| impoundPaymentsBankAccount | ValidBankingAccountInput | Yes | Either a number, string or an object that represents a bank account. |
| impoundJobs | String[] | Yes | An array of impound jobs. |
| canImpound | CanImpoundFunc | null | Yes | An extra custom function that checks if a player is allowed to impound or not. |
| canReleaseOwnedVehicles | CanReleaseOwnFunc | boolean | Yes | If impound employees can release their own vehicles from the impound (without paying that is). |
| catchUpPendingInvoices | Boolean | Yes | If true, pending rent invoices that accumulated while the script was stopped will all be sent when the script restarts. |
| parkingRentBankAccount | ValidBankingAccountInput | Yes | The bank account to use for receiving the parking rent payments. If you want the money to go to the void, define an object with a displayName. |
| parkingRentPayment | String | No (default: "invoice") | How should the parking rent be paid? (invoice or direct_debit). |
| sellbackPercentage | Number | No (default: 80%) | If you sell your garage or parking spot how much percent do you get back? |
| syncDatabaseContent | false | Object | No (default: false) | Sync the database content of this resource to a file (import/export). |
| syncDatabaseContent.method | "import_only" | "export_only" | "sync" | Yes | Method of syncing. |
| syncDatabaseContent.deleteMissing | Boolean | No (default: false) | Delete entries in the database that aren't specified in the import file. |
| updateVehiclePositionsInterval | Number | No (default: 60000) | How often to update the vehicle positions (server-side) to the database in ms. |
| invalidParkCheck | Object | No | Settings for checking invalid parking. |
| invalidParkCheck.interval | Number | No (default: 600000) | How often to check if a vehicle is parked invalidly in ms. |
| invalidParkCheck.towWhenParkedFor | Number | No (default: 60000) | Send tow request when a vehicle is parked invalidly for given time in ms. |
| allowParkingOtherPlayersVehicles | Boolean | No (default: true) | If true, players can park other players vehicles in garages. |
| dispatchOn | Object | Yes | Settings about if to dispatch on certain events. |
| dispatchOn.stolenNpcVehicleParking | Boolean | No (default: false) | Send a dispatch event when a stolen NPC vehicle is being parked by a player. |
Client configuration
You can find the client configuration under config/client/config.ts.
Danger
DO NOT edit the config file that is located at dist/config/client/config.js!
It will be overwritten when the config changes and you will miss out on type safety (checks).
| Key | Type | Required / Default | Description |
|---|---|---|---|
| garageAdminCommand | String | Yes | The garage admin command. |
| moneyIcon | String | Yes | The icon used for money display. |
| valetMinimumDistance | Number | Yes | Minimum spawn distance for the valet request. |
| valetMaximumDistance | Number | Yes | Maximum spawn distance for the valet request. |
| valetDriverModel | String | Yes | Ped model used for the valet driver. |