fix(es_extended/server/classes/vehicle): properly object to new vehicle plate

This commit is contained in:
Kenshin13
2024-12-21 14:15:38 +01:00
parent 5656505e00
commit ea668afb3a
@@ -147,7 +147,14 @@ Core.vehicleClass = {
Entity(xVehicle.entity).state:set("plate", plate, false)
SetVehicleNumberPlateText(xVehicle.entity, plate)
local oldPlate = xVehicle.plate
xVehicle.plate = plate
Core.vehicles[plate] = table.clone(xVehicle)
Core.vehicles[self.plate] = nil
TriggerEvent("esx:changedExtendedVehiclePlate", xVehicle.plate, oldPlate)
Wait(0)
return true
end,