kasuganosoras / esx_realparking

🅿️ A real car parking script for FiveM
GNU General Public License v3.0
51 stars 31 forks source link

Vehicles don't despawn, and spawn again #11

Open ghost opened 4 years ago

ghost commented 4 years ago

Ssometime (it's random) when i go in a parking, vehicles don't despawn but spawn again. All cars are duplicated with that issue. Here is a screenshot of the only error i have (in f8 console) image

ghost commented 4 years ago

btw, the bug happenned again and again until we delete all cars and restart the resource image

fiesi commented 3 years ago

I also have the problem that the cars double or triple partially park out.

kasuganosoras commented 3 years ago

That is look like somethings block the script to delete the car. I will fix it soon.

fiesi commented 3 years ago

Do you have fix the bug?

kasuganosoras commented 3 years ago

No, I have plan to rewrite this script

xXcarlos117Xx2 commented 3 years ago

image

Happened the same to me. Do you need helping rewriting?

Did you tried with ESX.Game.DeleteVehicle()?

Edit: I tried, i even try to edit the DeleteVehicle() script but it doesn't matter. Maybe forcing a /dv in every vehicle of the parking when you are out of the zone?

Ahmed-Abdelbary commented 3 years ago

@kasuganosoras

I think i have found the issue:

This Line

local tmpModel = GetEntityModel(veh)

it should be

local tmpModel = GetEntityModel(LocalVehicles[i].entity)