DocsGarage

Commands and permissions

Player and admin commands and who may use them.

Not released yet. These pages are written from the code of manniche_garage and can change before the release.

Player commands

CommandWhoWhat it does
/ivJobs listed in an impound lot's jobsImpounds the nearest vehicle within 5 metres. Opens a form for lot, reason, whether the owner may collect it, waiting time in hours and fee. The name comes from Config.ImpoundCommand. The server checks job and grade, distance (ServerConfig.ImpoundDistance) and the limits ImpoundMinFee, ImpoundMaxFee and ImpoundMaxHours
/privategaragesEveryone, or the jobs in Config.PrivateDashboardJobsOpens the list of the player's private garages

Garages and impound lots are opened at their access point with the method set in Config.Interaction. The resource registers no key mappings. Config.OpenStoreKey (default 38) is read as a control.

Admin commands

These commands are restricted to ServerConfig.AdminPrincipals through ox_lib's lib.addCommand.

CommandArgumentsWhat it does
/garageadminnoneOpens the admin menu (name from Config.AdminCommand). It needs a player, not the console
/setjobvehiclejob, optional plateMakes an owned vehicle belong to a job. Without a plate: the vehicle you sit in. The job must exist
/removejobvehicleoptional plateGives a job vehicle back to the player who owns it
/setgangvehiclegang, optional plateMakes a vehicle belong to a gang. QB-Core and Qbox only
/removegangvehicleoptional plateGives a gang vehicle back to the player who owns it
/vreturnoptional platePuts a vehicle back. A spawner vehicle is deleted, an owned vehicle goes back to its garage, an impounded one is released without a fee
/vplateoptional plateChanges the plate of the owned vehicle you sit in. Without a plate it opens a dialog
/dvdbnoneDeletes the vehicle you sit in from the database and the world
/admincarnoneSaves the vehicle you sit in as your own

The job and gang vehicle commands and /vreturn also work from the server console when you give a plate.

Permissions

Set who counts as an admin in config/server.lua:

ServerConfig.AdminPrincipals = { 'group.admin' }
  • The default is { 'group.admin' }, and { 'qbcore.admin', 'qbcore.god' } on QB-Core.
  • ESX and Qbox groups are ACE principals such as group.admin.
  • Anything from server.cfg works too, for example identifier.license:....
The admin menu callbacks and the in-game settings check the ACE permission command.garageadmin (command. plus Config.AdminCommand) on every call. If you rename the command, make sure your admins hold that permission.

Admin menu

/garageadmin creates, changes, turns off and deletes garages and impound lots without editing a config file.

  • Every save is checked on the server and names the version it read. If two admins save the same item, the second save is refused and the list reloads.
  • Up to 32 spawn points per garage, each within ServerConfig.AdminMaxSpawnDistance of the access point.
  • Import copies config/garages.lua into the database again, also entries you deleted. Names that already exist are left alone.
  • Settings listed in the menu are stored in manniche_garage_settings and apply without a restart.