manniche_garage and can change before the release.Requirements
The fxmanifest.lua lists two dependencies. Both must be started before the resource.
ox_liboxmysql
You also need one supported framework: ESX Legacy (es_extended), QB-Core (qb-core) or Qbox (qbx_core).
Optional scripts
ox_targetorqb-targetforConfig.Interaction = 'target'- A fuel script, a vehicle keys script, a notification script and a text UI script. See Integrations.
esx_addonaccountto pay a society account on ESX
Install
- Put the
manniche_garagefolder in your resources folder. - Add the resource to
server.cfgafter your framework,ox_libandoxmysql. - Edit
config/config.lua(shared) andconfig/server.lua(server only). - Give your admins the right in
ServerConfig.AdminPrincipals. See Commands and permissions. - Start the server and check the console. See First run.
ensure ox_lib
ensure oxmysql
ensure es_extended
ensure manniche_garage
Replace es_extended with qb-core or qbx_core on those frameworks.
web/ (ui_page 'web/index.html'). There is no web/dist folder and no build step.Database
With Config.AutoCreateTables = true (the default), the resource runs sql/install.sql on start. Every statement is CREATE TABLE IF NOT EXISTS, so running it again only adds what is missing.
To import it yourself, set Config.AutoCreateTables = false and run sql/install.sql.
Tables created
| Table |
|---|
manniche_garage_vehicles |
manniche_garage_garages |
manniche_garage_favourites |
manniche_garage_log |
manniche_garage_impounds |
manniche_garage_impound_records |
manniche_garage_spawner_vehicles |
manniche_garage_spawner_active |
manniche_garage_seeded |
manniche_garage_settings |
manniche_garage_history |
manniche_garage_shares |
manniche_garage_private |
manniche_garage_private_members |
manniche_garage_borrows |
manniche_garage_trailers |
manniche_garage_interiors |
Import existing vehicles
Optional. Run sql/import_owned_vehicles.sql once, after install.sql. It inserts a state row in manniche_garage_vehicles for every row in owned_vehicles. Vehicles with stored = 1 become stored, all others become out. Without it, the rows are created on first contact.
owned_vehicles. The file itself is written for the ESX table name.Frameworks and detection
Config.Framework = 'auto' picks the first of these that is started (state started or starting):
qbx_coregives Qbox ('qbx')qb-coregives QB-Core ('qb')- otherwise ESX (
'esx')
Set 'esx', 'qb' or 'qbx' to force one.
First run
When start-up is done, the console prints one line:
[manniche_garage] ready: 2 garages (2 new from config), 1 impound lots, 0 vehicles fixed, 0 spawner rows cleared
The numbers depend on your server. The line shows how many garages and lots were loaded, how many garages came from Config.SeedGarages, and how many vehicles the start-up clean-up fixed.
Then walk to a garage access point (the default seed garage legion is at Legion Square) and open it. Admins can run /garageadmin.