Giter VIP home page Giter VIP logo

qb-drugs's Introduction

qb-drugs

Drugs Script 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-drugs's People

Contributors

ae453 avatar arsh939 avatar berkiebb avatar dannysrp avatar darknight2590 avatar emresudo avatar eupedrocecel avatar evanillaa avatar gamenew09 avatar ghzgarage avatar ihyajb avatar jay-fivem avatar jeann2013 avatar jonezkti avatar kamuikody avatar mentalillness avatar mjvanhaastert avatar newtonzz avatar nicodk6400 avatar notaestheticallyducko avatar r0adra93 avatar s33g avatar sanriku-gaming avatar shomytkd avatar suelthedev avatar theilleniumstudios avatar tom-osborne avatar tonybynmp4 avatar z3rio avatar zfbx 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  avatar  avatar  avatar  avatar

Watchers

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

qb-drugs's Issues

Cornerselling to animals

Currently the code will sell to any ped including animals so drugs can be sold to cows (lol)

I'm not sure how to fix this myself, if I do code a fix I will share.

image

Corner selling price is not changing.

I am trying to adjust the min and max of the selling of drugs. I would set Meth with a Min = 500 and a Max = 800 and I still get offers like 6 bags for 73 dollars. How do I fix this?

[BUG]

Describe the bug
When I go the dealer to start a mission, it sends me the product, and email, but does not way point it on the map, took look in live console, and got this error

 [      script:qb-core] SCRIPT ERROR: @qb-core/server/player.lua:353: attempt to call a nil value (method 'lower')
[      script:qb-core] > ref (@qb-core/server/player.lua:353)
[      script:qb-core] > handler (@qb-drugs/server/deliveries.lua:40)
[     script:qb-drugs] SCRIPT ERROR: error object is not a string

Isn't it suppose to set a waypoint? I use GKSPhone i am thinking that may be it?

[BUG] Deliveries

Describe the bug
When delivering drugs from a dealer in, the following error code shows up in the console when trying to deliver weed at the door:
[ script:qb-drugs] SCRIPT ERROR: @qb-drugs/server/deliveries.lua:42: attempt to index a nil value (local 'deliveryData')

The weedbrick is not removed from the inventory, and no cash or rep is given out. Any idea?

It is the latest qb-drugs from github, no changes made.

Made a new dealer with /newdealer command.

SUGGESTION

Could it be possible to add a cool down for the deliveries so that players are not exploiting it?

[BUG] stop selling drugs

we have the problem that when you stop selling the drugs, the inventory doesn't open for a while or you can't use other things, but at some point it works again?

[BUG] free drugs from dealer

When buying drugs with no money. If you drag the drug to your inventory and then immediately giving it to another player without closing the inventory it actually gives it to them.

[BUG]

Describe the bug
When i sell the last drug from my inventory it gives an error. It doesn't matter if the selling quantity is 1x or 10x. The moment all my drugs get sold out, it shows that upvalue error in F8 .

To Reproduce
Steps to reproduce the behavior:

  1. Spawn couple of drugs to sell
  2. Check F8 Console after selling all the drugs

Screenshots
https://cdn.discordapp.com/attachments/1001414024254210080/1012785237132071002/121.PNG

Questions (please complete the following information):

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

[BUG] Deliveries

Describe the bug
Debugpoly is on while going to the dealers and nothing happens with no error. I think deliveries isn't finished ?

Visual Glitch when planting weed

No has made an issue so I guess ill make one lol. When planting in weed in your own house there's a pretty good chance that it will spawn 2 of the same weed plant pot prop and then they stack on each other. It acts like only one is there so id assume its just a visual glitch. Thanks!

(see image below, also not my image stolen from the discord).

image

Server event policecall doen't exist.

I can't seem to find the triggert server event in client/cornerselling
TriggerServerEvent('police:server:PoliceAlertMessage', title, streetLabel, coords)

Not in qb-drugs not in qb-police

[SUGGESTION]

Hey guys, yes it is related to a problem. Namely the rep part of the system is very scuffy. and can zero out for no apparent reason

Describe the feature you'd like
i'd like to see the "rep" part of this tracked as part of the database, maybe its own "rep" table

Describe alternatives you've considered
No real alternatives

Drug locations

im making a server suing your server files and i cant find all the drug loactions as i wanna change them around and Ive been looking in all the files and i could not find then i only found coke processing thats it i was woundering if you could help me find where they are and tell me how to change them?

[BUG] Police alerts not going out for corner selling drugs

Describe the bug
Corner selling does not alert the police, I've added prints in that bit of code and to no avail, no prints has shown in the console.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any popular location
  2. Enable police chance high and start corner selling
  3. Sell drugs

Expected behavior
A police alert sends out corner selling drugs

Questions (please complete the following information):

  • When you last updated: most recent
  • Have you renamed qb- to something custom? no

[BUG]qb drugs isnt creating dealers

when i use the /newdealer command the dealer isnt useable in anyway

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Use this item '....' (item's name from shared.lua if applicable)
  4. See error

Expected behavior
should be able to use the dealer

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

Questions (please complete the following information):

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

Additional context
when i add a new dealer the dealer dont have a menu and i cant do anything with it but it shows on the list of dealers.

Attempt to index a nil value 'Time'

i added a drug dealer to the config, i go to their location and i get the prompt to knock on the door. However when i do, i get this in the f8 menu.

SCRIPT ERROR: @qb-drugs/client/deliveries.lua:127: Attempt to index a nil value (field 'time')

is there a quick fix to this?

Cornerselling isnt working

Cornerselling blip isnt there no matter which coords i use neither with or without cops or wich time it just dont show up.

lab keys

how do i generate a lab key. there is a labkey in items.lua but whenever i try to spawn it it just throws me an error.

[BUG] Critical - Impossible to sell to peds with cornerselling after randomly

Randomly it the script of cornerselling stop working and ped doesn't come to buy drugs. It often happen while enter a car and go away from the limit or a ped robbed you. After that nobody ped will come to buy until you restart you're game.
Also you can sell to any ped in the map also the qb-target implemented you need to put a blacklist for all peds or you can just make go away any ped.

This is critical because all of the game is working with illegal cornerselling and if nobody can sell or need to reboot every times it just not possible.

Corner Selling

When Cornerselling is enabled, no peds walk up to you, but you get an accept/decline offer right away.

Selling bug

Cornerselling gets buggy sometimes. You will be selling and after your robbed no NPC's will approach you and the only way to fix is either relog or restart the script. It also happens if you don't stop selling when moving location.

Unable to recover stolen drugs

Describe the bug
When an NPC steals your last remaining drug(s) from you during Corner Seeling and you kill them and attempt to search ped, you get a box that comes up that you got your drugs back, but they are not added back to your inventory.

To Reproduce
Steps to reproduce the behavior:

  1. Corner sell any available drug 1 at a time until you are robbed
  2. Kill NPC
  3. Use target to search ped
  4. Drugs are not put back in inventory

Expected behavior
You should get your drugs back? Works fine when you still have a supply in your inventory, only when its your last drug that was stolen from you

Screenshots
https://medal.tv/games/gta-v/clips/UO9GV4wTCl8xL/d1337GkCXyag?invite=cr-MSw2Sk4sNDIzOTEzNjks

Questions (please complete the following information):

  • When you last updated: [e.g. last week] Today with the lastest update (7013396 Fix when availableDrugs variable undefined (#105) - Sharkiiie)
  • 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 here.

[BUG] Issues adding dealers

When I add a dealer in the game, I just get a poly box, and nothing else. After I type /dealers the name shows up, but the box is there still, and no person etc.

Deliveries store.

There is a amount config for this. But if you close the shop and reopens. The amount is reset.

[BUG] Error When Buying Seeds

Describe the bug
When trying to buy weed seeds from the drug dealer the seed will go into the inventory, but dose not take out any money from bank. Once you close inventory and re-open it, the items will no longer be there. There are no F8 error, but the FXserver dose show a error code.

Screenshots

Screenshot 1 - This shows the player trying to buy seeds but will not take money from player.
https://cdn.discordapp.com/attachments/859528707814981653/901298914542641234/218_20211022223215_12.png

Screenshot 2 - Shows error code in FXserver itself. But no error codes in F8.
https://cdn.discordapp.com/attachments/859528707814981653/901298946943639552/Drug_Error.PNG

[BUG] Corner selling doesn't show notification of offer

currently when you go to your radial menu and select "corner sell" when an AI walks up to you to buy drugs the notification for how much they want to buy and how much money they're offering does not show up, but you can still press "E" and accept the offer. the money and amount of drugs in your inventory does update, you just cant see how much they offer or how many drugs they want

[Corner Selling Exploit with Target]

Describe the bug
There is 1 very small exploit when you get the target entity if you try to do in a very small edge the ped doesn't get recognized and can sell 2 infinite time to that 1 ped until inv drugs item are finished
To Reproduce
https://streamable.com/zco6z1
Screenshots
image

Questions (please complete the following information):

  • When you last updated: [1 day ago]
  • Are you using custom resource? which ones? [just edited server side where remove item and add money goes]
  • Have you renamed qb- to something custom? [no]

[BUG]Delivery Email Not Coming Through

Describe the bug
A clear and concise description of what the bug is. A stranger to qbcore should be able to read your bug report and understand how to reproduce it themselves and understand how the feature should work normally.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'Drug Dealer
  2. Click on '....'Drug Delivery
  3. Use this item '....' (item's name from shared.lua if applicable)
  4. See error- No email ever comes through we double check to see if the delivery was still active at any coordinates but it wasn't

Expected behavior
A clear and concise description of what you expected to happen.
No email ever comes through we double check to see if the delivery was still active at any coordinates but it wasn't
Screenshots
If applicable, add screenshots to help explain your problem.

Questions (please complete the following information):

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

Additional context
Add any other context about the problem here.

[BUG] I cannot see what the offers are at all

Describe the bug
Every time I go to sell either no offer shows or it shows for a split second making it very hard to read

To Reproduce
Steps to reproduce the behavior:

  1. Start corner sell
  2. Ped walks up to you

Expected behavior
Really needing help

Screenshots
N/A

Questions (please complete the following information):

  • When you last updated: Last update
  • Are you using custom resource? which ones? I do have qb-target]
  • Have you renamed qb- to something custom? no

Additional context
Add any other context about the problem here.

Double sales [BUG]

Describe the bug
An export to remove target option during cornerselling is placed at the wrong line, giving players the ability to sell twice to each NPC.

To Reproduce
Steps to reproduce the behavior:

  1. Turn on cornerselling.
  2. Be approchaed by an NPC.
  3. Accept the offer.
  4. While the progressbar is running, target the NPC again.
  5. Sell again after your sale.

Expected behavior
Target export should be removed right after the sale.
The fix is to move the code up a few lines. At around line 240 There's Wait(650) line, the exports['qb-target']:RemoveZone('sellingPed') should be above this, not under it. I put mine right under the serverevent for cornerselling.

[BUG] corner selling doesnt show notification of offer

currently when you go to your radial menu and select "corner sell" when an AI walks up to you to buy drugs the notification for how much they want to buy and how much money theyre offering does not show up, but you can still press "E" and accept the offer. the money and amount of drugs in your inventory does update, you just cant see how much they offer or how many drugs they want

[BUG]dealer not showing

Describe the bug
A clear and concise description of what the bug is. A stranger to qbcore should be able to read your bug report and understand how to reproduce it themselves and understand how the feature should work normally.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Use this item '....' (item's name from shared.lua if applicable)
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

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

Questions (please complete the following information):

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

Additional context
Add any other context about the problem here.

[help]

how can i start the cornerselling?

Minimum Cops?

I see on the Docs, it shows minimum cops online before sale is allowed, is this not a thing anymore?

[BUG] Dealer don't give you bricks

Describe the bug
A clear and concise description of what the bug is. A stranger to qbcore should be able to read your bug report and understand how to reproduce it themselves and understand how the feature should work normally.

To Reproduce
Steps to reproduce the behavior:

  1. Go to dealer
  2. Start the mission
  3. Just send you a massage but don't give you bricks to complete the order

Expected behavior
When I start the mission with Dealer , Dealer don't give me bricks to complete the order

Questions (please complete the following information):

  • When you last updated: Last update
  • Are you using custom resource? which ones? No
  • Have you renamed qb- to something custom? No
    Additional context
    Add any other context about the problem here.

ANY WAY TO DISABLE TIMER ON DELIVERIES????

Is there anyone that is able to help me with this? I have tried to disable different things in the file to get it to work and also re coding the on time correct amount, etc. etc. etc…. buuuttt nothing is working. I really would like to have the timer disabled so I don’t have to rush through red lights I want my server to be as realistic as possible so it would be late every time. Any ways to change this?? I have tried A LOT😅😅

[BUG]When using /newdealer [dealername] [time1] [time2] , dealer is not in game.

Describe the bug
When using the /newdealer command in game the dealer is created in the database, no dealer is visible in game no menu interactions occurs. No error is generated, I also restarted the server and game client.

To Reproduce
Steps to reproduce the behavior:

  1. run the /newdealer command
  2. There is no dealer in game
  3. check [DBNAME].dealers table and the dealers are generated in the database.

Expected behavior
A dealer to be created and menu to be available in game.

Screenshots
n/a

Questions (please complete the following information):

  • When you last updated: Created server from txAdmin receipe a week ago.
  • Are you using custom resource? which ones? All default qbcore receipe framework.
  • Have you renamed qb- to something custom? no

Additional context

Also when using the /dealergoto command works but still no dealer available.

[BUG] Error

Didn't touch any of this files. Somehow when i started to do the drugs, I get this error,
qbdrugs

This issue is happening frequently

image

Some players are not able to buy drugs from the dealer. It will show the available amount, as soon they buy it the amount will get deducted and it is returned to the bank account. There inventory was almost empty, then also they couldn't buy it.

Error on fresh install

This error occurs every time someone finishes a drug delivery. They do not receive any money and they do not gain any reputation

mstsc_8Nkj0hdy6b
mstsc_aZSD26NzqH

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.