fix(client/vehicle): return vehicle entity

This commit is contained in:
Andyyy7666
2023-08-27 01:23:06 +02:00
parent bde1f5b0bb
commit 45fe62c7c5

View File

@@ -335,9 +335,9 @@ lib.callback.register("ND_Vehicles:getNearbyVehicleById", function(vehId)
local vehicles = lib.getNearbyVehicles(coords, 25.0, true) local vehicles = lib.getNearbyVehicles(coords, 25.0, true)
for i=1, #vehicles do for i=1, #vehicles do
local veh = vehicles[i] local veh = vehicles[i]
local state = Entity(veh).state local state = Entity(veh.vehicle).state
if state and state.id == vehId then if state and state.id == vehId then
return VehToNet(veh) return VehToNet(veh.vehicle)
end end
end end
end) end)