qbcore-framework / qb-core

FiveM RP Framework Core :muscle:
GNU General Public License v3.0
585 stars 964 forks source link

[BUG] Shop open with keybind not working #1136

Closed promiiss033 closed 3 weeks ago

promiiss033 commented 3 months ago

Summary

cant open the shop with key E

Reproduction

dont have target enabled in the server config, but for someresone qb-shops wont open, error: qb-shops client > Main > 34, no such export keypressed in resource qb-core

local function listenForControl() if listen then return end CreateThread(function() listen = true while listen do if IsControlJustPressed(0, 38) then -- E exports['qb-core']:KeyPressed() TriggerServerEvent('qb-shops:server:openShop', { shop = currentShop }) listen = false break end Wait(0) end end) end

Expected behavior

..

Actual behavior

..

Additional context

..

Last Updated

latest version fresh install qb server

Custom Resources

n/a

Resource Rename

no

kaynegraham commented 3 months ago

Do you have the latest version of both resources, and is the core started before all other resources?

promiiss033 commented 3 months ago

Do you have the latest version of both resources, and is the core started before all other resources?

Its a fresh install so yes i assume

brandon1808 commented 3 months ago

Do you have target turn on on your server ?

TeamCR7 commented 3 months ago

-- TRY THIS --

local listen = false local currentShop = {} -- Ensure this is properly defined elsewhere

local function listenForControl() if listen then return end CreateThread(function() listen = true while listen do if IsControlJustPressed(0, 38) then -- E key exports['qb-core']:KeyPressed() TriggerServerEvent('qb-shops:server:openShop', currentShop) listen = false break end Wait(0) end end) end

github-actions[bot] commented 1 month ago

This issue has had 60 days of inactivity & will close within 7 days