Ah ok. At the moment i insert the stuff in onexit and onenter so when leaving or entering the car.
Only thing is we use advancedgarage and als when we take the vehicle out of the pound we can duplicate it. Cant find a way to delete the one when its out there.
seems a bit tricky.
in my test server i added āpoundedā column in db to all car, and when it pound its change to true, and when get out its change to false.
And pound vehicle list call only punded=true cars.
this fix helped me. But there is still a fix for the pounded section.
after connecting it is possible the car on the basis of the yellow circle to double the car
yes i have the same at the moment.
I think Deniel is correct. We would need to modify everythign with an new column or i will try maybe state 2 since there is only 1 and 0
Wird seems like sometimes the cars are on an other place where they never been.
Then i port to this place and cant see them. But this are the coords in the file.
can someone explain me please how i can use this with esx_drp_garage? I tried everything that i can think off, but i just dont get it to work.
It would be awesome if someone has a solution for me
thanksā„
Found the problem i think. Since npc cars can have the same plate as i have. WE are using a script from modfreakz for the vehicle store and it seems there is no plate being generated unique the are like the npc cars. This should make the problem
in vehicleshop not generate unique plate?
I tested it in test server 0 (zero problem with 10 palyers), then in live server, same a @StromaGames, every 40 sec one car spawn duplicateā¦
so idk how made itā¦
Hello, I follow the instruction give by @Deniel but when i stock the vehicle in the garage, it still in the json file. iām not sure if i do it correctly.
function StockVehicleMenu()
local playerPed = GetPlayerPed(-1)
if IsPedInAnyVehicle(playerPed, false) then
local playerPed = GetPlayerPed(-1)
local coords = GetEntityCoords(playerPed)
local vehicle = GetVehiclePedIsIn(playerPed,false)
local vehicleProps = ESX.Game.GetVehicleProperties(vehicle)
local current = GetPlayersLastVehicle(GetPlayerPed(-1), true)
local engineHealth = GetVehicleEngineHealth(current)
local bodyHealth = GetVehicleBodyHealth(current)
local fuel = GetVehicleFuelLevel(current)
local plate = vehicleProps.plate
ESX.TriggerServerCallback('eden_garage:stockv',function(valid)
if (valid) then
TriggerServerEvent('eden_garage:debug', vehicle)
--if engineHealth < 990 then
-- local fraisRep= 0--math.floor((1000 - engineHealth)/1000*Config.Price*Config.DamageMultiplier)
-- reparation(fraisRep,vehicle,vehicleProps)
--else
ranger(vehicle,vehicleProps,engineHealth,bodyHealth,fuel)
TriggerServerEvent('esx_jb_stopvehicledespawn:vehicleenteredingarage', networkid)
--end
else
TriggerEvent('esx:showNotification', _U('cannot_store_vehicle'))
end
end,vehicleProps)
else
TriggerEvent('esx:showNotification', _('no_vehicle_to_enter'))
end
end
In esx_jb_eden_garage2 where do I need to put those 2 lines?
This is not working
ESX.TriggerServerCallback('eden_garage:stockv',function(valid)
if(valid) then
for k,v in pairs (carInstance) do
if ESX.Math.Trim(v.plate) == ESX.Math.Trim(vehicleProps.plate) then
table.remove(carInstance, k)
end
end
local networkid = NetworkGetNetworkIdFromEntity(vehicle)
TriggerServerEvent('esx_jb_stopvehicledespawn:vehicleenteredingarage', networkid)
DeleteEntity(vehicle)
TriggerServerEvent('eden_garage:modifystate', vehicleProps.plate, true)
TriggerEvent('esx:showNotification', 'Tu vehĆculo ha sido guardado en el Garaje')
else
TriggerEvent('esx:showNotification', 'No puedes guardar este vehĆculo en el Garaje')
end
end,vehicleProps, KindOfVehicle, garage, vehicle_type)
Hi, i have the famous duplicate issue but i donāt know why, when i test it on my dev server, nothing bad and when i put it in my real server, the issue come. I think itās onesync who repair that, but iām not sure.