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): fix vehicle model extraction
This commit is contained in:
@@ -38,10 +38,10 @@ Core.vehicleClass = {
|
|||||||
vehicleProps = json.decode(vehicleProps)
|
vehicleProps = json.decode(vehicleProps)
|
||||||
|
|
||||||
if type(vehicleProps.model) ~= "number" then
|
if type(vehicleProps.model) ~= "number" then
|
||||||
model = joaat(model)
|
vehicleProps.model = joaat(vehicleProps.model)
|
||||||
end
|
end
|
||||||
|
|
||||||
local netId = ESX.OneSync.SpawnVehicle(model, coords.xyz, coords.w, vehicleProps)
|
local netId = ESX.OneSync.SpawnVehicle(vehicleProps.model, coords.xyz, coords.w, vehicleProps)
|
||||||
if not netId then
|
if not netId then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -56,7 +56,7 @@ Core.vehicleClass = {
|
|||||||
plate = plate,
|
plate = plate,
|
||||||
entity = entity,
|
entity = entity,
|
||||||
netId = netId,
|
netId = netId,
|
||||||
modelHash = model,
|
modelHash = vehicleProps.model,
|
||||||
owner = owner,
|
owner = owner,
|
||||||
}
|
}
|
||||||
Core.vehicles[plate] = vehicle
|
Core.vehicles[plate] = vehicle
|
||||||
|
|||||||
Reference in New Issue
Block a user