mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
fix(es_extended/server/classes/vehicle): properly object to new vehicle plate
This commit is contained in:
@@ -147,7 +147,14 @@ Core.vehicleClass = {
|
|||||||
|
|
||||||
Entity(xVehicle.entity).state:set("plate", plate, false)
|
Entity(xVehicle.entity).state:set("plate", plate, false)
|
||||||
SetVehicleNumberPlateText(xVehicle.entity, plate)
|
SetVehicleNumberPlateText(xVehicle.entity, plate)
|
||||||
|
|
||||||
|
local oldPlate = xVehicle.plate
|
||||||
xVehicle.plate = 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
|
return true
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user