Skip to content

spectrumdevofficial/sd_fakeplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sd_fakeplate

Replace vehicle license plates using items integrated with ox_inventory and ox_lib.

Features

  • 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).

Requirements

  • ox_lib (init script and locale enabled)
  • ox_inventory (with items configured for your server)

Installation

  1. Place this resource into your server resources.
  2. Ensure dependencies and this resource in server.cfg:
    ensure ox_lib
    ensure ox_inventory
    ensure sd_fakeplate
  3. 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,
    },
  4. Adjust config.lua to match your item names and durability settings.
  5. Done.

Usage

  • Acquire a vehicleplate item (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 vehicleplate item via ox_inventory. If you have a usable screwdriver, 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.

Notes

  • 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:usedItem for the plate item.

Credits

  • Author: fashion.demon