Instead of directly hitting
player_vehicles / owned_vehicles yourself, you call TS-Lib and let the correct bridge handle it.
Status & testing
| Garage system | Status | Tested by |
|---|---|---|
qb-garages | Tested | Toine |
esx_garage | Tested | Toine |
vms_garagesv2 | Experimental | waiting for feedback |
jg-advancedgarages | Experimental | waiting for feedback |
standalone | Tested | Toine |
Supported garage systems
Out of the box, TS-Lib supports:qb-garagesesx_garagevms_garagesv2jg-advancedgaragesstandalone
ts-lib/config.lua:
Config.Garages = 'auto', TS-Lib picks the first started resource listed in Config.Data.Garages.
Server-side API
Bridge.Garages.Server.Functions.IsVehicleOwned(plate, netId?)
Returns whether the given plate belongs to a vehicle known to the configured garage system.
qb-garages: checksplayer_vehicles.citizenidesx_garage: checksowned_vehicles.ownervms_garagesv2/jg-advancedgarages:- Use
player_vehicles/citizenidwhenConfig.Frameworkisqbcoreorqbox - Use
owned_vehicles/ownerotherwise
- Use
standalone:- Uses
Entity(entity).state.ownedwhennetIdis provided
- Uses
Bridge.Garages.Server.Functions.SetVehicleOutsideState(plate, state)
Updates the garage-related state of a vehicle when it is spawned or stored.
state = true→ vehicle is outside (not stored)state = false→ vehicle is stored (inside a garage)
qb-garages:- Updates
player_vehicles.state(0= outside,1= stored) - Triggers
qb-garages:server:UpdateOutsideVehicle
- Updates
esx_garage:- Updates
owned_vehicles.stored(false= outside,true= stored)
- Updates
vms_garagesv2:- When
state == true, clearsgarage,garageSpotID,parking_date
- When
jg-advancedgarages:- Updates
in_garageto0/1depending onstate
- Updates
standalone:- Returns
truewithout touching a database (you are expected to implement your own logic if needed)
- Returns