This repository was archived by the owner on Apr 29, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 160
Ox.CreateVehicle plate issue #227
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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:
[INFO] 132873
[INFO]
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
