commit d043772a5f961cd90c5113a57c2c19bccd5190e9 Author: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Wed Mar 22 15:45:25 2023 -0700 Add files via upload diff --git a/README.md b/README.md new file mode 100644 index 0000000..56b5700 --- /dev/null +++ b/README.md @@ -0,0 +1,215 @@ +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +This is my first major script and release. I have done snippets and small shit and given away to the community. I was tired how most drug scripts that are free lack creativity and the ones that are creative and in depth are expensive. +This was all possible because of creators and devs in Project Sloth, JixelTay, and Samuel's development. I used the globalstates and spawning of props from Samuel's christmas script (I asked permission before release) tebex link here for their stuff: https://fivem.samueldev.shop/ +Project Sloth has been a pioneer of how the fivem community should be. Helping the community by creating free, easy to install, and fun scripts. Along with allowing the community to publish free scripts. +and Jimathy and Tay are the sole reason I learned how to code. When I started back in august, I had no idea what I was doing and their scripts are easy to read, edit, and see how things actually function. +without those scripts I would forget 1000x more commas and not understand how code communicates. If you don't have any of their scripts. you are missing out. tebex: https://jimathy666.tebex.io/ + +I am not affiliated with any of these creators above but I have to give a shout out to the community when I can. + +I want to also give thanks to my team at Hyperlife RP who helped me make this script. From helping with ideas and to keep me from bashing my head against the table. There was a point while writing this I was in a cross country move and only had a macbook that couldnt even load +fivem and I would write code for it, send it to them to upload and have them test it. Tell me its not working and troubleshoot for me. This is going to be a first release of many because of this amazing team. + +if you have any issues, you can come to my discord and throw a ticket in. I hope i can get it fixed ASAP Rocky +https://discord.gg/TwBaVECdGM +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +Dependacies +[1] qbcore +[2] lj or qb inventory +[3] ps-buffs +[4] ps-ui +[5] qb-target +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + +How to install like a fuckin bosssssss +1) upload the script +2) add items +3) change all the locations in the config. it will automatically create the box -2 and +2 on the z in the target.lua so you dont have to do all that! Every city should have different locations to fit well with your city +4) upload images +5) add items here + + ----- md-coke + ["coke"] = {["name"] = "coke", ["label"] = "Raw Cocaine", ["weight"] = 1000, ["type"] = "item", ["image"] = "coke.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Processed cocaine"}, + ["coca_leaf"] = {["name"] = "coca_leaf", ["label"] = "Cocaine leaves", ["weight"] = 1500, ["type"] = "item", ["image"] = "coca_leaf.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Cocaine leaves that must be processed !"}, + ["poppyresin"] = {["name"] = "poppyresin", ["label"] = "Poppy resin", ["weight"] = 2000, ["type"] = "item", ["image"] = "poppyresin.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "It sticks to your fingers when you handle it."}, + ["heroin"] = {["name"] = "heroin", ["label"] = "Weak Heroin Powder", ["weight"] = 500, ["type"] = "item", ["image"] = "loosecoke.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Really addictive depressant..."}, + ["bakingsoda"] = {["name"] = "bakingsoda", ["label"] = "Baking Soda", ["weight"] = 300, ["type"] = "item", ["image"] = "bakingsoda.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Household Baking Soda!"}, + ['loosecoke'] = {['name'] = 'loosecoke', ['label'] = 'loose coke', ['weight'] = 0, ['type'] = 'item', ['image'] = 'loosecoke.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Paper made specifically for encasing and smoking tobacco or cannabis.'}, +['loosecokestagetwo'] = {['name'] = 'loosecokestagetwo', ['label'] = 'More Pure Loose Coke', ['weight'] = 100, ['type'] = 'item', ['image'] = 'loosecokestagetwo.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['loosecokestagethree'] = {['name'] = 'loosecokestagethree', ['label'] = 'Purest Loose Coke', ['weight'] = 100, ['type'] = 'item', ['image'] = 'loosecokestagethree.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['cokebaggystagetwo'] = {['name'] = 'cokebaggystagetwo', ['label'] = 'Bag of Good Coke', ['weight'] = 100, ['type'] = 'item', ['image'] = 'cocaine_baggystagetwo.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'To get happy real quick'}, +['cokebaggystagethree'] = {['name'] = 'cokebaggystagethree', ['label'] = 'Bag of Great Coke', ['weight'] = 100, ['type'] = 'item', ['image'] = 'cocaine_baggystagethree.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'To get happy real quick'}, +["cokestagetwo"] = {["name"] = "cokestagetwo", ["label"] = "Better Raw Cocaine", ["weight"] = 100, ["type"] = "item", ["image"] = "cokestagetwo.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["expire"] = 90, ["description"] = "Processed cocaine"}, +["cokestagethree"] = {["name"] = "cokestagethree", ["label"] = "Best Raw Cocaine", ["weight"] = 100, ["type"] = "item", ["image"] = "cokestagethree.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["expire"] = 90, ["description"] = "Processed cocaine"}, + + + ----md-lsd + ['lysergic_acid'] = {['name'] = 'lysergic_acid', ['label'] = 'Lysergic Acid', ['weight'] = 100, ['type'] = 'item', ['image'] = 'lysergic_acid.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['diethylamide'] = {['name'] = 'diethylamide', ['label'] = 'Diethylamide', ['weight'] = 100, ['type'] = 'item', ['image'] = 'diethylamide.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['lsd_one_vial'] = {['name'] = 'lsd_one_vial', ['label'] = 'Weakest LSD Vial', ['weight'] = 100, ['type'] = 'item', ['image'] = 'lsd_one_vial.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['lsd_vial_two'] = {['name'] = 'lsd_vial_two', ['label'] = 'Slightly Better LSD Vial', ['weight'] = 100, ['type'] = 'item', ['image'] = 'lsd_vial_two.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['lsd_vial_three'] = {['name'] = 'lsd_vial_three', ['label'] = 'Good LSD', ['weight'] = 100, ['type'] = 'item', ['image'] = 'lsd_vial_three.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['lsd_vial_four'] = {['name'] = 'lsd_vial_four', ['label'] = 'Really Good LSD', ['weight'] = 100, ['type'] = 'item', ['image'] = 'lsd_vial_four.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['lsd_vial_five'] = {['name'] = 'lsd_vial_five', ['label'] = 'Amazing LSD', ['weight'] = 100, ['type'] = 'item', ['image'] = 'lsd_vial_five.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['lsd_vial_six'] = {['name'] = 'lsd_vial_six', ['label'] = 'Purest LSD', ['weight'] = 100, ['type'] = 'item', ['image'] = 'lsd_vial_six.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['tab_paper'] = {['name'] = 'tab_paper', ['label'] = 'Tab Paper', ['weight'] = 100, ['type'] = 'item', ['image'] = 'tab_paper.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['smileyfacesheet'] = {['name'] = 'smileyfacesheet', ['label'] = 'Smiley Face Sheet', ['weight'] = 100, ['type'] = 'item', ['image'] = 'smileysheet.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['wildcherrysheet'] = {['name'] = 'wildcherrysheet', ['label'] = 'Wild Cherry Sheet', ['weight'] = 100, ['type'] = 'item', ['image'] = 'wildcherrysheet.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['yinyangsheet'] = {['name'] = 'yinyangsheet', ['label'] = 'Yin and Yang Sheet', ['weight'] = 100, ['type'] = 'item', ['image'] = 'yinyangsheet.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['pineapplesheet'] = {['name'] = 'pineapplesheet', ['label'] = 'Pineapple Sheet', ['weight'] = 100, ['type'] = 'item', ['image'] = 'pineapplesheet.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['bartsheet'] = {['name'] = 'bartsheet', ['label'] = 'Bart Simpson Sheet', ['weight'] = 100, ['type'] = 'item', ['image'] = 'bartsheet.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['gratefuldeadsheet'] = {['name'] = 'gratefuldeadsheet', ['label'] = 'Grateful Dead Sheet', ['weight'] = 100, ['type'] = 'item', ['image'] = 'gratefuldeadsheet.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['smiley_tabs'] = {['name'] = 'smiley_tabs', ['label'] = 'Smiley tabs', ['weight'] = 100, ['type'] = 'item', ['image'] = 'smiley_tabs.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['wildcherry_tabs'] = {['name'] = 'wildcherry_tabs', ['label'] = 'Wild Cherry Tabs', ['weight'] = 100, ['type'] = 'item', ['image'] = 'wildcherry_tabs.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['yinyang_tabs'] = {['name'] = 'yinyang_tabs', ['label'] = 'Yin and Yang Tabs', ['weight'] = 100, ['type'] = 'item', ['image'] = 'yinyang_tabs.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['pineapple_tabs'] = {['name'] = 'pineapple_tabs', ['label'] = 'Pineapple Tabs', ['weight'] = 100, ['type'] = 'item', ['image'] = 'pineapple_tabs.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['bart_tabs'] = {['name'] = 'bart_tabs', ['label'] = 'Bart Simpson Tabs', ['weight'] = 100, ['type'] = 'item', ['image'] = 'bart_tabs.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['gratefuldead_tabs'] = {['name'] = 'gratefuldead_tabs', ['label'] = 'Grateful Dead Tabs', ['weight'] = 100, ['type'] = 'item', ['image'] = 'gratefuldead_tabs.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'DONT USE IF YOU GET SEIZURES'}, +['lsdlabkit'] = {['name'] = 'lsdlabkit', ['label'] = 'LSD Mixing Table', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'labkit.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['dirtylsdlabkit'] = {['name'] = 'dirtylsdlabkit', ['label'] = 'Dirty LSD Mixing Table', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'labkit_dirty.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, + + +---- md heroin +["heroinstagetwo"] = {["name"] = "heroinstagetwo", ["label"] = "Better Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroinpowderstagetwo.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroinstagethree"] = {["name"] = "heroinstagethree", ["label"] = "Best Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroinpowderstagethree.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroincut"] = {["name"] = "heroincut", ["label"] = "Cut Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroinpowder.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroincutstagetwo"] = {["name"] = "heroincutstagetwo", ["label"] = "Better Cut Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroinpowderstagethree.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroincutstagethree"] = {["name"] = "heroincutstagethree", ["label"] = "Best Cut Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroinpowderstagetwo.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroinlabkit"] = {["name"] = "heroinlabkit", ["label"] = "Heroin Lab Kit", ["weight"] = 250, ["type"] = "item", ["image"] = "labkit.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["dirtyheroinlabkit"] = {["name"] = "dirtyheroinlabkit", ["label"] = "Dirty heroin Lab Kit", ["weight"] = 250, ["type"] = "item", ["image"] = "labkit_dirty.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroinvial"] = {["name"] = "heroinvial", ["label"] = "Vial Of Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroin.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroinvialstagetwo"] = {["name"] = "heroinvialstagetwo", ["label"] = "Better Vial of Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroinstagetwo.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroinvialstagethree"] = {["name"] = "heroinvialstagethree", ["label"] = "Best Vial Of Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroinstagethree.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroin_ready"] = {["name"] = "heroin_ready", ["label"] = "Syringe Of Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroin_ready.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroin_readystagetwo"] = {["name"] = "heroin_readystagetwo", ["label"] = "Syringe Of Better Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroin_readystagetwo.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["heroin_readystagethree"] = {["name"] = "heroin_readystagethree", ["label"] = "Syringe Of Best Heroin", ["weight"] = 250, ["type"] = "item", ["image"] = "heroin_readystagethree.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["emptyvial"] = {["name"] = "emptyvial", ["label"] = "empty vial", ["weight"] = 1, ["type"] = "item", ["image"] = "emptyvial.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ['combinable'] = nil, ["description"] = ""}, +["needle"] = {["name"] = "needle", ["label"] = "Syringe", ["weight"] = 250, ["type"] = "item", ["image"] = "syringe.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, + + +---- md crack +["crackrock"] = {["name"] = "crackrock", ["label"] = "Crack Rock", ["weight"] = 250, ["type"] = "item", ["image"] = "crackrock1.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["crackrockstagetwo"] = {["name"] = "crackrockstagetwo", ["label"] = "Better Crack Rock", ["weight"] = 250, ["type"] = "item", ["image"] = "crackrock2.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["crackrockstagethree"] = {["name"] = "crackrockstagethree", ["label"] = "Best Crack Rock", ["weight"] = 250, ["type"] = "item", ["image"] = "crackrock3.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["baggedcracked"] = {["name"] = "baggedcracked", ["label"] = "Bag Of Crack", ["weight"] = 250, ["type"] = "item", ["image"] = "crackbag1.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["baggedcrackedstagetwo"] = {["name"] = "baggedcrackedstagetwo", ["label"] = "Better Bag Of Crack", ["weight"] = 250, ["type"] = "item", ["image"] = "crackbag2.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["baggedcrackedstagethree"] = {["name"] = "baggedcrackedstagethree", ["label"] = "Best Bag Of Crack", ["weight"] = 250, ["type"] = "item", ["image"] = "crackbag3.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +---- shrooms +["shrooms"] = {["name"] = "shrooms", ["label"] = "Shrooms", ["weight"] = 250, ["type"] = "item", ["image"] = "shrooms.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, + +-- pharma +['prescription_pad'] = {['name'] = 'prescription_pad', ['label'] = 'Prescription Pad', ['weight'] = 10, ['type'] = 'item', ['image'] = 'prescriptionpad.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = ''}, +["vicodin_prescription"] = {["name"] = "vicodin_prescription", ["label"] = "Vicodin Prescription", ["weight"] = 250, ["type"] = "item", ["image"] = "vicodinprescription.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["adderal_prescription"] = {["name"] = "adderal_prescription", ["label"] = "Adderal Prescription", ["weight"] = 250, ["type"] = "item", ["image"] = "adderalprescription.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["morphine_prescription"] = {["name"] = "morphine_prescription", ["label"] = "Morphine Prescription", ["weight"] = 250, ["type"] = "item", ["image"] = "morphineprescription.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +["xanax_prescription"] = {["name"] = "xanax_prescription", ["label"] = "Xanax Prescription", ["weight"] = 250, ["type"] = "item", ["image"] = "xanaxprescription.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = ""}, +['adderal'] = {['name'] = 'adderal', ['label'] = 'Adderal', ['weight'] = 100, ['type'] = 'item', ['image'] = 'adderal.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['vicodin'] = {['name'] = 'vicodin', ['label'] = 'Vicodin', ['weight'] = 100, ['type'] = 'item', ['image'] = 'vicodin.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['morphine'] = {['name'] = 'morphine', ['label'] = 'Morphine', ['weight'] = 100, ['type'] = 'item', ['image'] = 'morphine.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['xanax'] = {['name'] = 'xanax', ['label'] = 'Xanax', ['weight'] = 100, ['type'] = 'item', ['image'] = 'xanax.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['adderalbottle'] = {['name'] = 'adderalbottle', ['label'] = 'Adderal Bottle', ['weight'] = 100, ['type'] = 'item', ['image'] = 'pillbottle.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['vicodinbottle'] = {['name'] = 'vicodinbottle', ['label'] = 'Vicodin Bottle', ['weight'] = 100, ['type'] = 'item', ['image'] = 'pillbottle.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['morphinebottle'] = {['name'] = 'morphinebottle', ['label'] = 'Morphine Bottle', ['weight'] = 100, ['type'] = 'item', ['image'] = 'pillbottle.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, +['xanaxbottle'] = {['name'] = 'xanaxbottle', ['label'] = 'Xanax Bottle', ['weight'] = 100, ['type'] = 'item', ['image'] = 'pillbottle.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''}, + + + +6) enjoy + +-------------- if you want things in shops +["drugs"] = { + [1] = { + name = "bakingsoda", + price = 500, + amount = 55000, + info = {}, + type = "item", + slot = 1, + }, + [2] = { + name = "needles", + price = 500, + amount = 55000, + info = {}, + type = "item", + slot = 2, + }, + [3] = { + name = "emptyvial", + price = 500, + amount = 55000, + info = {}, + type = "item", + slot = 3, + }, + }, + + +------------------------------- if you use qb-drugs i recommend you change prices + ["cokebaggy"] = { + min = 2500, + max = 4250, + }, + ["cokebaggystagetwo"] = { + min = 2750, + max = 4500, + }, + ["cokebaggystagethree"] = { + min = 3300, + max = 5300, + }, + + -- TABS + ["smiley_tabs"] = { + min = 200, + max = 400, + }, + ["wildcherry_tabs"] = { + min = 350, + max = 1000, + }, + ["yinyang_tabs"] = { + min = 500, + max = 1400, + }, + ["pineapple_tabs"] = { + min = 1200, + max = 2500, + }, + ["bart_tabs"] = { + min = 1500, + max = 2700, + }, + ["gratefuldead_tabs"] = { + min = 1800, + max = 3500, + }, + ["baggedcracked"] = { + min = 1200, + max = 2500, + }, + ["baggedcrackedstagetwo"] = { + min = 1500, + max = 2700, + }, + ["baggedcrackstagethree"] = { + min = 1800, + max = 3500, + }, + ["shrooms"] = { + min = 300, + max = 500, + }, + ["heroin_ready"] = { + min = 1200, + max = 2500, + }, + ["heroin_readystagetwo"] = { + min = 1500, + max = 2700, + }, + ["heroin_readystagethree"] = { + min = 1800, + max = 3500, + }, \ No newline at end of file diff --git a/client/cocaine.lua b/client/cocaine.lua new file mode 100644 index 0000000..447e581 --- /dev/null +++ b/client/cocaine.lua @@ -0,0 +1,265 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +local CocaPlant = {} + +function LoadModel(hash) + hash = GetHashKey(hash) + RequestModel(hash) + while not HasModelLoaded(hash) do + Wait(3000) + end +end + + + +RegisterNetEvent('coke:respawnCane', function(loc) + local v = GlobalState.CocaPlant[loc] + local hash = GetHashKey(v.model) + --if not HasModelLoaded(hash) then LoadModel(hash) end + if not CocaPlant[loc] then + CocaPlant[loc] = CreateObject(hash, v.location, false, true, true) + SetEntityAsMissionEntity(CocaPlant[loc], true, true) + FreezeEntityPosition(CocaPlant[loc], true) + SetEntityHeading(CocaPlant[loc], v.heading) + exports['qb-target']:AddTargetEntity(CocaPlant[loc], { + options = { { + icon = "fas fa-hand", + label = "pick Cocaine", + action = function() + QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, { + disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, + { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, + {}, {}, function() + TriggerServerEvent("coke:pickupCane", loc) + ClearPedTasks(PlayerPedId()) + end, function() -- Cancel + ClearPedTasks(PlayerPedId()) + end) + end + } + }, + distance = 3.0 + }) + end +end) + + + +RegisterNetEvent('coke:removeCane', function(loc) + if DoesEntityExist(CocaPlant[loc]) then DeleteEntity(CocaPlant[loc]) end + CocaPlant[loc] = nil +end) + + +RegisterNetEvent("coke:init", function() + for k, v in pairs (GlobalState.CocaPlant) do + local hash = GetHashKey(v.model) + if not HasModelLoaded(hash) then LoadModel(hash) end + if not v.taken then + CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) + SetEntityAsMissionEntity(CocaPlant[k], true, true) + FreezeEntityPosition(CocaPlant[k], true) + SetEntityHeading(CocaPlant[k], v.heading) + exports['qb-target']:AddTargetEntity(CocaPlant[k], { + options = { { + icon = "fas fa-hand", + label = "pick cocaine", + action = function() + QBCore.Functions.Progressbar("pick_cane", "picking Cocaine Leaves", 2000, false, true, { + disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, + { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, + {}, {}, function() + TriggerServerEvent("coke:pickupCane", k) + ClearPedTasks(PlayerPedId()) + end, function() -- Cancel + ClearPedTasks(PlayerPedId()) + end) + end + } + }, + distance = 3.0 + }) + end + end +end) + +AddEventHandler('onResourceStart', function(resource) + if resource == GetCurrentResourceName() then + LoadModel('prop_plant_01a') + TriggerEvent('coke:init') + end + end) + + RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() + Wait(3000) + LoadModel('prop_plant_01a') + TriggerEvent('coke:init') + end) + +AddEventHandler('onResourceStop', function(resourceName) + if GetCurrentResourceName() == resourceName then + SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a')) + for k, v in pairs(CocaPlant) do + if DoesEntityExist(v) then + DeleteEntity(v) SetEntityAsNoLongerNeeded(v) + end + end + end +end) + + +RegisterNetEvent("md-drugs:client:makepowder") +AddEventHandler("md-drugs:client:makepowder", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "chopping plants to powder", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:makepowder") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:cutcokeone") +AddEventHandler("md-drugs:client:cutcokeone", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "cutting coke to increase profits yeeee!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:cutcokeone") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:cutcoketwo") +AddEventHandler("md-drugs:client:cutcoketwo", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "cutting coke to increase profits yeeee!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:cutcoketwo") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:cutcokethree") +AddEventHandler("md-drugs:client:cutcokethree", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "cutting coke to increase profits yeeee!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:cutcokethree") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:bagcoke") +AddEventHandler("md-drugs:client:bagcoke", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Bilbo Baggin this bitch!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:bagcoke") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:bagcoketwo") +AddEventHandler("md-drugs:client:bagcoketwo", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Bilbo Baggin this bitch!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:bagcoketwo") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:bagcokethree") +AddEventHandler("md-drugs:client:bagcokethree", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Bilbo Baggin this bitch!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:bagcokethree") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + + diff --git a/client/crack.lua b/client/crack.lua new file mode 100644 index 0000000..c1fa718 --- /dev/null +++ b/client/crack.lua @@ -0,0 +1,111 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +RegisterNetEvent("md-drugs:client:makecrackone") +AddEventHandler("md-drugs:client:makecrackone", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:makecrackone") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failcrackone") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 3, 8) -- NumberOfCircles, + end) +end) + +RegisterNetEvent("md-drugs:client:makecracktwo") +AddEventHandler("md-drugs:client:makecracktwo", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:makecracktwo") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failcracktwo") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 3, 8) -- NumberOfCircles, + end) +end) + +RegisterNetEvent("md-drugs:client:makecrackthree") +AddEventHandler("md-drugs:client:makecrackthree", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Cooking Crack", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:makecrackthree") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failcrackthree") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 3, 8) -- NumberOfCircles, + end) +end) + +RegisterNetEvent("md-drugs:client:bagcrack") +AddEventHandler("md-drugs:client:bagcrack", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "bagging some good good", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:bagcrack") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + diff --git a/client/heroin.lua b/client/heroin.lua new file mode 100644 index 0000000..b2eab9c --- /dev/null +++ b/client/heroin.lua @@ -0,0 +1,281 @@ +local QBCore = exports['qb-core']:GetCoreObject() +local CocaPlant = {} +local PoppyPlants = {} + +function LoadModel(hash) + hash = GetHashKey(hash) + RequestModel(hash) + while not HasModelLoaded(hash) do + Wait(3000) + end +end + + + +RegisterNetEvent('heroin:respawnCane', function(loc) + local v = GlobalState.PoppyPlants[loc] + local hash = GetHashKey(v.model) + --if not HasModelLoaded(hash) then LoadModel(hash) end + if not PoppyPlants[loc] then + PoppyPlants[loc] = CreateObject(hash, v.location, false, true, true) + SetEntityAsMissionEntity(PoppyPlants[loc], true, true) + FreezeEntityPosition(PoppyPlants[loc], true) + SetEntityHeading(PoppyPlants[loc], v.heading) + exports['qb-target']:AddTargetEntity(PoppyPlants[loc], { + options = { { + icon = "fas fa-hand", + label = "pick Poppies", + action = function() + QBCore.Functions.Progressbar("pick_cane", "picking heroin", 2000, false, true, { + disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, + { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, + {}, {}, function() + TriggerServerEvent("heroin:pickupCane", loc) + ClearPedTasks(PlayerPedId()) + end, function() -- Cancel + ClearPedTasks(PlayerPedId()) + end) + end + } + }, + distance = 3.0 + }) + end +end) + + + +RegisterNetEvent('heroin:removeCane', function(loc) + if DoesEntityExist(PoppyPlants[loc]) then DeleteEntity(PoppyPlants[loc]) end + PoppyPlants[loc] = nil +end) + + + +RegisterNetEvent("heroin:init", function() + for k, v in pairs (GlobalState.PoppyPlants) do + local hash = GetHashKey(v.model) + if not HasModelLoaded(hash) then LoadModel(hash) end + if not v.taken then + PoppyPlants[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) + SetEntityAsMissionEntity(PoppyPlants[k], true, true) + FreezeEntityPosition(PoppyPlants[k], true) + SetEntityHeading(PoppyPlants[k], v.heading) + exports['qb-target']:AddTargetEntity(PoppyPlants[k], { + options = { { + icon = "fas fa-hand", + label = "Pick Poppies", + action = function() + QBCore.Functions.Progressbar("pick_cane", "Picking Heroin", 2000, false, true, { + disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, + { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, + {}, {}, function() + TriggerServerEvent("heroin:pickupCane", k) + ClearPedTasks(PlayerPedId()) + end, function() -- Cancel + ClearPedTasks(PlayerPedId()) + end) + end + } + }, + distance = 3.0 + }) + end + end +end) + +AddEventHandler('onResourceStart', function(resource) + if resource == GetCurrentResourceName() then + LoadModel('prop_plant_01b') + TriggerEvent('heroin:init') + end + end) + + RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() + Wait(3000) + LoadModel('prop_plant_01b') + TriggerEvent('heroin:init') + end) + + AddEventHandler('onResourceStop', function(resourceName) + if GetCurrentResourceName() == resourceName then + SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01b')) + for k, v in pairs(PoppyPlants) do + if DoesEntityExist(v) then + DeleteEntity(v) SetEntityAsNoLongerNeeded(v) + end + end + end +end) + +RegisterNetEvent("md-drugs:client:dryplant") +AddEventHandler("md-drugs:client:dryplant", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "drying out these poppies!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:dryplant") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:cutheroin") +AddEventHandler("md-drugs:client:cutheroin", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "cutting the heroin!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:cutheroin") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:cutherointwo") +AddEventHandler("md-drugs:client:cutherointwo", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "cutting the heroin!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:cutherointwo") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:cutherointhree") +AddEventHandler("md-drugs:client:cutherointhree", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "cutting the heroin!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:cutherointhree") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + + +RegisterNetEvent("md-drugs:client:buyheroinlabkit") +AddEventHandler("md-drugs:client:buyheroinlabkit", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Shhhhh!", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:getheroinlabkit") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + + +RegisterNetEvent("md-drugs:client:heatliquidheroin") +AddEventHandler("md-drugs:client:heatliquidheroin", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Heating Heroin!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:heatliquidheroin") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failheatingheroin") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 1, 8) -- NumberOfCircles, + end) +end) + +RegisterNetEvent("md-drugs:client:fillneedle") +AddEventHandler("md-drugs:client:fillneedle", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Filling Needles!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:fillneedle") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failheroin") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 2, 8) -- NumberOfCircles, + end) +end) + + diff --git a/client/lsd.lua b/client/lsd.lua new file mode 100644 index 0000000..3f7a9f2 --- /dev/null +++ b/client/lsd.lua @@ -0,0 +1,597 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +RegisterNetEvent("md-drugs:client:getlysergic") +AddEventHandler("md-drugs:client:getlysergic", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Stealing Lysergic Acid!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:getlysergic") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 1, 8) -- NumberOfCircles, MS + end) +end) + +RegisterNetEvent("md-drugs:client:getdiethylamide") +AddEventHandler("md-drugs:client:getdiethylamide", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Stealing Diethylamide!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:getdiethylamide") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 1, 8) -- NumberOfCircles, MS + end) +end) + +RegisterNetEvent("md-drugs:client:heatliquid") +AddEventHandler("md-drugs:client:heatliquid", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Heating Liquids!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:heatliquid") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failheating") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 1, 8) -- NumberOfCircles, MS + end) +end) + +RegisterNetEvent("md-drugs:client:refinequalityacid") +AddEventHandler("md-drugs:client:refinequalityacid", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Refining The Quality!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:refinequalityacid") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failrefinequality") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 1, 8) -- NumberOfCircles, MS + end) +end) + +RegisterNetEvent("md-drugs:client:maketabpaperone") +AddEventHandler("md-drugs:client:maketabpaperone", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:maketabpaperone") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failtabsone") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 3, 8) -- NumberOfCircles, + end) +end) + + +RegisterNetEvent("md-drugs:client:maketabpapertwo") +AddEventHandler("md-drugs:client:maketabpapertwo", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:maketabpapertwo") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failtabstwo") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 3, 8) -- NumberOfCircles, + end) +end) + + +RegisterNetEvent("md-drugs:client:maketabpaperthree") +AddEventHandler("md-drugs:client:maketabpaperthree", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:maketabpaperthree") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failtabsthree") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 3, 8) -- NumberOfCircles, + end) +end) + +RegisterNetEvent("md-drugs:client:maketabpaperfour") +AddEventHandler("md-drugs:client:maketabpaperfour", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:maketabpaperfour") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failtabsfour") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 3, 8) -- NumberOfCircles, + end) +end) + +RegisterNetEvent("md-drugs:client:maketabpaperfive") +AddEventHandler("md-drugs:client:maketabpaperfive", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:maketabpaperfive") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failtabsfive") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 3, 8) -- NumberOfCircles, + end) +end) + +RegisterNetEvent("md-drugs:client:maketabpapersix") +AddEventHandler("md-drugs:client:maketabpapersix", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Dropping Tabs!", 1000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + exports['ps-ui']:Circle(function(success) + if success then + TriggerServerEvent("md-drugs:server:maketabpapersix") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + else + TriggerServerEvent("md-drugs:server:failtabsix") + Citizen.Wait(4000) + ClearPedTasks(PlayerPedId()) + end +end, 3, 8) -- NumberOfCircles, + end) +end) + +RegisterNetEvent("md-drugs:client:cutsheet") +AddEventHandler("md-drugs:client:cutsheet", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Cutting Sheets", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:buytabs") +AddEventHandler("md-drugs:client:buytabs", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Buying Tab Paper", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + Citizen.Wait(4000) + TriggerServerEvent("md-drugs:server:gettabpaper") + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:buylabkit") +AddEventHandler("md-drugs:client:buylabkit", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Buying A Lab Kit", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + Citizen.Wait(4000) + TriggerServerEvent("md-drugs:server:getlabkit") + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:getdirtykit") +AddEventHandler("md-drugs:client:getdirtykit", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Ruining Your Kit", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + Citizen.Wait(4000) + TriggerServerEvent("md-drugs:server:getdirtykit") + + ClearPedTasks(PlayerPedId()) + end) +end) + + +function MethBagEffect() + local startStamina = 8 + TrevorEffect() + SetRunSprintMultiplierForPlayer(PlayerId(), 1.49) + while startStamina > 0 do + Wait(1000) + if math.random(5, 100) < 10 then + RestorePlayerStamina(PlayerId(), 1.0) + end + startStamina = startStamina - 1 + if math.random(5, 100) < 51 then + TrevorEffect() + end + end + startStamina = 0 + SetRunSprintMultiplierForPlayer(PlayerId(), 1.0) +end + +function TrevorEffect() + StartScreenEffect("DrugsTrevorClownsFightIn", 3.0, 0) + Wait(3000) + StartScreenEffect("DrugsTrevorClownsFight", 3.0, 0) + Wait(3000) + StartScreenEffect("DrugsTrevorClownsFightOut", 3.0, 0) + StopScreenEffect("DrugsTrevorClownsFight") + StopScreenEffect("DrugsTrevorClownsFightIn") + StopScreenEffect("DrugsTrevorClownsFightOut") +end + +function EcstasyEffect() + local startStamina = 30 + SetFlash(0, 0, 500, 7000, 500) + while startStamina > 0 do + Wait(1000) + startStamina = startStamina - 1 + RestorePlayerStamina(PlayerId(), 1.0) + if math.random(1, 100) < 51 then + SetFlash(0, 0, 500, 7000, 500) + ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08) + end + end + if IsPedRunning(PlayerPedId()) then + SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0) + end + + startStamina = 0 +end + + +function CokeBaggyEffect() + local startStamina = 20 + local ped = PlayerPedId() + AlienEffect() + SetRunSprintMultiplierForPlayer(PlayerId(), 1.1) + while startStamina > 0 do + Wait(1000) + if math.random(1, 100) < 20 then + RestorePlayerStamina(PlayerId(), 1.0) + end + startStamina = startStamina - 1 + if math.random(1, 100) < 10 and IsPedRunning(ped) then + SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0) + end + if math.random(1, 300) < 10 then + AlienEffect() + Wait(math.random(3000, 6000)) + end + end + if IsPedRunning(ped) then + SetPedToRagdoll(ped, math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0) + end + + startStamina = 0 + SetRunSprintMultiplierForPlayer(PlayerId(), 1.0) +end + +function AlienEffect() + StartScreenEffect("DrugsMichaelAliensFightIn", 3.0, 0) + Wait(math.random(5000, 8000)) + StartScreenEffect("DrugsMichaelAliensFight", 3.0, 0) + Wait(math.random(5000, 8000)) + StartScreenEffect("DrugsMichaelAliensFightOut", 3.0, 0) + StopScreenEffect("DrugsMichaelAliensFightIn") + StopScreenEffect("DrugsMichaelAliensFight") + StopScreenEffect("DrugsMichaelAliensFightOut") +end + + +RegisterNetEvent('md-drugs:client:takesmileytabs', function() + QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + AlienEffect() + + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) + +RegisterNetEvent('md-drugs:client:takewildcherrytabs', function() + QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + AlienEffect() + + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) + +RegisterNetEvent('md-drugs:client:takeyinyangtabs', function() + QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + AlienEffect() + + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) + +RegisterNetEvent('md-drugs:client:takepineappletabs', function() + QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + EcstasyEffect() + + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) + +RegisterNetEvent('md-drugs:client:takebarttabs', function() + QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + TrevorEffect() + + + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) + +RegisterNetEvent('md-drugs:client:takegratefuldeadtabs', function() + QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 10000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + TrevorEffect() + Wait(15000) + EcstasyEffect() + + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) +---------------------------------------------------------------- LSD EFFECTS diff --git a/client/pharma.lua b/client/pharma.lua new file mode 100644 index 0000000..6976533 --- /dev/null +++ b/client/pharma.lua @@ -0,0 +1,196 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +RegisterNetEvent("md-drugs:client:fillprescription") +AddEventHandler("md-drugs:client:fillprescription", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Picking Up Your Prescription", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:fillprescription") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:openingvicodin") +AddEventHandler("md-drugs:client:openingvicodin", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:openingvicodin") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:openingadderal") +AddEventHandler("md-drugs:client:openingadderal", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:openingadderal") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:openingmorphine") +AddEventHandler("md-drugs:client:openingmorphine", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:openingmorphine") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent("md-drugs:client:openingxanax") +AddEventHandler("md-drugs:client:openingxanax", function() + RequestAnimDict("mp_arresting") + while (not HasAnimDictLoaded("mp_arresting")) do + Citizen.Wait(4000) + end + TaskPlayAnim(PlayerPedId(), "mp_arresting" ,"a_uncuff" ,8.0, -8.0, -1, 1, 0, false, false, false ) + local PedCoords = GetEntityCoords(PlayerPedId()) + QBCore.Functions.Progressbar("drink_something", "Opening Bottle", 4000, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + disableInventory = true, + }, {}, {}, {}, function()-- Done + TriggerServerEvent("md-drugs:server:openingxanax") + Citizen.Wait(4000) + + ClearPedTasks(PlayerPedId()) + end) +end) + +RegisterNetEvent('md-drugs:client:takevicodin', function() + QBCore.Functions.Progressbar("use_lsd", "Get Pain Relief!", 1750, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + exports['ps-buffs']:AddHealthBuff(10000, 20) + -- exports["qb-smallresources"]:DoAcid(240000) + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) + +RegisterNetEvent('md-drugs:client:takeadderal', function() + QBCore.Functions.Progressbar("use_lsd", "Get Hyper!", 1750, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + exports['ps-buffs']:StaminaBuffEffect(15000, 1.4) + -- exports["qb-smallresources"]:DoAcid(240000) + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) + +RegisterNetEvent('md-drugs:client:takexanax', function() + QBCore.Functions.Progressbar("use_lsd", "Taking a chill Pill!", 1750, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + exports['ps-buffs']:AddStressBuff(10000, 25) + -- exports["qb-smallresources"]:DoAcid(240000) + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) + +RegisterNetEvent('md-drugs:client:takemorphine', function() + QBCore.Functions.Progressbar("use_lsd", "Get Major Pain Relief!", 1750, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + exports['ps-buffs']:AddHealthBuff(10000, 40) + -- exports["qb-smallresources"]:DoAcid(240000) + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) + diff --git a/client/shrooms.lua b/client/shrooms.lua new file mode 100644 index 0000000..a2d105a --- /dev/null +++ b/client/shrooms.lua @@ -0,0 +1,132 @@ +local QBCore = exports['qb-core']:GetCoreObject() +local shrooms = {} + + +function LoadModel(hash) + hash = GetHashKey(hash) + RequestModel(hash) + while not HasModelLoaded(hash) do + Wait(3000) + end +end + +RegisterNetEvent('shrooms:respawnCane', function(loc) + local v = GlobalState.shrooms[loc] + local hash = GetHashKey(v.model) + --if not HasModelLoaded(hash) then LoadModel(hash) end + if not shrooms[loc] then + shrooms[loc] = CreateObject(hash, v.location, false, true, true) + SetEntityAsMissionEntity(shrooms[loc], true, true) + FreezeEntityPosition(shrooms[loc], true) + SetEntityHeading(shrooms[loc], v.heading) + exports['qb-target']:AddTargetEntity(shrooms[loc], { + options = { { + icon = "fas fa-hand", + label = "pick shrooms", + action = function() + QBCore.Functions.Progressbar("pick_cane", "picking shrooms", 2000, false, true, { + disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, + { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, + {}, {}, function() + TriggerServerEvent("shrooms:pickupCane", loc) + ClearPedTasks(PlayerPedId()) + end, function() -- Cancel + ClearPedTasks(PlayerPedId()) + end) + end + } + }, + distance = 3.0 + }) + end +end) + +AddEventHandler('onResourceStart', function(resource) + if resource == GetCurrentResourceName() then + LoadModel('prop_stoneshroom1') + TriggerEvent('shrooms:init') + end + end) + +RegisterNetEvent('shrooms:removeCane', function(loc) + if DoesEntityExist(shrooms[loc]) then DeleteEntity(shrooms[loc]) end + shrooms[loc] = nil +end) + + RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() + Wait(3000) + LoadModel('prop_stoneshroom1') + TriggerEvent('shrooms:init') + end) + + RegisterNetEvent("shrooms:init", function() + for k, v in pairs (GlobalState.shrooms) do + local hash = GetHashKey(v.model) + if not HasModelLoaded(hash) then LoadModel(hash) end + if not v.taken then + shrooms[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) + SetEntityAsMissionEntity(shrooms[k], true, true) + FreezeEntityPosition(shrooms[k], true) + SetEntityHeading(shrooms[k], v.heading) + exports['qb-target']:AddTargetEntity(shrooms[k], { + options = { { + icon = "fas fa-hand", + label = "Pick shrooms", + action = function() + QBCore.Functions.Progressbar("pick_cane", "Picking Shrooms", 2000, false, true, { + disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, }, + { animDict = 'amb@prop_human_bum_bin@idle_a', anim = 'idle_a', flags = 47, }, + {}, {}, function() + TriggerServerEvent("shrooms:pickupCane", k) + ClearPedTasks(PlayerPedId()) + end, function() -- Cancel + ClearPedTasks(PlayerPedId()) + end) + end + } + }, + distance = 3.0 + }) + end + end +end) + +function EcstasyEffect() + local startStamina = 30 + SetFlash(0, 0, 500, 7000, 500) + while startStamina > 0 do + Wait(1000) + startStamina = startStamina - 1 + RestorePlayerStamina(PlayerId(), 1.0) + if math.random(1, 100) < 51 then + SetFlash(0, 0, 500, 7000, 500) + ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08) + end + end + if IsPedRunning(PlayerPedId()) then + SetPedToRagdoll(PlayerPedId(), math.random(1000, 3000), math.random(1000, 3000), 3, 0, 0, 0) + end + + startStamina = 0 +end + +RegisterNetEvent('md-drugs:client:takeshrooms', function() + QBCore.Functions.Progressbar("use_lsd", "Have Fun!", 1750, false, true, { + disableMovement = false, + disableCarMovement = false, + disableMouse = false, + disableCombat = true, + }, { + animDict = "mp_suicide", + anim = "pill", + flags = 49, + }, {}, {}, function() -- Done + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + TriggerEvent("evidence:client:SetStatus", "widepupils", 300) + EcstasyEffect() + -- exports["qb-smallresources"]:DoAcid(240000) + end, function() -- Cancel + StopAnimTask(PlayerPedId(), "mp_suicide", "pill", 1.0) + QBCore.Functions.Notify("Canceled", "error") + end) +end) diff --git a/client/target.lua b/client/target.lua new file mode 100644 index 0000000..2197047 --- /dev/null +++ b/client/target.lua @@ -0,0 +1,458 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +CreateThread(function() +exports['qb-target']:AddBoxZone("makepowdercoke",Config.makecokepowder,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "makepowdercoke", + heading = 11.0, + debugPoly = false, + minZ = Config.makecokepowder-2, + maxZ = Config.makecokepowder+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:makepowder", + icon = "fas fa-sign-in-alt", + label = "chop it up", + + }, + }, + distance = 2.5 + }) + + exports['qb-target']:AddBoxZone("cutcokepowder",Config.cutcokeone,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "cutcokepowder", + heading = 11.0, + debugPoly = false, + minZ = Config.cutcokeone-2, + maxZ = Config.cutcokeone+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:cutcokeone", + icon = "fas fa-sign-in-alt", + label = "cut up", + + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("cutcokepowdertwo",Config.cutcoke2,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "cutcokepowdertwo", + heading = 11.0, + debugPoly = false, + minZ = Config.cutcoke2-2, + maxZ = Config.cutcoke2+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:cutcoketwo", + icon = "fas fa-sign-in-alt", + label = "cut up", + + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("cutcokepowderthree",Config.cutcoke3,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "cutcokepowderthree", + heading = 11.0, + debugPoly = false, + minZ = Config.cutcoke3-2, + maxZ = Config.cutcoke3+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:cutcokethree", + icon = "fas fa-sign-in-alt", + label = "cut up", + + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("bagcokepowder",Config.bagcoke,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "bagcokepowder", + heading = 11.0, + debugPoly = false, + minZ = Config.bagcoke-2, + maxZ = Config.bagcoke+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:bagcoke", + icon = "fas fa-sign-in-alt", + label = "bagging", + + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("bagcoketwo",Config.bagcoke2,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "bagcoketwo", + heading = 11.0, + debugPoly = false, + minZ = Config.bagcoke2-2, + maxZ = Config.bagcoke2+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:bagcoketwo", + icon = "fas fa-sign-in-alt", + label = "bagging", + + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("bagcokethree",Config.bagcoke3,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "bagcokethree", + heading = 11.0, + debugPoly = false, + minZ = Config.bagcoke3-2, + maxZ = Config.bagcoke3+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:bagcokethree", + icon = "fas fa-sign-in-alt", + label = "bagging", + + }, + }, + distance = 2.5 + }) + + ----- LSD + exports['qb-target']:AddBoxZone("getlysergic",Config.lysergicacid,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "getlysergic", + heading = 156.0, + debugPoly = false, + minZ = Config.lysergicacid-2, + maxZ = Config.lysergicacid+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:getlysergic", + icon = "fas fa-sign-in-alt", + label = "stealing", + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("getdiethylamide",Config.diethylamide,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "getdiethylamide", + heading = 156.0, + debugPoly = false, + minZ = Config.diethylamide-2, + maxZ = Config.diethylamide+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:getdiethylamide", + icon = "fas fa-sign-in-alt", + label = "stealing", + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("refinequalityacid", Config.acidrefine,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "refinequalityacid", + heading = 156.0, + debugPoly = false, + minZ = Config.acidrefine-2, + maxZ = Config.acidrefine+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:refinequalityacid", + icon = "fas fa-sign-in-alt", + label = "Refine", + item = "lsd_one_vial" + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("maketabpaperone",Config.maketabs1,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "maketabpaperone", + heading = 156.0, + debugPoly = false, + minZ = Config.maketabs1-2, + maxZ = Config.maketabs1+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:maketabpaperone", + icon = "fas fa-sign-in-alt", + label = "Make Tabs", + item = "lsd_one_vial", + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("maketabpapertwo",Config.maketabs2 ,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "maketabpapertwo", + heading = 156.0, + debugPoly = false, + minZ = Config.maketabs2-2, + maxZ = Config.maketabs2+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:maketabpapertwo", + icon = "fas fa-sign-in-alt", + label = "Make Tabs", + item = "lsd_vial_two", + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("maketabpaperthree",Config.maketabs3,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "maketabpaperthree", + heading = 156.0, + debugPoly = false, + minZ = Config.maketabs3-2, + maxZ = Config.maketabs3+3, +}, { + options = { + { + type = "client", + event = "md-drugs:client:maketabpaperthree", + icon = "fas fa-sign-in-alt", + label = "Make Tabs", + item = "lsd_vial_three", + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("maketabpaperfour",Config.maketabs4,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "maketabpaperfour", + heading = 156.0, + debugPoly = false, + minZ = Config.maketabs4-2, + maxZ = Config.maketabs4+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:maketabpaperfour", + icon = "fas fa-sign-in-alt", + label = "Make Tabs", + item = "lsd_vial_four", + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("maketabpaperfive",Config.maketabs5,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "maketabpaperfive", + heading = 156.0, + debugPoly = false, + minZ = Config.maketabs5-2, + maxZ = Config.maketabs5+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:maketabpaperfive", + icon = "fas fa-sign-in-alt", + label = "Make Tabs", + item = "lsd_vial_five", + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("maketabpapersix",Config.maketabs6,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "maketabpapersix", + heading = 156.0, + debugPoly = false, + minZ = Config.maketabs6-2, + maxZ = Config.maketabs6+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:maketabpapersix", + icon = "fas fa-sign-in-alt", + label = "Make Tabs", + item = "lsd_vial_six", + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("gettabpaper",Config.gettabs,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "gettabpaper", + heading = 156.0, + debugPoly = false, + minZ = Config.gettabs-2, + maxZ = Config.gettabs+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:buytabs", + icon = "fas fa-sign-in-alt", + label = "Buy Tabs", + item = Config.dirtymoney + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("buylabkit",Config.buylsdlabkit,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "buylabkit", + heading = 156.0, + debugPoly = false, + minZ = Config.buylsdlabkit-2, + maxZ = Config.buylsdlabkit+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:buylabkit", + icon = "fas fa-sign-in-alt", + label = "Buy A Kit", + item = Config.dirtymoney + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("dryplant",Config.dryplant,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "dryplant", + heading = 156.0, + debugPoly = false, + minZ = Config.dryplant-2, + maxZ = Config.dryplant+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:dryplant", + icon = "fas fa-sign-in-alt", + label = "Dry out", + + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("cutheroin",Config.cutheroinone,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "cutheroin", + heading = 156.0, + debugPoly = false, + minZ = Config.cutheroinone-2, + maxZ = Config.cutheroinone+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:cutheroin", + icon = "fas fa-sign-in-alt", + label = "Cut Heroin", + + }, + }, + distance = 2.5 + }) + + exports['qb-target']:AddBoxZone("fillneedle",Config.fillneedle,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "fillneedle", + heading = 156.0, + debugPoly = false, + minZ = Config.fillneedle-2, + maxZ = Config.fillneedle+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:fillneedle", + icon = "fas fa-sign-in-alt", + label = "Fill Needles", + + }, + }, + distance = 2.5 + }) + + exports['qb-target']:AddBoxZone("buyheroinlabkit",Config.buyheroinlabkit,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "buyheroinlabkit", + heading = 156.0, + debugPoly = false, + minZ = Config.buyheroinlabkit-2, + maxZ = Config.buyheroinlabkit+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:buyheroinlabkit", + icon = "fas fa-sign-in-alt", + label = "Buy A Kit", + item = Config.dirtymoney + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("crackmakeone",Config.makecrack,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "crackmakeone", + heading = 156.0, + debugPoly = false, + minZ = Config.makecrack-2, + maxZ = Config.makecrack+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:makecrackone", + icon = "fas fa-sign-in-alt", + label = "cook some crack", + + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("bagcrack",Config.bagcrack,1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "bagcrack", + heading = 156.0, + debugPoly = false, + minZ = Config.bagcrack-2, + maxZ = Config.bagcrack+2, +}, { + options = { + { + type = "client", + event = "md-drugs:client:bagcrack", + icon = "fas fa-sign-in-alt", + label = "cook some crack", + + }, + }, + distance = 2.5 + }) + exports['qb-target']:AddBoxZone("pharmapresc",vector3(-491.57, -341.0, 42.32),1.5, 1.75, { -- 963.37, -2122.95, 31.47 + name = "pharmapresc", + heading = 156.0, + debugPoly = false, + minZ = 40, + maxZ = 44, +}, { + options = { + { + type = "client", + event = "md-drugs:client:fillprescription", + icon = "fas fa-sign-in-alt", + label = "Fill Prescription", + + }, + }, + distance = 2.5 + }) + +end) \ No newline at end of file diff --git a/config.lua b/config.lua new file mode 100644 index 0000000..60319c2 --- /dev/null +++ b/config.lua @@ -0,0 +1,277 @@ +Config = {} --Ignore. + + +Config.rewardItem = "coca_leaf" +Config.rewardItemheroin = "poppyresin" +Config.rewardshrooms = "shrooms" +Config.respawnTime = 150 -- Seconds + + + + +------------- Cocaine locations +Config.makecokepowder = vector3(-1764.61, 439.93, 127.4) -- where to take coca leaves to make powder +Config.cutcokeone = vector3(-1763.51, 437.31, 127.41) -- cutting stage 1 coke with baking soda +Config.cutcoke2 = vector3(-1765.75, 434.22, 127.24) -- cuting stage two with baking soda +Config.cutcoke3 = vector3(-1770.02, 433.16, 127.21) -- cutting stage three with baking soda +Config.bagcoke = vector3(-1771.91, 432.68, 127.22) -- bag stage one +Config.bagcoke2 = vector3(-1773.25, 432.39, 127.23) -- bag stage two +Config.bagcoke3 = vector3(-1775.89, 431.79, 127.3) +---------------- Crack locations +Config.makecrack = vector3(-1778.91, 433.04, 127.4) -- make crack with baking soda with cut coke 1-3 +Config.bagcrack = vector3(-1779.98, 434.88, 127.52) --- bag crack 1-3 stages +------------------------- LSD Locations +Config.lysergicacid = vector3(-1781.53, 435.78, 127.83) -- get lysergic acid +Config.diethylamide = vector3(-1783.48, 436.89, 128.11) -- get diethylamide +Config.gettabs = vector3(-1785.17, 439.18, 128.11) -- buy tab paper +Config.acidrefine = vector3(-1785.49, 439.74, 128.11) -- refine your acid +Config.buylsdlabkit = vector3(-1786.48, 441.65, 128.11) -- buy lab kit +Config.maketabs1 = vector3(-1788.23, 443.56, 128.29) -- make tabs 1 +Config.maketabs2 = vector3(-1789.92, 442.71, 128.31) -- make tabs 2 +Config.maketabs3 = vector3(-1791.06, 446.85, 128.35) -- make tabs 3 +Config.maketabs4 = vector3(-1790.66, 449.93, 128.31) -- make tabs 4 +Config.maketabs5 = vector3(-1790.38, 452.14, 128.31) -- make tabs 5 +Config.maketabs6 = vector3(-1790.03, 454.5, 128.31) -- make tabs 6 + +------------------------- Heroin Locations +Config.dryplant = vector3(-1793.77, 455.84, 128.31) -- turn resin into powder +Config.buyheroinlabkit = vector3(-1796.64, 455.88, 128.31) -- buy heroin lab kit +Config.cutheroinone = vector3(-1799.01, 456.01, 128.31) -- cut heroin stage 1-3 with baking soda +Config.fillneedle = vector3(-1802.74, 456.65, 128.29) -- fill needles with heroin + +------------ Pharma + + +Config.CocaPlant = { + [1] = { + location = vector3(1474.25, -2643.87, 42.88), + heading = 334.49, + model = "prop_plant_01a" + }, + [2] = { + location = vector3(1472.35, -2649.3, 41.87), + heading = 329.56, + model = "prop_plant_01a" + }, + [3] = { + location = vector3(1475.7, -2652.9, 40.8), + heading = 25.16, + model = "prop_plant_01a" + }, + [4] = { + location = vector3(1481.0, -2654.99, 39.86), + heading = 21.52, + model = "prop_plant_01a" + }, + [5] = { + location = vector3(1480.9, -2660.63, 38.68), + heading = 202.97, + model = "prop_plant_01a" + }, + [6] = { + location = vector3(1477.18, -2666.53, 38.19), + heading = 202.97, + model = "prop_plant_01a" + }, + [7] = { + location = vector3(1477.58, -2670.82, 37.73), + heading = 202.97, + model = "prop_plant_01a" + }, + [8] = { + location = vector3(1476.56, -2675.82, 37.46), + heading = 202.97, + model = "prop_plant_01a" + }, + [9] = { + location = vector3(1474.8, -2680.19, 37.03), + heading = 202.97, + model = "prop_plant_01a" + }, + [10] = { + location = vector3(1471.52, -2685.0, 36.82), + heading = 202.97, + model = "prop_plant_01a" + }, + [11] = { + location = vector3(1462.82, -2676.58, 38.83), + heading = 202.97, + model = "prop_plant_01a" + }, + [12] = { + location = vector3(1461.31, -2667.74, 39.67), + heading = 202.97, + model = "prop_plant_01a" + }, + [13] = { + location = vector3(1456.3, -2647.61, 43.39), + heading = 202.97, + model = "prop_plant_01a" + }, + [14] = { + location = vector3(1453.65, -2641.56, 45.0), + heading = 202.97, + model = "prop_plant_01a" + }, +} + + +Config.PoppyPlants = { + [1] = { + location = vector3(-2251.3, -99.18, 100.11), + heading = 334.49, + model = "prop_plant_01b" + }, + [2] = { + location = vector3(-2249.63, -92.97, 101.8), + heading = 329.56, + model = "prop_plant_01b" + }, + [3] = { + location = vector3(-2245.57, -85.12, 104.5), + heading = 25.16, + model = "prop_plant_01b" + }, + [4] = { + location = vector3(-2240.81, -88.48, 105.88), + heading = 21.52, + model = "prop_plant_01b" + }, + [5] = { + location = vector3(-2240.87, -93.36, 103.88), + heading = 334.49, + model = "prop_plant_01b" + }, + [6] = { + location = vector3(-2236.0, -95.34, 102.55), + heading = 329.56, + model = "prop_plant_01b" + }, + [7] = { + location = vector3(-2240.6, -100.01, 100.49), + heading = 25.16, + model = "prop_plant_01b" + }, + [8] = { + location = vector3(-2246.29, -104.92, 99.27), + heading = 21.52, + model = "prop_plant_01b" + }, + [9] = { + location = vector3(-2243.64, -107.99, 96.71), + heading = 334.49, + model = "prop_plant_01b" + }, + [10] = { + location = vector3(-2254.22, -108.76, 97.25), + heading = 329.56, + model = "prop_plant_01b" + }, + [11] = { + location = vector3(-2247.33, -108.92, 97.70), + heading = 25.16, + model = "prop_plant_01b" + }, + [12] = { + location = vector3(-2250.96, -111.22, 97.50), + heading = 21.52, + model = "prop_plant_01b" + }, + [13] = { + location = vector3(465.95, -1021.32, 31.78), + heading = 21.52, + model = "prop_plant_01b" + }, + +} + +Config.shrooms = { + [1] = { + location = vector3(2185.14, 5183.81, 57.48), + heading = 334.49, + model = "prop_stoneshroom1" + }, + [2] = { + location = vector3(2174.45, 5187.85, 57.43), + heading = 329.56, + model = "prop_stoneshroom1" + }, + [3] = { + location = vector3(2166.22, 5196.56, 58.0), + heading = 25.16, + model = "prop_stoneshroom1" + }, + [4] = { + location = vector3(2166.82, 5204.83, 58.63), + heading = 21.52, + model = "prop_stoneshroom1" + }, + [5] = { + location = vector3(2174.84, 5205.82, 59.19), + heading = 334.49, + model = "prop_stoneshroom1" + }, + [6] = { + location = vector3(2184.46, 5201.23, 59.2), + heading = 329.56, + model = "prop_stoneshroom1" + }, + [7] = { + location = vector3(2192.45, 5194.89, 58.86), + heading = 25.16, + model = "prop_stoneshroom1" + }, + [8] = { + location = vector3(2207.53, 5187.81, 58.95), + heading = 21.52, + model = "prop_stoneshroom1" + }, + [9] = { + location = vector3(2213.46, 5191.11, 59.81), + heading = 334.49, + model = "prop_stoneshroom1" + }, + [10] = { + location = vector3(2218.31, 5180.0, 58.18), + heading = 329.56, + model = "prop_stoneshroom1" + }, + [11] = { + location = vector3(2212.75, 5172.35, 57.2), + heading = 25.16, + model = "prop_stoneshroom1" + }, + [12] = { + location = vector3(2208.56, 5167.06, 56.34), + heading = 21.52, + model = "prop_stoneshroom1" + }, + [13] = { + location = vector3(2196.9, 5158.59, 54.84), + heading = 21.52, + model = "prop_stoneshroom1" + }, + + [14] = { + location = vector3(2191.62, 5174.91, 56.68), + heading = 21.52, + model = "prop_stoneshroom1" + }, + [15] = { + location = vector3(2190.18, 5182.54, 57.47), + heading = 21.52, + model = "prop_stoneshroom1" + }, + [16] = { + location = vector3(2185.85, 5190.49, 58.1), + heading = 21.52, + model = "prop_stoneshroom1" + }, + [17] = { + location = vector3(2179.95, 5194.19, 58.26), + heading = 21.52, + model = "prop_stoneshroom1" + }, + + +} \ No newline at end of file diff --git a/html/coke/bakingsoda.png b/html/coke/bakingsoda.png new file mode 100644 index 0000000..3b7cfe8 Binary files /dev/null and b/html/coke/bakingsoda.png differ diff --git a/html/coke/coca_leaf.png b/html/coke/coca_leaf.png new file mode 100644 index 0000000..27b299b Binary files /dev/null and b/html/coke/coca_leaf.png differ diff --git a/html/coke/cocaine_baggy.png b/html/coke/cocaine_baggy.png new file mode 100644 index 0000000..51eb439 Binary files /dev/null and b/html/coke/cocaine_baggy.png differ diff --git a/html/coke/cocaine_baggystagethree.png b/html/coke/cocaine_baggystagethree.png new file mode 100644 index 0000000..75110bd Binary files /dev/null and b/html/coke/cocaine_baggystagethree.png differ diff --git a/html/coke/cocaine_baggystagetwo.png b/html/coke/cocaine_baggystagetwo.png new file mode 100644 index 0000000..0420685 Binary files /dev/null and b/html/coke/cocaine_baggystagetwo.png differ diff --git a/html/coke/coke.png b/html/coke/coke.png new file mode 100644 index 0000000..0b8e7bc Binary files /dev/null and b/html/coke/coke.png differ diff --git a/html/coke/cokestagethree.png b/html/coke/cokestagethree.png new file mode 100644 index 0000000..7e44c01 Binary files /dev/null and b/html/coke/cokestagethree.png differ diff --git a/html/coke/cokestagetwo.png b/html/coke/cokestagetwo.png new file mode 100644 index 0000000..9b1dab1 Binary files /dev/null and b/html/coke/cokestagetwo.png differ diff --git a/html/coke/desktop.ini b/html/coke/desktop.ini new file mode 100644 index 0000000..ef12752 --- /dev/null +++ b/html/coke/desktop.ini @@ -0,0 +1,3 @@ +[LocalizedFileNames] +cocaine_baggy.png=@cocaine_baggy.png,0 +coca_leaf.png=@coca_leaf.png,0 diff --git a/html/coke/loosecoke.png b/html/coke/loosecoke.png new file mode 100644 index 0000000..9156f55 Binary files /dev/null and b/html/coke/loosecoke.png differ diff --git a/html/coke/loosecokestagethree.png b/html/coke/loosecokestagethree.png new file mode 100644 index 0000000..45cc8ed Binary files /dev/null and b/html/coke/loosecokestagethree.png differ diff --git a/html/coke/loosecokestagetwo.png b/html/coke/loosecokestagetwo.png new file mode 100644 index 0000000..847a906 Binary files /dev/null and b/html/coke/loosecokestagetwo.png differ diff --git a/html/crack/crackbag1.png b/html/crack/crackbag1.png new file mode 100644 index 0000000..f70d4a1 Binary files /dev/null and b/html/crack/crackbag1.png differ diff --git a/html/crack/crackbag2.png b/html/crack/crackbag2.png new file mode 100644 index 0000000..09c0a1e Binary files /dev/null and b/html/crack/crackbag2.png differ diff --git a/html/crack/crackbag3.png b/html/crack/crackbag3.png new file mode 100644 index 0000000..ffa0fc8 Binary files /dev/null and b/html/crack/crackbag3.png differ diff --git a/html/crack/crackrock1.png b/html/crack/crackrock1.png new file mode 100644 index 0000000..e943e70 Binary files /dev/null and b/html/crack/crackrock1.png differ diff --git a/html/crack/crackrock2.png b/html/crack/crackrock2.png new file mode 100644 index 0000000..ec4132b Binary files /dev/null and b/html/crack/crackrock2.png differ diff --git a/html/crack/crackrock3.png b/html/crack/crackrock3.png new file mode 100644 index 0000000..659ee7c Binary files /dev/null and b/html/crack/crackrock3.png differ diff --git a/html/desktop.ini b/html/desktop.ini new file mode 100644 index 0000000..e7a1d66 --- /dev/null +++ b/html/desktop.ini @@ -0,0 +1,29 @@ +[LocalizedFileNames] +tab_paper.png=@tab_paper.png,0 +smiley_tabs.png=@smiley_tabs.png,0 +pineapple_tabs.png=@pineapple_tabs.png,0 +gratefuldead_tabs.png=@gratefuldead_tabs.png,0 +bart_tabs.png=@bart_tabs.png,0 +coke.png=@coke.png,0 +loosecoke.png=@loosecoke.png,0 +cocaine_baggy.png=@cocaine_baggy.png,0 +crack_baggy.png=@crack_baggy.png,0 +bakingsoda.png=@bakingsoda.png,0 +lysergic_acid.png=@lysergic_acid.png,0 +diethylamide.png=@diethylamide.png,0 +lsd_vial_two.png=@lsd_vial_two.png,0 +lsd_vial_three.png=@lsd_vial_three.png,0 +lsd_vial_six.png=@lsd_vial_six.png,0 +lsd_vial_four.png=@lsd_vial_four.png,0 +lsd_vial_five.png=@lsd_vial_five.png,0 +lsd_one_vial.png=@lsd_one_vial.png,0 +smileysheet.png=@smileysheet.png,0 +wildcherry_tabs.png=@wildcherry_tabs.png,0 +wildcherrysheet.png=@wildcherrysheet.png,0 +yinyangsheet.png=@yinyangsheet.png,0 +yinyang_tabs.png=@yinyang_tabs.png,0 +pineapplesheet.png=@pineapplesheet.png,0 +labkit_dirty.png=@labkit_dirty.png,0 +labkit.png=@labkit.png,0 +emptyvial.png=@emptyvial.png,0 +gratefuldeadsheet.png=@gratefuldeadsheet.png,0 diff --git a/html/heroin/PoppyResin.png b/html/heroin/PoppyResin.png new file mode 100644 index 0000000..9c4d19f Binary files /dev/null and b/html/heroin/PoppyResin.png differ diff --git a/html/heroin/desktop.ini b/html/heroin/desktop.ini new file mode 100644 index 0000000..56d7307 --- /dev/null +++ b/html/heroin/desktop.ini @@ -0,0 +1,2 @@ +[LocalizedFileNames] +PoppyResin.png=@PoppyResin.png,0 diff --git a/html/heroin/emptyvial.png b/html/heroin/emptyvial.png new file mode 100644 index 0000000..c7aa1ff Binary files /dev/null and b/html/heroin/emptyvial.png differ diff --git a/html/heroin/heroin.png b/html/heroin/heroin.png new file mode 100644 index 0000000..3edd4da Binary files /dev/null and b/html/heroin/heroin.png differ diff --git a/html/heroin/heroin_ready.png b/html/heroin/heroin_ready.png new file mode 100644 index 0000000..525bc89 Binary files /dev/null and b/html/heroin/heroin_ready.png differ diff --git a/html/heroin/heroin_readystagethree.png b/html/heroin/heroin_readystagethree.png new file mode 100644 index 0000000..72d4df5 Binary files /dev/null and b/html/heroin/heroin_readystagethree.png differ diff --git a/html/heroin/heroin_readystagetwo.png b/html/heroin/heroin_readystagetwo.png new file mode 100644 index 0000000..f0af48e Binary files /dev/null and b/html/heroin/heroin_readystagetwo.png differ diff --git a/html/heroin/heroinpowder.png b/html/heroin/heroinpowder.png new file mode 100644 index 0000000..9156f55 Binary files /dev/null and b/html/heroin/heroinpowder.png differ diff --git a/html/heroin/heroinpowderstagethree.png b/html/heroin/heroinpowderstagethree.png new file mode 100644 index 0000000..847a906 Binary files /dev/null and b/html/heroin/heroinpowderstagethree.png differ diff --git a/html/heroin/heroinpowderstagetwo.png b/html/heroin/heroinpowderstagetwo.png new file mode 100644 index 0000000..45cc8ed Binary files /dev/null and b/html/heroin/heroinpowderstagetwo.png differ diff --git a/html/heroin/heroinstagethree.png b/html/heroin/heroinstagethree.png new file mode 100644 index 0000000..27a0bc1 Binary files /dev/null and b/html/heroin/heroinstagethree.png differ diff --git a/html/heroin/heroinstagetwo.png b/html/heroin/heroinstagetwo.png new file mode 100644 index 0000000..13f61ca Binary files /dev/null and b/html/heroin/heroinstagetwo.png differ diff --git a/html/heroin/labkit.png b/html/heroin/labkit.png new file mode 100644 index 0000000..b0eca94 Binary files /dev/null and b/html/heroin/labkit.png differ diff --git a/html/heroin/labkit_dirty.png b/html/heroin/labkit_dirty.png new file mode 100644 index 0000000..0e2a62e Binary files /dev/null and b/html/heroin/labkit_dirty.png differ diff --git a/html/heroin/syringe.png b/html/heroin/syringe.png new file mode 100644 index 0000000..f403453 Binary files /dev/null and b/html/heroin/syringe.png differ diff --git a/html/lsd/bart_tabs.png b/html/lsd/bart_tabs.png new file mode 100644 index 0000000..bf0e846 Binary files /dev/null and b/html/lsd/bart_tabs.png differ diff --git a/html/lsd/bartsheet.png b/html/lsd/bartsheet.png new file mode 100644 index 0000000..4ee9e8d Binary files /dev/null and b/html/lsd/bartsheet.png differ diff --git a/html/lsd/desktop.ini b/html/lsd/desktop.ini new file mode 100644 index 0000000..68b873d --- /dev/null +++ b/html/lsd/desktop.ini @@ -0,0 +1,3 @@ +[LocalizedFileNames] +bartsheet.png=@bartsheet.png,0 +gratefuldeadsheet.png=@gratefuldeadsheet.png,0 diff --git a/html/lsd/diethylamide.png b/html/lsd/diethylamide.png new file mode 100644 index 0000000..d65ced3 Binary files /dev/null and b/html/lsd/diethylamide.png differ diff --git a/html/lsd/gratefuldead_tabs.png b/html/lsd/gratefuldead_tabs.png new file mode 100644 index 0000000..6163bef Binary files /dev/null and b/html/lsd/gratefuldead_tabs.png differ diff --git a/html/lsd/gratefuldeadsheet.png b/html/lsd/gratefuldeadsheet.png new file mode 100644 index 0000000..2449d20 Binary files /dev/null and b/html/lsd/gratefuldeadsheet.png differ diff --git a/html/lsd/labkit.png b/html/lsd/labkit.png new file mode 100644 index 0000000..b0eca94 Binary files /dev/null and b/html/lsd/labkit.png differ diff --git a/html/lsd/labkit_dirty.png b/html/lsd/labkit_dirty.png new file mode 100644 index 0000000..0e2a62e Binary files /dev/null and b/html/lsd/labkit_dirty.png differ diff --git a/html/lsd/lsd_one_vial.png b/html/lsd/lsd_one_vial.png new file mode 100644 index 0000000..f902935 Binary files /dev/null and b/html/lsd/lsd_one_vial.png differ diff --git a/html/lsd/lsd_vial_five.png b/html/lsd/lsd_vial_five.png new file mode 100644 index 0000000..054ce87 Binary files /dev/null and b/html/lsd/lsd_vial_five.png differ diff --git a/html/lsd/lsd_vial_four.png b/html/lsd/lsd_vial_four.png new file mode 100644 index 0000000..a674348 Binary files /dev/null and b/html/lsd/lsd_vial_four.png differ diff --git a/html/lsd/lsd_vial_six.png b/html/lsd/lsd_vial_six.png new file mode 100644 index 0000000..8ab6b35 Binary files /dev/null and b/html/lsd/lsd_vial_six.png differ diff --git a/html/lsd/lsd_vial_three.png b/html/lsd/lsd_vial_three.png new file mode 100644 index 0000000..37a7e09 Binary files /dev/null and b/html/lsd/lsd_vial_three.png differ diff --git a/html/lsd/lsd_vial_two.png b/html/lsd/lsd_vial_two.png new file mode 100644 index 0000000..9ea20f5 Binary files /dev/null and b/html/lsd/lsd_vial_two.png differ diff --git a/html/lsd/lysergic_acid.png b/html/lsd/lysergic_acid.png new file mode 100644 index 0000000..80a678a Binary files /dev/null and b/html/lsd/lysergic_acid.png differ diff --git a/html/lsd/pineapple_tabs.png b/html/lsd/pineapple_tabs.png new file mode 100644 index 0000000..eb06726 Binary files /dev/null and b/html/lsd/pineapple_tabs.png differ diff --git a/html/lsd/pineapplesheet.png b/html/lsd/pineapplesheet.png new file mode 100644 index 0000000..73b6dca Binary files /dev/null and b/html/lsd/pineapplesheet.png differ diff --git a/html/lsd/smiley_tabs.png b/html/lsd/smiley_tabs.png new file mode 100644 index 0000000..52bc99b Binary files /dev/null and b/html/lsd/smiley_tabs.png differ diff --git a/html/lsd/smileysheet.png b/html/lsd/smileysheet.png new file mode 100644 index 0000000..4989881 Binary files /dev/null and b/html/lsd/smileysheet.png differ diff --git a/html/lsd/tab_paper.png b/html/lsd/tab_paper.png new file mode 100644 index 0000000..9b15908 Binary files /dev/null and b/html/lsd/tab_paper.png differ diff --git a/html/lsd/wildcherry_tabs.png b/html/lsd/wildcherry_tabs.png new file mode 100644 index 0000000..9f97b1d Binary files /dev/null and b/html/lsd/wildcherry_tabs.png differ diff --git a/html/lsd/wildcherrysheet.png b/html/lsd/wildcherrysheet.png new file mode 100644 index 0000000..789764f Binary files /dev/null and b/html/lsd/wildcherrysheet.png differ diff --git a/html/lsd/yinyang_tabs.png b/html/lsd/yinyang_tabs.png new file mode 100644 index 0000000..21c8433 Binary files /dev/null and b/html/lsd/yinyang_tabs.png differ diff --git a/html/lsd/yinyangsheet.png b/html/lsd/yinyangsheet.png new file mode 100644 index 0000000..d08139c Binary files /dev/null and b/html/lsd/yinyangsheet.png differ diff --git a/html/pharma/adderal.png b/html/pharma/adderal.png new file mode 100644 index 0000000..b1488e0 Binary files /dev/null and b/html/pharma/adderal.png differ diff --git a/html/pharma/adderalprescription.png b/html/pharma/adderalprescription.png new file mode 100644 index 0000000..e261bf7 Binary files /dev/null and b/html/pharma/adderalprescription.png differ diff --git a/html/pharma/morphine.png b/html/pharma/morphine.png new file mode 100644 index 0000000..657c7c7 Binary files /dev/null and b/html/pharma/morphine.png differ diff --git a/html/pharma/morphineprescription.png b/html/pharma/morphineprescription.png new file mode 100644 index 0000000..478bb9a Binary files /dev/null and b/html/pharma/morphineprescription.png differ diff --git a/html/pharma/pillbottle.png b/html/pharma/pillbottle.png new file mode 100644 index 0000000..37d5773 Binary files /dev/null and b/html/pharma/pillbottle.png differ diff --git a/html/pharma/prescriptionpad.png b/html/pharma/prescriptionpad.png new file mode 100644 index 0000000..000c0e4 Binary files /dev/null and b/html/pharma/prescriptionpad.png differ diff --git a/html/pharma/vicodin.png b/html/pharma/vicodin.png new file mode 100644 index 0000000..5fe9888 Binary files /dev/null and b/html/pharma/vicodin.png differ diff --git a/html/pharma/vicodinprescription.png b/html/pharma/vicodinprescription.png new file mode 100644 index 0000000..4cc5157 Binary files /dev/null and b/html/pharma/vicodinprescription.png differ diff --git a/html/pharma/xanax.png b/html/pharma/xanax.png new file mode 100644 index 0000000..c5f7d6b Binary files /dev/null and b/html/pharma/xanax.png differ diff --git a/html/pharma/xanaxprescription.png b/html/pharma/xanaxprescription.png new file mode 100644 index 0000000..199fff4 Binary files /dev/null and b/html/pharma/xanaxprescription.png differ diff --git a/html/shrooms/shrooms.png b/html/shrooms/shrooms.png new file mode 100644 index 0000000..725366b Binary files /dev/null and b/html/shrooms/shrooms.png differ diff --git a/server/cocaine.lua b/server/cocaine.lua new file mode 100644 index 0000000..831c0e0 --- /dev/null +++ b/server/cocaine.lua @@ -0,0 +1,181 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +GlobalState.CocaPlant = Config.CocaPlant + +Citizen.CreateThread(function() + for _, v in pairs(Config.CocaPlant) do + v.taken = false + end +end) + +function CaneCooldown(loc) + CreateThread(function() + Wait(Config.respawnTime * 1000) + Config.CocaPlant[loc].taken = false + GlobalState.CocaPlant = Config.CocaPlant + Wait(1000) + TriggerClientEvent('coke:respawnCane', -1, loc) + end) +end + +RegisterNetEvent("coke:pickupCane") +AddEventHandler("coke:pickupCane", function(loc) + if not Config.CocaPlant[loc].taken then + Config.CocaPlant[loc].taken = true + GlobalState.CocaPlant = Config.CocaPlant + TriggerClientEvent("coke:removeCane", -1, loc) + CaneCooldown(loc) + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem(Config.rewardItem, 1) + TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items[Config.rewardItem], "add") + end +end) + + +RegisterServerEvent('md-drugs:server:makepowder', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local randomchance = math.random(1,100) + + if randomchance <= 80 then + Player.Functions.RemoveItem("coca_leaf", 1) + Player.Functions.AddItem("coke", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coca_leaf'], "remove", 1) + elseif randomchance >= 81 and randomchance <= 95 then + Player.Functions.RemoveItem("coca_leaf", 1) + Player.Functions.AddItem("cokestagetwo", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['cokestagetwo'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coca_leaf'], "remove", 1) + else + Player.Functions.RemoveItem("coca_leaf", 1) + Player.Functions.AddItem("cokestagethree", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['cokestagethree'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coca_leaf'], "remove", 1) + end +end) + + +RegisterServerEvent('md-drugs:server:cutcokeone', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local chance = math.random(1,4) + if Player.Functions.RemoveItem('coke', chance ) then + if Player.Functions.RemoveItem('bakingsoda', chance ) then + if Player.Functions.AddItem('loosecoke', chance) then + TriggerClientEvent('QBCore:Notify', src, "you make some cut coke", "success") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['loosecoke'], "add", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke'], "remove", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", chance) + + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got baking soda", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the powder", "error") + end +end) + +RegisterServerEvent('md-drugs:server:cutcoketwo', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local chance = math.random(1,4) + if Player.Functions.RemoveItem('cokestagetwo', chance ) then + if Player.Functions.RemoveItem('bakingsoda', chance ) then + if Player.Functions.AddItem('loosecokestagetwo', chance) then + TriggerClientEvent('QBCore:Notify', src, "you make some cut coke", "success") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['loosecokestagetwo'], "add", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['cokestagetwo'], "remove", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", chance) + + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got baking soda", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the powder", "error") + end +end) + +RegisterServerEvent('md-drugs:server:cutcokethree', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local chance = math.random(1,4) + if Player.Functions.RemoveItem('cokestagethree', chance ) then + if Player.Functions.RemoveItem('bakingsoda', chance ) then + if Player.Functions.AddItem('loosecokestagethree', chance) then + TriggerClientEvent('QBCore:Notify', src, "you make some cut coke", "success") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['loosecokestagethree'], "add", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['coke'], "remove", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", chance) + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got baking soda", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the powder", "error") + end +end) + + +RegisterServerEvent('md-drugs:server:bagcoke', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local chance = math.random(1,3) + if Player.Functions.RemoveItem('loosecoke', chance ) then + if Player.Functions.RemoveItem('empty_weed_bag', chance) then + if Player.Functions.AddItem('cokebaggy', chance) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['cokebaggy'], "add", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['loosecoke'], "remove", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['empty_weed_bag'], "remove", chance) + TriggerClientEvent('QBCore:Notify', src, "you got bags", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got bags", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the supplies", "error") + end +end) + +RegisterServerEvent('md-drugs:server:bagcoketwo', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local chance = math.random(1,3) + if Player.Functions.RemoveItem('loosecokestagetwo', chance ) then + if Player.Functions.RemoveItem('empty_weed_bag', chance) then + if Player.Functions.AddItem('cokebaggystagetwo', chance) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['cokebaggystagetwo'], "add", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['loosecokestagetwo'], "remove", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['empty_weed_bag'], "remove", chance) + TriggerClientEvent('QBCore:Notify', src, "you got bags", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got bags", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the supplies", "error") + end +end) + +RegisterServerEvent('md-drugs:server:bagcokethree', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local chance = math.random(1,3) + if Player.Functions.RemoveItem('loosecokestagethree', chance ) then + if Player.Functions.RemoveItem('empty_weed_bag', chance) then + if Player.Functions.AddItem('cokebaggystagethree', chance) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['cokebaggystagethree'], "add", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['loosecokestagethree'], "remove", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['empty_weed_bag'], "remove", chance) + TriggerClientEvent('QBCore:Notify', src, "you got bags", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got bags", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the supplies", "error") + end +end) + diff --git a/server/crack.lua b/server/crack.lua new file mode 100644 index 0000000..e383682 --- /dev/null +++ b/server/crack.lua @@ -0,0 +1,106 @@ +local QBCore = exports['qb-core']:GetCoreObject() + + +RegisterServerEvent('md-drugs:server:makecrackone', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + + if Player.Functions.RemoveItem('loosecoke', 1 ) then + if Player.Functions.RemoveItem('bakingsoda', 1) then + if Player.Functions.AddItem('crackrock', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['crackrock'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['loosecoke'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "nice crack!", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got that soda", "error") + end + elseif Player.Functions.RemoveItem('loosecokestagetwo', 1 ) then + if Player.Functions.RemoveItem('bakingsoda', 1) then + if Player.Functions.AddItem('crackrockstagetwo', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['crackrockstagetwo'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['loosecokestagetwo'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "nice crack!", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got that soda", "error") + end + elseif Player.Functions.RemoveItem('loosecokestagethree', 1 ) then + if Player.Functions.RemoveItem('bakingsoda', 1) then + if Player.Functions.AddItem('crackrockstagethree', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['crackrockstagethree'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['loosecokestagethree'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "nice crack!", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got that soda", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the supplies", "error") + end +end) + +RegisterServerEvent('md-drugs:server:bagcrack', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local luck = math.random(1,100) + if Player.Functions.RemoveItem('crackrock', 1 ) then + if Player.Functions.RemoveItem('empty_weed_bag', 1) then + if luck <= 10 then + Player.Functions.AddItem('baggedcracked', 4) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['baggedcracked'], "add", 4) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['crackrock'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['empty_weed_bag'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "nice crack!", "success") + else + Player.Functions.AddItem('baggedcracked', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['baggedcracked'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['crackrock'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['empty_weed_bag'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "nice crack!", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got bags", "error") + end + elseif Player.Functions.RemoveItem('crackrockstagetwo', 1 ) then + if Player.Functions.RemoveItem('empty_weed_bag', 1) then + if luck <= 10 then + Player.Functions.AddItem('baggedcrackedstagetwo', 4) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['baggedcrackedstagetwo'], "add", 4) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['crackrockstagetwo'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['empty_weed_bag'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "nice crack!", "success") + else Player.Functions.AddItem('baggedcrackedstagetwo', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['baggedcrackedstagetwo'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['crackrockstagetwo'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['empty_weed_bag'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "nice crack!", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got bags", "error") + end + elseif Player.Functions.RemoveItem('crackrockstagethree', 1 ) then + if Player.Functions.RemoveItem('empty_weed_bag', 1) then + if luck <= 10 then + Player.Functions.AddItem('baggedcrackedstagethree', 4) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['baggedcrackedstagethree'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['crackrockstagethree'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['empty_weed_bag'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "nice crack!", "success") + else + Player.Functions.AddItem('baggedcrackedstagethree', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['baggedcrackedstagethree'], "add", 4) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['crackrockstagethree'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['empty_weed_bag'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "nice crack!", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got bags", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the supplies", "error") + end +end) \ No newline at end of file diff --git a/server/heroin.lua b/server/heroin.lua new file mode 100644 index 0000000..7fd1e2f --- /dev/null +++ b/server/heroin.lua @@ -0,0 +1,259 @@ +local QBCore = exports['qb-core']:GetCoreObject() +GlobalState.PoppyPlants = Config.PoppyPlants + + +Citizen.CreateThread(function() + for _, v in pairs(Config.PoppyPlants) do + v.taken = false + end +end) + + +function heroinCooldown(loc) + CreateThread(function() + Wait(Config.respawnTime * 1000) + Config.PoppyPlants[loc].taken = false + GlobalState.PoppyPlants = Config.PoppyPlants + Wait(1000) + TriggerClientEvent('heroin:respawnCane', -1, loc) + end) +end + + +RegisterNetEvent("heroin:pickupCane") +AddEventHandler("heroin:pickupCane", function(loc) + if not Config.PoppyPlants[loc].taken then + Config.PoppyPlants[loc].taken = true + GlobalState.PoppyPlants = Config.PoppyPlants + TriggerClientEvent("heroin:removeCane", -1, loc) + heroinCooldown(loc) + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem(Config.rewardItemheroin, 1) + TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items[Config.rewardItemheroin], "add") + end +end) + +RegisterServerEvent('md-drugs:server:dryplant', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local randomchance = math.random(1,100) + + if randomchance <= 75 then + Player.Functions.RemoveItem("poppyresin", 1) + Player.Functions.AddItem("heroin", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroin'], "add", Config.cokerecieve) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['poppyresin'], "remove", Config.cocaleafbreakdown) + elseif randomchance >= 76 and randomchance <= 90 then + Player.Functions.RemoveItem("poppyresin", 1) + Player.Functions.AddItem("heroinstagetwo", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['cokestagetwo'], "add", Config.cokerecieve) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['poppyresin'], "remove", Config.cocaleafbreakdown) + else + Player.Functions.RemoveItem("poppyresin", 1) + Player.Functions.AddItem("heroinstagethree", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinstagethree'], "add", Config.cokerecieve) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['poppyresin'], "remove", Config.cocaleafbreakdown) + end +end) + + +RegisterServerEvent('md-drugs:server:cutheroin', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local chance = math.random(1,4) + if Player.Functions.RemoveItem('heroin', chance ) then + if Player.Functions.RemoveItem('bakingsoda', chance ) then + if Player.Functions.AddItem('heroincut',chance) then + TriggerClientEvent('QBCore:Notify', src, "you make some cut coke", "success") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroincut'], "add", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroin'], "remove", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", chance) + + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the powder", "error") + end + elseif Player.Functions.RemoveItem('heroinstagetwo', chance ) then + if Player.Functions.RemoveItem('bakingsoda', chance ) then + if Player.Functions.AddItem('heroincutstagetwo', chance) then + TriggerClientEvent('QBCore:Notify', src, "you make some cut coke", "success") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroincutstagetwo'], "add", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinstagetwo'], "remove", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", chance) + + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the powder", "error") + end + elseif Player.Functions.RemoveItem('heroinstagethree', chance ) then + if Player.Functions.RemoveItem('bakingsoda', chance ) then + if Player.Functions.AddItem('heroincutstagethree', chance) then + TriggerClientEvent('QBCore:Notify', src, "you make some cut coke", "success") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroincutstagethree'], "add", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinstagethree'], "remove", chance) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bakingsoda'], "remove", chance) + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the powder", "error") + end + + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the powder", "error") + end +end) + + +QBCore.Functions.CreateUseableItem('heroinlabkit', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local randomchance = math.random(1,100) + +if Player.Functions.RemoveItem("heroinlabkit", 1) then + if randomchance <= 80 then + TriggerClientEvent("md-drugs:client:heatliquidheroin", src) + Player.Functions.AddItem("heroinlabkit", 1) + TriggerClientEvent('QBCore:Notify', src, "you got some heroin", "success") + else + Player.Functions.AddItem('dirtyheroinlabkit', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['dirtyheroinlabkit'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinlabkit'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "you ruined your kit!", "error") + end +end +end) + + +QBCore.Functions.CreateUseableItem('dirtyheroinlabkit', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if Player.Functions.RemoveItem("cleaningkit", 1) then + if Player.Functions.RemoveItem("dirtyheroinlabkit", 1) then + Player.Functions.AddItem("heroinlabkit", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['dirtyheroinlabkit'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['cleaningkit'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinlabkit'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "You cleaned that so well!", "success") + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the right stuff", "error") + end +else +TriggerClientEvent('QBCore:Notify', src, "how you gonna clean that?", "error") +end + +end) + +RegisterServerEvent('md-drugs:server:heatliquidheroin', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + if Player.Functions.RemoveItem('heroincut', 1) then + if Player.Functions.RemoveItem('emptyvial', 1) then + Player.Functions.AddItem('heroinvial', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroincut'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['emptyvial'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinvial'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "you made some heroin", "success") + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the right shit", "error") + end + elseif Player.Functions.RemoveItem('heroincutstagetwo', 1) then + if Player.Functions.RemoveItem('emptyvial', 1) then + Player.Functions.AddItem('heroinvialstagetwo', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroincutstagetwo'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['emptyvial'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinvialstagetwo'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "you made some heroin", "success") + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the right shit", "error") + end + elseif Player.Functions.RemoveItem('heroincutstagethree', 1) then + if Player.Functions.RemoveItem('emptyvial', 1) then + Player.Functions.AddItem('heroinvialstagethree', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroincutstagethree'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['emptyvial'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinvialstagethree'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "you made some heroin", "success") + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the right shit", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the right shit", "error") + end +end) + +RegisterServerEvent('md-drugs:server:failheatingheroin', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if Player.Functions.RemoveItem('heroincut', 1) then + if Player.Functions.RemoveItem('heroincutstagetwo', 1) then + Player.Functions.RemoveItem('heroincutstagethree', 1) + TriggerClientEvent('QBCore:Notify', src, "you overheated them idiot", "error") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroincut'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroincutstagetwo'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroincutstagethree'], "remove", 1) + + end +end +end) + + +RegisterServerEvent('md-drugs:server:fillneedle', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + + if Player.Functions.RemoveItem('heroinvial', 1 ) then + if Player.Functions.RemoveItem('needle', 1) then + if Player.Functions.AddItem('heroin_ready', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroin_ready'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinvial'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['needle'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "you got bags", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you dont have a syring", "error") + end + elseif Player.Functions.RemoveItem('heroinvialstagetwo', 1 ) then + if Player.Functions.RemoveItem('needle', 1) then + if Player.Functions.AddItem('heroin_readystagetwo', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroin_readystagetwo'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinvialstagetwo'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['needle'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "you got bags", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you dont have a syring", "error") + end + elseif Player.Functions.RemoveItem('heroinvialstagethree', 1 ) then + if Player.Functions.RemoveItem('needle', 1) then + if Player.Functions.AddItem('heroin_readystagethree', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroin_readystagethree'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinvialstagethree'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['needle'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "you got bags", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you dont have a syring", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the supplies", "error") + end +end) + + + +RegisterServerEvent('md-drugs:server:failheroin', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + + if Player.Functions.RemoveItem('heroinvialstagethree', 1 ) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinvialstagethree'], "remove", 1) + elseif Player.Functions.RemoveItem('heroinvialstagetwo', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinvialstagetwo'], "remove", 1) + else + Player.Functions.RemoveItem('heroinvial', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinvial'], "remove", 1) + end +end) + diff --git a/server/lsd.lua b/server/lsd.lua new file mode 100644 index 0000000..354c2ba --- /dev/null +++ b/server/lsd.lua @@ -0,0 +1,453 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +RegisterServerEvent('md-drugs:server:getlysergic', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if Player.Functions.AddItem('lysergic_acid', 2) then + TriggerClientEvent('QBCore:Notify', src, "you got Lysergic Acid", "success") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lysergic_acid'], "add", 2) + end +end) + +RegisterServerEvent('md-drugs:server:getdiethylamide', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if Player.Functions.AddItem('diethylamide', 2) then + TriggerClientEvent('QBCore:Notify', src, "you got diethylamide", "success") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['diethylamide'], "add", 2) + end +end) + +QBCore.Functions.CreateUseableItem('lsdlabkit', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local randomchance = math.random(1,100) + +if Player.Functions.RemoveItem("lsdlabkit", 1) then + if randomchance <= 80 then + TriggerClientEvent("md-drugs:client:heatliquid", src) + Player.Functions.AddItem("lsdlabkit", 1) + TriggerClientEvent('QBCore:Notify', src, "you got the weakest LSD", "success") + else + Player.Functions.AddItem('dirtylsdlabkit', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['dirtylsdlabkit'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsdlabkit'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "you ruined your kit!", "error") + end +end +end) + + +QBCore.Functions.CreateUseableItem('dirtylsdlabkit', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if Player.Functions.RemoveItem("cleaningkit", 1) then + if Player.Functions.RemoveItem("dirtylsdlabkit", 1) then + Player.Functions.AddItem("lsdlabkit", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['dirtylsdlabkit'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['cleaningkit'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsdlabkit'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "You cleaned that so well!", "success") + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the right stuff", "error") + end +else +TriggerClientEvent('QBCore:Notify', src, "how you gonna clean that?", "error") +end + +end) + + +RegisterServerEvent('md-drugs:server:heatliquid', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + if Player.Functions.RemoveItem('diethylamide', 1) then + if Player.Functions.RemoveItem('lysergic_acid', 1) then + Player.Functions.AddItem('lsd_one_vial', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['diethylamide'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lysergic_acid'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_one_vial'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "you made some LSD", "success") + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the right shit", "error") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the right shit", "error") + end +end) + +RegisterServerEvent('md-drugs:server:failheating', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if Player.Functions.RemoveItem('diethylamide', Config.diethylamideliquid) then + if Player.Functions.RemoveItem('lysergic_acid', Config.lysergicacidliquid) then + TriggerClientEvent('QBCore:Notify', src, "you overheated them idiot", "error") + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['diethylamide'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lysergic_acid'], "remove", 1) + end + end +end) + + +RegisterServerEvent('md-drugs:server:refinequalityacid', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local randomchance = math.random(1,100) + +if Player.Functions.RemoveItem('lsd_one_vial', 1) then + if randomchance <= 60 then + Player.Functions.AddItem('lsd_vial_two', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_two'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "You Made Slightly Better LSD", "Success") + elseif randomchance >= 61 and randomchance <= 75 then + Player.Functions.AddItem('lsd_vial_three', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_three'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "You Made Decently Better LSD", "Success") + elseif randomchance >= 76 and randomchance <= 85 then + Player.Functions.AddItem('lsd_vial_four', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_four'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "You Made Pretty good LSD", "Success") + elseif randomchance >= 86 and randomchance <= 93 then + Player.Functions.AddItem('lsd_vial_five', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_five'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "You Made Damn Good LSD", "Success") + else + Player.Functions.AddItem('lsd_vial_six', 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_six'], "add", 1) + TriggerClientEvent('QBCore:Notify', src, "The Homies Will Be Trippin Balls", "Success") + end + end +end) + +RegisterServerEvent('md-drugs:server:failrefinequality', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local randomchance = math.random(1,100) + +if Player.Functions.RemoveItem('lsd_one_vial', 1) then + end +end) + + +RegisterServerEvent('md-drugs:server:gettabpaper', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local amount = math.random(5000, 20000) + +if Player.Functions.RemoveItem('marked_money', amount) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['marked_money'], "remove", amount) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['tab_paper'], "add", 10) + Player.Functions.AddItem('tab_paper', 10) + + end +end) + +RegisterServerEvent('md-drugs:server:getlabkit', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local amount = 250000 + +if Player.Functions.RemoveItem('marked_money', 250000) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['marked_money'], "remove", 250000) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsdlabkit'], "add", 1) + Player.Functions.AddItem('lsdlabkit', 1) + + end +end) + + +RegisterServerEvent('md-drugs:server:getheroinlabkit', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local amount = 250000 + +if Player.Functions.RemoveItem('marked_money', 250000) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['marked_money'], "remove", 250000) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['heroinlabkit'], "add", 1) + Player.Functions.AddItem('heroinlabkit', 1) + + end +end) + + +RegisterServerEvent('md-drugs:server:maketabpaperone', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_one_vial', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_one_vial'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['tab_paper'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['smileyfacesheet'], "add", 1) + Player.Functions.RemoveItem('tab_paper', 1) + Player.Functions.AddItem('smileyfacesheet', 1) + end +end) + +RegisterServerEvent('md-drugs:server:maketabpapertwo', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_vial_two', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_two'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['tab_paper'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['wildcherrysheet'], "add", 1) + Player.Functions.RemoveItem('tab_paper', 1) + Player.Functions.AddItem('wildcherrysheet', 1) + end +end) + +RegisterServerEvent('md-drugs:server:maketabpaperthree', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_vial_three', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_three'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['tab_paper'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['yinyangsheet'], "add", 1) + Player.Functions.RemoveItem('tab_paper', 1) + Player.Functions.AddItem('yinyangsheet', 1) + end +end) + +RegisterServerEvent('md-drugs:server:maketabpaperfour', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_vial_four', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_four'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['tab_paper'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['pineapplesheet'], "add", 1) + Player.Functions.RemoveItem('tab_paper', 1) + Player.Functions.AddItem('pineapplesheet', 1) + end +end) + +RegisterServerEvent('md-drugs:server:maketabpaperfive', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_vial_five', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_five'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['tab_paper'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bartsheet'], "add", 1) + Player.Functions.RemoveItem('tab_paper', 1) + Player.Functions.AddItem('bartsheet', 1) + end +end) + +RegisterServerEvent('md-drugs:server:maketabpapersix', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_vial_six', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_six'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['tab_paper'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['gratefuldeadsheet'], "add", 1) + Player.Functions.RemoveItem('tab_paper', 1) + Player.Functions.AddItem('gratefuldeadsheet', 1) + end +end) + +RegisterServerEvent('md-drugs:server:failtabsix', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_vial_six', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_six'], "remove", 1) + end +end) + +RegisterServerEvent('md-drugs:server:failtabsfive', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_vial_five', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_five'], "remove", 1) + end +end) + +RegisterServerEvent('md-drugs:server:failtabsfour', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_vial_four', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_four'], "remove", 1) + end +end) + +RegisterServerEvent('md-drugs:server:failtabsthree', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_vial_three', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_three'], "remove", 1) + end +end) + +RegisterServerEvent('md-drugs:server:failtabstwo', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_vial_two', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_vial_two'], "remove", 1) + end +end) + +RegisterServerEvent('md-drugs:server:failtabsone', function() +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if Player.Functions.RemoveItem('lsd_one_vial', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['lsd_one_vial'], "remove", 1) + end +end) + + + +QBCore.Functions.CreateUseableItem('smileyfacesheet', function(source) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local amount = math.random(1,10) + +if Player.Functions.RemoveItem("smileyfacesheet", 1) then + Player.Functions.AddItem("Smiley_tabs", amount) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['smileyfacesheet'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['Smiley_tabs'], "add", amount) + end +end) + +QBCore.Functions.CreateUseableItem('wildcherrysheet', function(source) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local amount = math.random(1,10) + +if Player.Functions.RemoveItem("wildcherrysheet", 1) then + Player.Functions.AddItem("wildcherry_tabs", amount) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['wildcherrysheet'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['wildcherry_tabs'], "add", amount) + end +end) + + +QBCore.Functions.CreateUseableItem('yinyangsheet', function(source) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local amount = math.random(1,10) + +if Player.Functions.RemoveItem("yinyangsheet", 1) then + Player.Functions.AddItem("yinyang_tabs", amount) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['yinyangsheet'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['yinyang_tabs'], "add", amount) + end +end) + + +QBCore.Functions.CreateUseableItem('pineapplesheet', function(source) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local amount = math.random(1,10) + +if Player.Functions.RemoveItem("pineapplesheet", 1) then + Player.Functions.AddItem("pineapple_tabs", amount) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['pineapplesheet'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['pineapple_tabs'], "add", amount) + end +end) + + +QBCore.Functions.CreateUseableItem('bartsheet', function(source) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local amount = math.random(1,10) + +if Player.Functions.RemoveItem("bartsheet", 1) then + Player.Functions.AddItem("bart_tabs", amount) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bartsheet'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['bart_tabs'], "add", amount) + end +end) + + +QBCore.Functions.CreateUseableItem('gratefuldeadsheet', function(source) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local amount = math.random(1,10) + +if Player.Functions.RemoveItem("gratefuldeadsheet", 1) then + Player.Functions.AddItem("gratefuldead_tabs", amount) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['gratefuldeadsheet'], "remove", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['gratefuldead_tabs'], "add", amount) + end +end) + +QBCore.Functions.CreateUseableItem('smiley_tabs', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if TriggerClientEvent('md-drugs:client:takesmileytabs', src, item.name) then + Player.Functions.RemoveItem('smiley_tabs', 1) + end +end) + +QBCore.Functions.CreateUseableItem('wildcherry_tabs', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if TriggerClientEvent('md-drugs:client:takewildcherrytabs', src, item.name) then + Player.Functions.RemoveItem('wildcherry_tabs', 1) + end +end) + +QBCore.Functions.CreateUseableItem('yinyang_tabs', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if TriggerClientEvent('md-drugs:client:takeyinyangtabs', src, item.name) then + Player.Functions.RemoveItem('yinyang_tabs', 1) + end +end) + + +QBCore.Functions.CreateUseableItem('pineapple_tabs', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if TriggerClientEvent('md-drugs:client:takepineappletabs', src, item.name) then + Player.Functions.RemoveItem('pineapple_tabs', 1) + end +end) + +QBCore.Functions.CreateUseableItem('bart_tabs', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if TriggerClientEvent('md-drugs:client:takebarttabs', src, item.name) then + Player.Functions.RemoveItem('bart_tabs', 1) + end +end) + +QBCore.Functions.CreateUseableItem('gratefuldead_tabs', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + +if TriggerClientEvent('md-drugs:client:takegratefuldeadtabs', src, item.name) then + Player.Functions.RemoveItem('gratefuldead_tabs', 1) + end +end) \ No newline at end of file diff --git a/server/pharma.lua b/server/pharma.lua new file mode 100644 index 0000000..d5e7815 --- /dev/null +++ b/server/pharma.lua @@ -0,0 +1,128 @@ +local QBCore = exports['qb-core']:GetCoreObject() + +RegisterServerEvent('md-drugs:server:fillprescription', function() + local src = source + local Player = QBCore.Functions.GetPlayer(src) + + if Player.Functions.RemoveItem('vicodin_prescription', 1 ) then + if Player.Functions.AddItem('vicodinbottle', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['vicodinbottle'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['vicodin_prescription'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "got some pills!", "success") + end + elseif Player.Functions.RemoveItem('adderal_prescription', 1 ) then + if Player.Functions.AddItem('adderalbottle', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['adderalbottle'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['adderal_prescription'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "got some pills!", "success") + end + elseif Player.Functions.RemoveItem('morphine_prescription', 1 ) then + if Player.Functions.AddItem('morphinebottle', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['vicodinbottle'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['morphine_prescription'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "got some pills!", "success") + end + elseif Player.Functions.RemoveItem('xanax_prescription', 1 ) then + if Player.Functions.AddItem('xanaxbottle', 1) then + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['xanaxbottle'], "add", 1) + TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items['vicodin_prescription'], "remove", 1) + TriggerClientEvent('QBCore:Notify', src, "got some pills!", "success") + end + else + TriggerClientEvent('QBCore:Notify', src, "you aint got the supplies", "error") + end +end) + +QBCore.Functions.CreateUseableItem('vicodinbottle', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local luck = math.random(10,30) + +if TriggerClientEvent('md-drugs:client:openingvicodin', src, item.name) then + Player.Functions.AddItem('vicodin', luck) + Player.Functions.RemoveItem('vicodinbottle', 1) + TriggerClientEvent('QBCore:Notify', src,"You got ".. luck .. "Vicodin!", "success") + end +end) + +QBCore.Functions.CreateUseableItem('adderalbottle', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local luck = math.random(10,30) + +if TriggerClientEvent('md-drugs:client:openingadderal', src, item.name) then + Player.Functions.AddItem('adderal', luck) + Player.Functions.RemoveItem('adderalbottle', 1) + TriggerClientEvent('QBCore:Notify', src,"You got ".. luck .. "Adderal!", "success") + end +end) + +QBCore.Functions.CreateUseableItem('morphinebottle', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local luck = math.random(10,30) + +if TriggerClientEvent('md-drugs:client:openingmorphine', src, item.name) then + Player.Functions.AddItem('morphine', luck) + Player.Functions.RemoveItem('morphinebottle', 1) + TriggerClientEvent('QBCore:Notify', src,"You got ".. luck .. "Morphine!", "success") + end +end) + +QBCore.Functions.CreateUseableItem('xanaxbottle', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) +local luck = math.random(10,30) + +if TriggerClientEvent('md-drugs:client:openingxanax', src, item.name) then + Player.Functions.AddItem('xanax', luck) + Player.Functions.RemoveItem('xanaxbottle', 1) + TriggerClientEvent('QBCore:Notify', src,"You got ".. luck .. "Xanax!", "success") + end +end) + +QBCore.Functions.CreateUseableItem('vicodin', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if TriggerClientEvent('md-drugs:client:takevicodin', src, item.name) then + Player.Functions.RemoveItem('vicodin', 1) + TriggerClientEvent('QBCore:Notify', src,"You Took Vicodin", "success") + end +end) + +QBCore.Functions.CreateUseableItem('adderal', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if TriggerClientEvent('md-drugs:client:takeadderal', src, item.name) then + Player.Functions.RemoveItem('adderal', 1) + TriggerClientEvent('QBCore:Notify', src,"You Took adderal", "success") + end +end) + +QBCore.Functions.CreateUseableItem('xanax', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if TriggerClientEvent('md-drugs:client:takexanax', src, item.name) then + Player.Functions.RemoveItem('xanax', 1) + TriggerClientEvent('QBCore:Notify', src,"You Took xanax", "success") + end +end) + +QBCore.Functions.CreateUseableItem('morphine', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if TriggerClientEvent('md-drugs:client:takemorphine', src, item.name) then + Player.Functions.RemoveItem('morphine', 1) + TriggerClientEvent('QBCore:Notify', src,"You Took morphine", "success") + end +end) + + diff --git a/server/shrooms.lua b/server/shrooms.lua new file mode 100644 index 0000000..e1fa1e0 --- /dev/null +++ b/server/shrooms.lua @@ -0,0 +1,45 @@ +local QBCore = exports['qb-core']:GetCoreObject() +GlobalState.shrooms = Config.shrooms + + +Citizen.CreateThread(function() + for _, v in pairs(Config.shrooms) do + v.taken = false + end +end) + + +function shroomsCooldown(loc) + CreateThread(function() + Wait(Config.respawnTime * 1000) + Config.shrooms[loc].taken = false + GlobalState.shrooms = Config.shrooms + Wait(1000) + TriggerClientEvent('shrooms:respawnCane', -1, loc) + end) +end + + +RegisterNetEvent("shrooms:pickupCane") +AddEventHandler("shrooms:pickupCane", function(loc) + if not Config.shrooms[loc].taken then + Config.shrooms[loc].taken = true + GlobalState.shrooms = Config.shrooms + TriggerClientEvent("shrooms:removeCane", -1, loc) + shroomsCooldown(loc) + local Player = QBCore.Functions.GetPlayer(source) + Player.Functions.AddItem(Config.rewardshrooms, 1) + TriggerClientEvent('inventory:client:ItemBox', source, QBCore.Shared.Items[Config.rewardshrooms], "add") + end +end) + +QBCore.Functions.CreateUseableItem('shrooms', function(source, item) +local src = source +local Player = QBCore.Functions.GetPlayer(src) + + +if TriggerClientEvent('md-drugs:client:takeshrooms', src, item.name) then + Player.Functions.RemoveItem('shrooms', 1) + TriggerClientEvent('QBCore:Notify', src,"You have a good trip!", "success") + end +end) \ No newline at end of file