qbcore-framework/qb-lapraces

Need help with the keybindings for tire distance.

Closed this issue · 1 comments

So I am trying to change the keybind for tire distance but I can't find where to change it at. When I use the default one I can only lower the distance but can't make it higher after that.

@Foxerr1 You can find the tire distance keybinds here.

if IsControlJustPressed(0, 40) or IsDisabledControlJustPressed(0, 40) then

Please use the FiveM controls reference here https://docs.fivem.net/docs/game-references/controls/

Code for reference:

                if IsControlJustPressed(0, 40) or IsDisabledControlJustPressed(0, 40) then
                    if CreatorData.TireDistance + 1.0 ~= 16.0 then
                        CreatorData.TireDistance = CreatorData.TireDistance + 1.0
                    else
                        QBCore.Functions.Notify('You can not go higher than 15')
                    end
                end

                if IsControlJustPressed(0, 39) or IsDisabledControlJustPressed(0, 39) then
                    if CreatorData.TireDistance - 1.0 ~= 1.0 then
                        CreatorData.TireDistance = CreatorData.TireDistance - 1.0
                    else
                        QBCore.Functions.Notify('You cannot go lower than 2')
                    end
                end