Coder Social home page Coder Social logo

Vehicle Extras about qb-radialmenu HOT 10 CLOSED

bgibson6828 avatar bgibson6828 commented on August 22, 2024 2
Vehicle Extras

from qb-radialmenu.

Comments (10)

Bycarbon avatar Bycarbon commented on August 22, 2024

This is a issue with the Radial Menu to apply the vehicle. When using a external ExtraMenu BEFORE using Radial, it works as intended.

from qb-radialmenu.

Johnsmodifications avatar Johnsmodifications commented on August 22, 2024

Having a similar issue, mine doesn't show up at all.

from qb-radialmenu.

xCoryux avatar xCoryux commented on August 22, 2024

The error keeps popping up. If you change the code for the previous one, it works fine.

RegisterNetEvent('qb-radialmenu:client:setExtra')
AddEventHandler('qb-radialmenu:client:setExtra', function(data)
local string = data.id
local replace = string:gsub("extra", "")
local extra = tonumber(replace)
local ped = PlayerPedId()
local veh = GetVehiclePedIsIn(ped)
local enginehealth = 1000.0
local bodydamage = 1000.0

if veh ~= nil then
    local plate = GetVehicleNumberPlateText(closestVehicle)

    if GetPedInVehicleSeat(veh, -1) == PlayerPedId() then
        if DoesExtraExist(veh, extra) then 
            if IsVehicleExtraTurnedOn(veh, extra) then
                enginehealth = GetVehicleEngineHealth(veh)
                bodydamage = GetVehicleBodyHealth(veh)
                SetVehicleExtra(veh, extra, 1)
                SetVehicleEngineHealth(veh, enginehealth)
                SetVehicleBodyHealth(veh, bodydamage)
                QBCore.Functions.Notify('Extra ' .. extra .. ' Desactivado', 'error', 2500)
            else
                enginehealth = GetVehicleEngineHealth(veh)
                bodydamage = GetVehicleBodyHealth(veh)
                SetVehicleExtra(veh, extra, 0)
                SetVehicleEngineHealth(veh, enginehealth)
                SetVehicleBodyHealth(veh, bodydamage)
                QBCore.Functions.Notify('Extra ' .. extra .. ' Activado', 'success', 2500)
            end
        else
            QBCore.Functions.Notify('Extra ' .. extra .. ' no está presente en este vehículo ', 'error', 2500)
        end
    else
        QBCore.Functions.Notify('¡No eres conductor de un vehículo!', 'error', 2500)
    end
end

end)

from qb-radialmenu.

BerkieBb avatar BerkieBb commented on August 22, 2024

Does anyone have a specific vehicle and extra they tried that I can test it with?

from qb-radialmenu.

Bycarbon avatar Bycarbon commented on August 22, 2024

Does anyone have a specific vehicle and extra they tried that I can test it with?

I know for certain it was doing it on the OCRP Law Enforcement Pack 110%, but I didnt use many other modded vehicles at the time.

from qb-radialmenu.

BerkieBb avatar BerkieBb commented on August 22, 2024

I don't have any addon cars, test some gta cars

from qb-radialmenu.

BerkieBb avatar BerkieBb commented on August 22, 2024

They work fine for me

from qb-radialmenu.

BlueSky-fur avatar BlueSky-fur commented on August 22, 2024

it seems to only be an issue with addon vehicles.

wouldnt it be smarter to just add Vehicle Extras to choose at bennys so that they also get actually saved into the DB?

from qb-radialmenu.

BerkieBb avatar BerkieBb commented on August 22, 2024

No, if it's an issue with addon vehicles, it means that something is wrong in either the carcols or carvariations meta files

from qb-radialmenu.

Ghavio1516 avatar Ghavio1516 commented on August 22, 2024

do you guys have any fix yet? i still need to /fix the vehicle for the extras to show up onto the car

from qb-radialmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.