An interactive bike system for FiveM, compatible with ESX (old/new), QBCore and QBox.
- Spawn bikes from inventory items
- Pick up bikes and store them back in inventory via ox_target
- Automatic respawn if inventory is full
- Configurable bike models and animations
- ESX (old/new), QBCore and QBox support out of the box
- ox_inventory
- ox_target
- ESX: es_extended — or QBCore/QBox: qb-core
- Place the
22_bikesfolder in yourresources/directory - Add
ensure 22_bikesto yourserver.cfg - Import bike items into ox_inventory (see
items/items.txt) - Configure
config.lua
-- 'esx' | 'qb' | 'qbox'
Config.Framework = 'qb'
-- 'old' | 'new' (ignored if Framework ~= 'esx')
Config.ESXMode = 'new'Config.BikeModels = {
'bmx',
'cruiser',
'fixter',
'scorcher',
'tribike',
'tribike2',
'tribike3'
}Config.Animations = {
Dict = 'mini@repair',
Name = 'fixing_a_ped',
Duration = {
Spawn = 1000, -- ms before spawn
Pickup = 1500 -- ms before storing
}
}Config.Messages = {
InventoryFull = "You don't have enough space in your inventory.",
BikeRespawned = "Your inventory is full. The bike has been placed back."
}| Action | How |
|---|---|
| Spawn a bike | Use the bike item from your inventory |
| Store a bike | Target the bike with ox_target → Pick up bike |
| Inventory full | The bike is automatically placed back in front of the player |
22_bikes/
├── fxmanifest.lua
├── config.lua
├── bridge/
│ ├── client.lua ← framework abstraction (ESX/QB/QBox)
│ └── server.lua
├── client/
│ └── client.lua
├── server/
│ └── server.lua
└── items/
├── items.txt
└── img/
22scripts, xLaugh