πŸ“–
Documentation
  • Welcome!
  • Common Issues
    • Keymaster
    • Updating resources
  • πŸ“„Scripts
    • πŸš™AdvancedParking
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • Events (server)
      • Events (client)
      • FAQ
    • 🚚VehicleTransport
      • Installation
      • How to use it
      • Creating a new transport
      • Exports (client)
      • Events (server & client)
    • πŸ”‘VehicleKeyChain
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • FAQ
    • πŸ—œοΈVehicleClamp - Pre-Release
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • Integration
        • ESX
        • QB
    • πŸ“„VehicleRegistration
      • Installation
      • Exports (server)
      • Exports (client)
    • πŸ“ƒVehicleInteraction
      • Installation
    • πŸ—ΊοΈVehicleTracker
      • Installation
      • Exports (server)
      • Exports (client)
    • 🌐JobTracker
      • Installation
    • πŸ•΅οΈβ€β™‚οΈVehicleForceFirstPerson
      • Installation
    • 🎯BulletRicochet
      • Installation
  • πŸ†“Free Scripts
    • πŸ“žkimi_callbacks
      • Installation
      • Exports (server)
      • Exports (client)
      • Examples
    • 🚜VehicleDeformation
      • Installation
      • Exports (server)
      • Exports (client)
    • 🎦OrbitCam
      • Installation
      • Exports (client)
      • Commands
    • πŸ”οΈEarthquakeSimulator
      • Installation
      • Exports (server)
      • Commands
    • πŸ’€DeathCam
      • Installation
Powered by GitBook
On this page
  • ChangePlate
  • GetFullHistory
  • GetHistory
  • GetPlateHistory
  1. Scripts
  2. VehicleRegistration

Exports (server)

ChangePlate

Returns the position of a single vehicle.

Parameters: playerId - int - The player id of the player that owns the vehicle. vehicleNetId - int - The vehicle network id. newPlate - string - The new license plate text of a vehicle.

Returns: bool - True on success.

local success = exports["VehicleRegistration"]:ChangePlate(playerId, vehicleNetId, newPlate)


GetFullHistory

Get the full history of all plate changes from a player.

Parameters: playerId - int - The player id of the player that owns the vehicle. vehicleNetId - int - The vehicle network id. newPlate - string - The new license plate text of a vehicle.

Returns: dictionary<string, table<modelHash: int, oldPlate: string, date: string, ownerName: string>> - List of all plate changes with the current plate as index.

local history = exports["VehicleRegistration"]:GetFullHistory(playerId)
for plate, data in pairs(history) do
    print("model hash:", data.modelHash)
    print("old plate:", data.oldPlate)
    print("date:", data.date)
    print("owner name:", data.ownerName)
    print("")
end


GetHistory

Get the history of a specific player's plate.

Parameters: playerId - int - The player id of a player. plate - string - The license plate text of a vehicle.

Returns: table<table<oldPlate: string, date: string, ownerName: string>> - List of all plate changes from the specified plate.

local history = exports["VehicleRegistration"]:GetHistory(playerId, plate)
for i = 1, #history do
    print("old plate:", history[i].oldPlate)
    print("date:", history[i].date)
    print("owner name:", history[i].ownerName)
    print("")
end


GetPlateHistory

Get the history of a specified plate.

Parameters: plate - string - The license plate text of a vehicle.

Returns: table<table<oldPlate: string, date: string, ownerName: string>> - List of all plate changes from the specified plate.

local history = exports["VehicleRegistration"]:GetPlateHistory(plate)
for i = 1, #history do
    print("old plate:", history[i].oldPlate)
    print("date:", history[i].date)
    print("owner name:", history[i].ownerName)
    print("")
end
PreviousInstallationNextExports (client)

Last updated 9 months ago

πŸ“„
πŸ“„