Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Shop open with keybind not working #1136

Open
promiiss033 opened this issue Jul 25, 2024 · 4 comments
Open

[BUG] Shop open with keybind not working #1136

promiiss033 opened this issue Jul 25, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@promiiss033
Copy link

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

@promiiss033 promiiss033 added the bug Something isn't working label Jul 25, 2024
@kaynegraham
Copy link

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

@promiiss033
Copy link
Author

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
Copy link

Do you have target turn on on your server ?

@TeamCR7
Copy link

TeamCR7 commented Aug 2, 2024

-- 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants