It would be nice if the radialmenu:flipVehicle event was included in smallresources.
This makes more sense than keeping it in the radialmenu.
The event can be called flipVehicle:client:flip or qbx_smallresources:client:flip.
Ideal solution
--- [qbx]/qbx_smallresources/client/flipvehicle.lua
local config = require 'config.client'
RegisterNetEvent('flipVehicle:client:flip', function()
if cache.vehicle then return end
local coords = GetEntityCoords(cache.ped)
local vehicle = lib.getClosestVehicle(coords)
if not vehicle then return exports.qbx_core:Notify(locale('error.no_vehicle_nearby'), 'error') end
if lib.progressBar({
label = locale('progress.flipping_car'),
duration = config.flipTime,
useWhileDead = false,
canCancel = true,
disable = {
move = true,
car = true,
mouse = false,
combat = true
},
anim = {
dict = 'mini@repair',
clip = 'fixing_a_ped'
},
})
then
SetVehicleOnGroundProperly(vehicle)
exports.qbx_core:Notify(locale('success.flipped_car'), 'success')
else
exports.qbx_core:Notify(locale('error.cancel_task'), 'error')
end
end)
The problem
It would be nice if the
radialmenu:flipVehicle
event was included in smallresources. This makes more sense than keeping it in the radialmenu. The event can be calledflipVehicle:client:flip
orqbx_smallresources:client:flip
.Ideal solution
Alternative solutions
No response
Additional context
No response