Integrations
Targeting, inventory, keys, gs-trucking, and gs-flatbeds. Edit the Lua in client/edit.lua and server/edit.lua.
If a supported resource is started, the hooks in client/edit.lua and server/edit.lua call it. If yours is not in the list, add a branch in those files. Do not rename the functions. The core calls them by name.
Targeting
-- auto order: ox_target → qb-target → qtarget → sleepless_interact → interact → is_interaction / inside-interaction
Config.Target = 'auto'
Config.TargetName = false -- only if you renamed the resource folder
Config.TargetDistance = 5.0
Config.UseTextUI = true -- false = GTA help text
Config.TextUIPosition = "right-center"
Config.OtherKeybind = "E" -- TextUI / help text / inside-interaction"auto" picks the first of those that is already started. It does not wait for a target resource that starts later. Force a name ('ox_target') if trailers starts before your target script.
Config.Target = false skips third-eye entirely. Prompts then use ox_lib TextUI (UseTextUI = true) or GTA help text (UseTextUI = false). Hitch, attach, and manage-trailer prompts all follow that.
inside-interaction uses is_interaction when that folder is started.
Inventory
Cargo stashes open from the UI or the target menu. The first started inventory resource wins.
Config.Inventory = {
Enable = true,
System = 'auto', -- or force a system name
ResourceName = false, -- renamed folder. false = defaults
Default = {
slots = 10,
weight = 24000, -- grams (ox_inventory / qb-inventory convention)
},
}"auto" order: ox_inventory → qb-inventory → ps-inventory → qs-inventory → origen_inventory → codem-inventory → tgiann-inventory → core_inventory → jpr-inventory → mf-inventory.
Enable = false hides inventory on every trailer. Per trailer:
inventory = { slots = 80, weight = 250000 }, -- override Default
inventory = false, -- hide on this model (dollies)
-- omit inventory to use DefaultStashes are named from the trailer plate: gs_trailer_<PLATE>. If the plate is empty, the id falls back to model + net id. The server checks distance before opening.
OpenTrailerInventory in server/edit.lua is where each inventory is opened. If yours is not in that list, add an elseif there. core_inventory stash sizes often come from its own inventory types. Add a matching type there if slots / weight do not apply.
Keys
CanUseTrailer and HasOwnership in client/edit.lua check keys before third-eye manage, and before putting you into a loaded vehicle. The first started resource wins:
- qbx_vehiclekeys
- qb-vehiclekeys
- qs-vehiclekeys
- wasabi_carlock
- mk_vehiclekeys
- MrNewbVehicleKeys
If none of those are started, both functions return true. Add an elseif if your lock script is missing.
VehicleAttachedOnTrailer turns the engine off, locks doors, and sets qb / qs lock state when those resources are started. VehicleDetachedFromTrailer turns the engine on and unlocks.
gs-trucking
Job trailers from gs-trucking set Entity(trailer).state.gs_trucking. CanVehicleBeAttachedToTrailer and CanUseTrailer return false for those, so players cannot steal cargo or third-eye a job trailer mid-run. Leave those branches in place if you run both resources.
gs-flatbeds
Config.TrailerBlacklist skips rollback / tow models so a tow script can own those beds. If you run gs-flatbeds, keep those hashes in the blacklist. The bundled list already includes common flatbed models.
Custom inventory or keys
Do not rename the globals. Add your resource next to the existing IsResourceOnServer checks:
- Client:
CanUseTrailer,HasOwnership,VehicleAttachedOnTrailer - Server:
OpenTrailerInventory
