RegisterNetEvent("delall") AddEventHandler("delall", function () if Config.alerts then TriggerEvent("chatMessage", '', {255, 255, 255}, "^*^4[^8System^4]:^7 Vehicles will be wiped in 1 minute. Stay in your vehicle if you do not want it to be deleted.") Citizen.Wait(30000) TriggerEvent("chatMessage", '', {255, 255, 255}, "^*^4[^8System^4]:^7 Vehicles will be wiped in 30 seconds. Stay in your vehicle if you do not want it to be deleted.") Citizen.Wait(25000) TriggerEvent("chatMessage", '', {255, 255, 255}, "^*^4[^8System^4]:^7 Vehicles will be wiped in 5 seconds. Stay in your vehicle if you do not want it to be deleted.") Citizen.Wait(5000) end Citizen.Wait(1000) for vehicle in EnumerateVehicles() do if (not IsPedAPlayer(GetPedInVehicleSeat(vehicle, -1))) then if Config.OnlyWipeBroken == true then if GetVehicleEngineHealth(vehicle) <= 100.0 then SetVehicleHasBeenOwnedByPlayer(vehicle, false) SetEntityAsMissionEntity(vehicle, false, false) DeleteVehicle(vehicle) if Config.UseESX then ESX.Game.DeleteVehicle(vehicle) end DeleteEntity(vehicle) DeleteVehicle(vehicle) if Config.UseESX then ESX.Game.DeleteVehicle(vehicle) end DeleteEntity(vehicle) if (DoesEntityExist(vehicle)) then DeleteVehicle(vehicle) if Config.UseESX then ESX.Game.DeleteVehicle(vehicle) end DeleteEntity(vehicle) DeleteVehicle(vehicle) if Config.UseESX then ESX.Game.DeleteVehicle(vehicle) end DeleteEntity(vehicle) end end else SetVehicleHasBeenOwnedByPlayer(vehicle, false) SetEntityAsMissionEntity(vehicle, false, false) DeleteVehicle(vehicle) if Config.UseESX then ESX.Game.DeleteVehicle(vehicle) end DeleteEntity(vehicle) DeleteVehicle(vehicle) if Config.UseESX then ESX.Game.DeleteVehicle(vehicle) end DeleteEntity(vehicle) if (DoesEntityExist(vehicle)) then DeleteVehicle(vehicle) if Config.UseESX then ESX.Game.DeleteVehicle(vehicle) end DeleteEntity(vehicle) DeleteVehicle(vehicle) if Config.UseESX then ESX.Game.DeleteVehicle(vehicle) end DeleteEntity(vehicle) end end if Config.use10msdelay then Citizen.Wait(10) end end end if Config.DoneNotify then TriggerEvent("chatMessage", '', {255, 255, 255}, "^*^4[^8System^4]:^1 Vehicles have been wiped!") end end)