Replace vehicle license plates using items integrated with ox_inventory and ox_lib.
- Use a plate item (default:
vehicleplate) to set the vehicle's displayed plate. - Automatically gives you the previous plate back as an item with metadata (label = old plate).
- Progress bar, animation, and prop handling via ox_lib.
- Optional screwdriver durability drain on use.
- Distance and state checks: must be near the plate and outside the vehicle.
- Localized notifications/messages (EN, CS included).
- ox_lib (init script and locale enabled)
- ox_inventory (with items configured for your server)
- Place this resource into your server resources.
- Ensure dependencies and this resource in
server.cfg:ensure ox_lib ensure ox_inventory ensure sd_fakeplate
- Configure items in
ox_inventory(example):-- items.lua (example) ["vehicleplate"] = { label = "Vehicle plate", weight = 100, stack = false, close = true, consume = 0, }, ["screwdriver"] = { label = "Screwdriver", weight = 500, stack = false, durability = 100, consume = 0, },
- Adjust
config.luato match your item names and durability settings. - Done.
- Acquire a
vehicleplateitem (it will auto-generate a random plate if created without metadata). - Stand next to a vehicle's plate (≤ 1m, and ≤ 5m from the vehicle), not sitting inside.
- Use the
vehicleplateitem via ox_inventory. If you have a usablescrewdriver, the progress will play and the swap will complete. - On success:
- The used plate item is consumed.
- Your current vehicle plate becomes an item in your inventory (metadata.plate + metadata.label).
- The vehicle's displayed plate is updated and ox_inventory vehicle data is updated.
- If enabled, the screwdriver's durability is reduced.
- The real/original plate is tracked on the entity state (
Entity(vehicle).state.plate) to preserve ownership info. - No commands are provided; the system hooks into
ox_inventory:usedItemfor the plate item.
- Author:
fashion.demon