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