Can someone please make a /dv or delgun or vehicle cleanup sricpt that works with onesync?

As the title suggests. I was wondering if someone could make a dv script that works with onesync. all available scripts used to delete locked, blown up or flipped vehicles do not work with onesync in my experience.

Thanks,
Whit3Xlightning

sorry to anyone that saw this in the releases. I accidentally clicked the wrong category when creating.

All good. Make sure to double check where you post :stuck_out_tongue:

Does Vespura’s work for you? Or have you tried it?

I didn’t know that Vespura had one, it’s not on his website or GitHub… mind linking it?

1 Like

Hmmm. I’m sure he did. I’ll link a few though!

I’ve tried


Maybe try those, it should not be an issue in one-sync.

I’ve already tried the first one and the secound is the first one with vRP perm support

Did you or someone found a solution with Delete Vehicles?

Guess not huh

1 Like

VMenu’s Clear area option in misc settings is pretty much perfect. You’re always gonna get that one stubborn vehicle that won’t delete but I find driving some distance and returning to the area the vehicle has vanished.

saw this snippet on esx discord

RegisterNetEvent('esx:deleteVehicle')
AddEventHandler('esx:deleteVehicle', function()
    local playerPed = PlayerPedId()
    local vehicle   = ESX.Game.GetVehicleInDirection()
    local entity = vehicle
    carModel = GetEntityModel(entity)
    carName = GetDisplayNameFromVehicleModel(carModel)
    NetworkRequestControlOfEntity(entity)
    
    local timeout = 2000
    while timeout > 0 and not NetworkHasControlOfEntity(entity) do
        Wait(100)
        timeout = timeout - 100
    end

    SetEntityAsMissionEntity(entity, true, true)
    
    local timeout = 2000
    while timeout > 0 and not IsEntityAMissionEntity(entity) do
        Wait(100)
        timeout = timeout - 100
    end

    Citizen.InvokeNative( 0xEA386986E786A54F, Citizen.PointerValueIntInitialized( entity ) )
    
    if (DoesEntityExist(entity)) then 
        DeleteEntity(entity)
    end 
end)

Is this still an issue?