Giter Site home page Giter Site logo

qb-shops's Introduction

qb-shops

Shops For QB-Core

License

QBCore Framework
Copyright (C) 2021 Joshua Eger

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>

qb-shops's People

Contributors

aj-devs avatar athul-aravind-k avatar ayatollah avatar berkiebb avatar buntyverma69 avatar dannysrp avatar developer-bear avatar dhawgy avatar evanillaa avatar fjamzoo avatar ghzgarage avatar goncalocarvalho95 avatar ihyajb avatar izmystic avatar kamuikody avatar midnight121 avatar nelxxdev114 avatar nemadev avatar newtonzz avatar nicodk6400 avatar pride1922 avatar r0adra93 avatar s33g avatar suelthedev avatar theilleniumstudios avatar tom-osborne avatar tonybynmp4 avatar trclassic92 avatar tvjerkku avatar z3rio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qb-shops's Issues

[BUG]

To Reproduce
Steps to reproduce the behavior:

  1. Go to shop with multiple people some will see ped some will not

Questions (please complete the following information):

  • When you last updated: [e.g. last week] today
  • Are you using custom resource? which ones? [e.g. zdiscord, qb-target] no
  • Have you renamed qb- to something custom? [e.g. yes/no] no

Additional context
Add any other context about the problem

Some players see peds some do not it's completely random

trash

every since they put peds in the script it dont work now my shops all dont work and I cant find the old one where its jsut the shop L

Nothing Is working....

I tryed reinstalling different kinds of versions of the script and still cant get it too work...

[BUG]

Describe the bug
I have a problem where the peds are invisible in all the shops... the thing is that some can see them and some not.

Expected behavior
The bed should be there all the time

Screenshots
https://imgur.com/AGM45fm - This is me
https://imgur.com/FsF6FoE - This is my friend

Questions (please complete the following information):

  • When you last updated: [e.g. last week] = We are on a month old qb-core
  • Are you using custom resource? which ones? [e.g. zdiscord, qb-target] = basic qb-target
  • Have you renamed qb- to something custom? [e.g. yes/no] = no

hardware stores dont sell

when i go to normal shops. it works fine, i can make purchases, but when i go to a hardware store, and drag something, it doesn't sell me anything, nor deduct anything from my account.

[Suggestion] Shop purchase comes from society

So we use some shops for player-owned businesses as their "Inventory" but when the employee "buys" the item it takes it from their bank etc. Wondering if we can add a config to each shop config (shopbill = 'societyname') or whatever so that when the employee gets the item the "Cost" comes out of society and then they can wack on margin/price for the customer when they do the /bill function and such.

Weapon License is not working correctly

Describe the bug
Was testing the weapon shops with a friend and as a cop I used "/grantlicense [ID] weapon" to give him a weapons license. He gets the notification but has nothing in his inventory. Then tries to buy a gun and still gets the message that he needs a license. So I did it again using the command and it says he has a license.

I then used the same command to give one to myself and had the same result as a cop.

I looked in qb-core shared configs to make sure it is in the items list and weapons license is there.

anyone else run into this and know how to fix it?

[BUG]

After granting a weapons license to a player and he goes to the weapon shop the playerdata is never updated, it still contains the old meta list. So when he wants to open the shop the PlayerData.metadata["licences"].weapon will return false if he doesnt relog.

To Reproduce

  • grant a player a weapon license
  • go to the weapon shop and try to open the shop
  • you need to relog to fix this problem

Expected behavior
after granting a license there should be no need to relog to be able to buy a weapon.

Questions (please complete the following information):

  • fully up to date server
  • no custom scripts

if already put a pull request in and how to solve this simple issue #118

[BUG?] Shops qty not freshing

Couldn't get an answer on the discord so figured i'd just pop on here.

I can see a few keywords in the code about refreshing shop stock, but I assume this is on reboot of server. It would be nice to have a config that enables automatic restocking or as it is now here stock resets on restart.

This will remove the need to set some items as 99999 to esnure stock is there on items purchased in high volumes but are not avaliable in lots of places.

Im not sure if the design is intended to reset instantly or not, I like both options because forcing people to drive to another shop ensures roleplay and such.

Nothing Works

No errors in live console just doesnt work in game I had made a error on the old shop script without peds now I updated to this one and it doesnt work Im using a different map but I load in Los Santos to test the server still not working and whenever you change cords it shows a error

suggestion shop and jobs

I hope you can add this option
The purchase is only open to those who hold the rank of a job
example
[1] = {
name = "cleaningkit",
price = 125,
amount = 25,
type = "item",
slot = 1,
},
[2] = {
name = "nitrous",
price = 500,
amount = 25,
type = "item",
slot = 2,
},
[3] = {
name = "repairkit",
price = 125,
amount = 25,
type = "item",
slot = 3,
requiresJob = "mechanic"
},
[4] = {
name = "advancedrepairkit",
price = 250,
amount = 25,
info = {},
type = "item",
slot = 4,
requiresJob = "mechanic"
},

forgotten shops

don't forget to do
[1] = vector4(-)

As at the moment they have the old PR numbers. ie 7,8.9 on the 24/7 vectors ect

If you dont interact

If you go into a store and walk up to the counter and don't interact with it and leave the store. The next time you press E it will open the store menu

247supermarket5 missing

247supermarket5 is missing, so only shows 5 247 stores. so add this between line 454-455.

    ["247supermarket5"] = {
        ["label"] = "24/7 Supermarket",
        ["coords"] = {
            [1] = vector4(1959.82, 3740.48, 32.34, 301.57)
        },
        ["ped"] = {
            ["model"] = 'mp_m_shopkeep_01'
        },
        ["radius"] = 1.5,
        ["products"] = Config.Products["normal"],
        ["showblip"] = true,
        ["blipsprite"] = 52
    },

Target didnt work

My qb-shops didnt work with target i already use the eye to the ped but can open....

[BUG?] Smoke on the water shop (counter collision issue with target?)

Describe the bug
Not 100% sure if it's me or not, but the ped behind the counter cannot be targeted anymore from the outside of the counter, if you clip behind him, you can interact. Noticed this since update 3 days ago and ran through the scripts to double check the updates.

Not 100% sure if it's just ours or it's an actual bug, but I guess it can be validated pretty quickly.

To Reproduce
Steps to reproduce the behavior:

  1. Try use the ped at smoke on the water

Expected behavior
Target sees the ped and opens shop

Screenshots
If applicable, add screenshots to help explain your problem.

Questions (please complete the following information):

  • When you last updated: 2 days
  • Are you using custom resource? which ones? No
  • Have you renamed qb- to something custom? Yes

Additional context
I've tried to up the radius on the shop to 6.0 and then to 10.0 just to see and it doesn't do anything. Soon as I move the ped out from behind the counter it works:
https://i.imgur.com/glXp4Ts.png

Error (local 'licenseTable')

when access any "shop" we are geeting this error
[ script:qb-shops] SCRIPT ERROR: @qb-shops/server/main.lua:26: attempt to index a nil value (local 'licenseTable') [ script:qb-shops] > TriggerCallback (@qb-core/server/functions.lua:102) [ script:qb-shops] > handler (@qb-core/server/events.lua:116)
the entire server is a new install as of October 17, 2021 @0400 central

Trouble shop weapons

If the player obtained a license to buy weapons
He can buy weapons without having his gun license in his inv
It must be checked whether the player, after obtaining the license, has the card inside the inv

Issues with spawning peds and using them

16507155771898438484576811109247
some peds are not spawning, after using "restart qb-shops" in a row they spawn and others disappear. if i "scare" them they wont let me qb-target them anymore

[BUG] / [ENHANCEMENT] Can Break Peds With Cornerselling

Describe the bug
Players can "cornersell" near shop peds and remove their frozen state, the ped will follow the player around until they interact with them and then flee or walk off from the store and remove the shop until qb-shops is restarted.

To Reproduce
Steps to reproduce the behavior:

  1. Have Drugs
  2. Walk into store
  3. Cornersell.

Solution
SetEntityDynamic(ShopPed[k], true)

This is the solution that I've found works, the Ped will ignore the player and can still be interacted with.

[BUG]

Describe the bug
Just downloaded the new qb-shops and started the server and this error pops up

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'fivem'
  2. Click on 'my server'
  3. Use this item 'can't get in to see' (item's name from shared.lua if applicable)
  4. See error

Expected behavior
to start up

Screenshots
image

Questions (please complete the following information):

  • Today
  • A lot [e.g. zdiscord]
  • Have you renamed qb- to something custom? NO[e.g. yes/no]

Additional context
Add any other context about the problem here.

model's despawning after time

I have been using the updated qb shops recently, am having an issue where the ped models in the stores are despawning after a period of time. ensuring the resource replaces the peds and works as expected.

have not measured the time it take for them to despawn.

Shop Menu

If you go to a store and then continue walking you can press E at any point and open the store

[BUG] Shop inventory is persistent between players

I'm unsure if this is the desired behavior or a bug, but shop inventory seems to synchronize across players causing items to go out of stock for players if all the inventory is bought.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a configured shop
  2. Buy items
  3. Have someone else use the shop
  4. They will see the items with the reduced quantities based on what you bought

Expected behavior
I would have assumed the stock was client-based and independent for each player, but that's why I wanted to ask if this was a bug or intended behavior. It seems the shop quantities are synced inconsistently. A newly logging in player will see the shop at full stock, but then after a minute, the shop stock will show the same as mine with reduced item quantities. We can't reliably determine when shop stocks are reset besides through the qb-truckerjob resource delivering boxes.

Questions (please complete the following information):

  • When you last updated: Fresh copy from Github today
  • Are you using custom resource? which ones? lj-inventory
  • Have you renamed qb- to something custom? No

Players can view and purchase weapons without license

Players can walk up to ammunations and open the shop menu and purchase weapons even if they dont have a weapons license. The error on screen pops up that says you need a license and that the dealer refuses to show you weapons but once the text disappears the shop opens and you can buy weapons.

[BUG] Weapon Licence is not working

After granting weapon licence to player, they will buy it from cityhall go to weapon shop, but you still can't buy guns ect..

Config.FirearmsLicenseCheck = true -- Whether a arms dealer checks for a firearms license

Shops will not open.

No shops on the entire map will open. 24/7, hardware, ammunation. Target or E presents to open, but will not actually open the shop. Console doesnt show any errors.

[BUG]issue on load in

Describe the bug
error in f8 on loadin.
To Reproduce
Steps to reproduce the behavior:

  1. load into server
  2. Check f8
  3. https://gyazo.com/547b25346d825120fea368a56f5a2f6c
  4. See error

Expected behavior
no error

Screenshots
If applicable, add screenshots to help explain your problem.

Questions (please complete the following information):

  • When you last updated: all updates are current
  • Are you using custom resource? no]
  • Have you renamed qb- to something custom? [e.g. yes/no] no

Additional context
Add any other context about the problem here.

suggestion shop and jobs

I hope you can add this option
The purchase is only open to those who hold the rank of a job
example
[1] = {
name = "cleaningkit",
price = 125,
amount = 25,
type = "item",
slot = 1,
},
[2] = {
name = "nitrous",
price = 500,
amount = 25,
type = "item",
slot = 2,
},
[3] = {
name = "repairkit",
price = 125,
amount = 25,
type = "item",
slot = 3,
requiresJob = "mechanic"
},
[4] = {
name = "advancedrepairkit",
price = 250,
amount = 25,
info = {},
type = "item",
slot = 4,
requiresJob = "mechanic"
},

Shop menu follows ped instead of products

Using latest version.
Currently the way it operates, it puts all same ped model being able to open the shop, so it will be a problem for shops of selling different products using the same ped model. Including this valet standing in the front door of casino (I didn't spawn this ped in the config), he could do both sell chips and casino shop because of the same ped model both shops use.
shops

[SUGGESTION] Option to disable / enable peds

Is your feature request related to a problem? Please describe.
Option to disable / enable peds


Describe the feature you'd like
just a small idea but a config to disable / enable peds so you dont have to edit each shop to stop the peds from spawning.


Additional context
Add any other context or screenshots about the feature request here.

Gang Check

It would be grate if it could check for gangs like it check for jobs so that specific gangs can buy and distrubate specific items that regular players and rival gangs are not suppost to get easy access to. Maybe like this:

name = "lockpick",
price = 250,
amount = 50,
info = {},
type = "item",
slot = 4,
requiresGang = { "ballas" }

[BUG] SCRIPT ERROR: @qb-shops/client/main.lua:81: attempt to index a nil value (field 'metadata')

Describe the bug
i dont got any console error on start-up, but when i go shopping i cannot open the menu even if i see the notification. I got this error when i want to shopping ; SCRIPT ERROR: @qb-shops/client/main.lua:81: attempt to index a nil value (field 'metadata')
To Reproduce
Steps to reproduce the behavior:

  1. Go to shop
  2. Click on E to open the menu
  3. See error

Expected behavior
It should open the menu

[BUG] requiresLicense are gone

Describe the bug
Before The weapon shop was Require Weapon License but now its gone

Expected behavior
Should check Weapon licenses before weapon shop open

Questions (please complete the following information):

  • When you last updated: [last week]
  • Are you using custom resource? which ones? [no]
  • Have you renamed qb- to something custom? no]

Weapon serial numbers do not repopulate after you purchase a weapon

Steps to reproduce:

  1. Purchase a weapon from ammunation (note the serial number)
  2. Observe that the serial number of the weapon in the shop does not update
  3. Purchase a second weapon from ammunation

Result:
Both weapons have the same serial number. (Can be done infinite times)

Notes:

  • Closing and opening the shop repopulates the serial numbers (perhaps a short-term fix is force close the shop once a weapon is bought)
  • You can purchase stacks of weapons (I assume because the serial numbers are the same?)

See my fix for my mistake in my PR ( does not resolve above issue, however )
#13

how to custem hide blip from store

example
how to hide blip from one of the stores
can add option example

["beancoffee"] = {
    ["label"] = "Bean Machine Coffee",
    ["type"] = "normal",
    ["coords"] = {
        [1] = {
            ["x"] = -633.72,
            ["y"] = 236.15,
            ["z"] = 81.88,
        },
    },
    ["products"] = Config.Products["coffeeplace"],
    showblip = true or false
},

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.