Hi,
For a long time, there has been an issue with setting the vehicle's license plate when using Ox.CreateVehicle.
Using the following code:
CreateThread(function()
local vehicle = Ox.CreateVehicle({
model = vehicleData.vehicleName,
owner = OxPlayer.charId,
properties = {
color1 = { r, g, b }
}
}, freeSpawnPoint.xyz, freeSpawnPoint.w)
Wait(500)
exports.ox_inventory:AddItem(source, 'carkeys', 1, {plate = vehicle.plate})
lib.print.info(vehicle.entity)
TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle.entity, -1)
lib.print.info(GetVehicleNumberPlateText(vehicle.entity))
end)
From time to time, instead of getting prints like:
[INFO] 132873
[INFO] IOI3M7F7
we get:
As a result, the vehicle is created with the wrong license plate, such as '202196', even though the correct plate 'IOI3M7F7' is stored in the database.
