Git Product home page Git Product logo

md-drugs's Introduction

md-drugs

Credits

  • I used Samuel's development Christmas script global states and prop spawning (with permission obtained prior to release) in the development process.

  • Shout out to STACHY225 for working out the meth network animations!

  • Huge credit to Bostra for sharing free scripts and providing sanity checks during moments of confusion. Those cute mushrooms? His creation!

  • Special thanks to Feisty for the stunning visuals. If it looks good, she probably had a hand in it.

  • Special shoutout to Beta TestersYour feedback has been invaluable!

  • Big Credit to Bostra. if you have been around you may have seen him post some free scripts and help people, There was definetly times I dm'd him saying what the fuck am I doing and he helped keep me sane. He also made the cute mushrooms!

  • Jim's Tebex for putting out open source resources that I was able to break and fix and learn how to code

  • jixeltay for putting out banger after banger. These people help the community learn so much more

  • Our partner 1of1 Servers and their discord for their amazing server hosting! absolutely top notch.

Special Thanks To Kamaryn For The Preview

- Thanks to Kamaryn for this [install guide video](https://youtu.be/zvuYnUfrqaA?si=FGJuBO5krZMC14Nd)
  • join their discord for other videos updates.

Dependencies

- [Ox Lib](https://github.com/overextended/ox_lib/releases/tag/v3.12.0)
  • qb-target or ox_target

  • emote script that uses the animations event (rpemotes, dpemotes, scully emotes all work)

  • GAME BUILD 2944 OR LATER

Preview

How to install like a fuckin boss

  • STEP 1

    • qb-inventory users go to md-drugs/items_install/qb-inventory and add the Items to qb-core/shared/items.lua and - Add items from md-drugs/items_install/images to qb-inventory/html/images
    • ox_inventory users go to md-drugs/items_install/ox_inventory and add the Items to ox_inventory/data/items.lua and - Add items from md-drugs/items_install/images to ox_inventory/web/images
  • STEP 2

    • delete qb-drugs
  • STEP 3

    • Inside the config file change all the locations for everything.
      • ps: All locations have been changed to make a preview video easier and with how big of a script this is, Im not going to config it for every city. THESE LOCATION DO NOT DO WELL FOR A LIVE SERVER SO CHANGE THEM
  • STEP 4

  • Head to your emote script search for uncuff if it's missing add it

  • if rp or dpemotes then do this

    ["uncuff"] = {"mp_arresting","a_uncuff","Uncuff", AnimationOptions = {     EmoteLoop = true,     EmoteMoving = true } },
    ["edible"] = { "mp_player_inteat@burger", "mp_player_int_eat_burger", "edible",    AnimationOptions = {        EmoteLoop = false,        EmoteMoving = true    }},
    ["shootup"] = { "rcmpaparazzo1ig_4", "miranda_shooting_up", "Shoot Up",  AnimationOptions = {EmoteLoop = true,EmoteMoving = true,Prop = 'prop_syringe_01',  PansexualPropBone = 18905,PropPlacement = {0.11, 0.03, 0.0, -124.0, 0.0, 0.0},}},
  • if scully emotes do this in emotes.lua
		{
			Label = 'Uncuff',
			Command = 'uncuff',
			Animation = 'a_uncuff',
			Dictionary = 'mp_arresting',
			Options = {
				Flags = {
					Loop = true,
					Move = true,
				},
			}
		},
		{
			Label = 'Edibles',
			Command = 'edible',
			Animation = 'mp_player_int_eat_burger',
			Dictionary = 'mp_player_inteat@burger',
			Options = {
				Flags = {
					Loop = true,
					Move = true,
				},
			}
		},

then in prop emotes do

{
        Label = 'Shoot Up',
        Command = 'shootup',
        Animation = "miranda_shooting_up",
        Dictionary = "rcmpaparazzo1ig_4",
        Options = {
            Flags = {
                Loop = true,
            },
            Props = {
                {
                    Bone = 18905,
                    Name = 'prop_syringe_01',
                    Placement = {
                        vector3(0.11, 0.03, 0.0),
                         vector3( -124.0, 0.0, 0.0),
                    },
                },
            },
        },
    },
  • STEP 5
    • check qb-smallresources/config.lua and if this exists, delete it
[2] = { --Coke Processing Enter/Exit
        [1] = {
            poly = { coords = vector3(909.49, -1589.22, 30.51), heading = 92.24, length = 2, width = 2 },
            allowVeh = false,
            label = '[E] Enter Coke Processing'
        },
        [2] = {
            poly = { coords = vector3(1088.81, -3187.57, -38.99), heading = 181.7, length = 2, width = 2 },
            allowVeh = false,
            label = '[E] Leave'
        }
    }

-- OPTIONAL STEPS

Fivemerr

This is NOT a requirement but something I personally use and believe in.
  • to integrate with fivemerr make sure you have set fivemerrLogs "API_KEY" in your server.cfg

  • Head to /server/functions.lua turn local logs = true

  • profit

Why integrate with Fivemerr? Its a great place to store logs as it doesnt rely on discord webhooks and its far easier to search through

As well as a place to offload images and videos from fivem that doesnt rely on discord since discord API will be automatically deleting images and videos after a certain amount of time If you need an invite to their server look below

     event = 'qb-drugs:client:cornerselling',

     event = 'md-drugs:client:cornerselling',

or just use the command /cornersell

For Qb-shops users

- Head to `qb-shops/config.lua` **Config.Products** and add the folowing items to OR anywhere else you want them. The Only way in this script to get them is to find the travelling merchant
	{name = 'bakingsoda',   price = 100,   amount = 5000, info = {}, type = 'item'},
	{name = 'emptyvial',    price = 100,   amount = 5000, info = {}, type = 'item'},
	{name = 'needle',    	price = 100,   amount = 5000, info = {}, type = 'item'},
  • Tier System

    - Check Players.lua in the server folder of QB-Core. If you see

    PlayerData.metadata['dealerrep'] = PlayerData.metadata['dealerrep'] or 0

    • Then Place This directly under it
     	PlayerData.metadata['coke'] = PlayerData.metadata['coke'] or 0
     	PlayerData.metadata['heroin'] = PlayerData.metadata['heroin'] or 0
     	PlayerData.metadata['lsd'] = PlayerData.metadata['lsd'] or 0
    

IF YOU DONT SEE THE ABOVE THEN GO TO THE CONFIG OF QB-Core

go to the config of qb-core and search metadata, underneath armor = 0, add this

 	lsd = 0,
        coke = 0,
        heroin = 0,
	dealerrep = 0,

mlo i use heres an option. use it or dont.

md-drugs's People

Contributors

b0stra avatar cfoour avatar havekhd avatar iplayer1337fivem avatar mustachedom avatar razerghost avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

md-drugs's Issues

Question

Hello, Just wondering will this work with open MLO's? or just with teleport?

Issue with Config.imagelink

Similar to a previous issue I get this error.
289407025-2b444f21-9b6c-4871-8966-4d7bad0708c6

I changed Config.imagelink to ps-inventory/html/images
I tried to put the path in multiple ways but none of them work.

this is the actual path to the inventory
resources\[ps]\ps-inventory\html\images

Dealers Spawn Twice

Heya,

When I went around and did /newdealer and added new dealers around the map, it spawned in the dealers in twice.

QBCore

image

Bug on prescriptions

When getting prescriptions and opening bottle it gives you pills but once you consume pills it just says opening bottle but it doesn't give you any health or effects.

To when an ESX version

Really liked the preview, but due to my server being on the ESX framework i need to modify the code, but before doing that im just looking to know if there is an ESX version?

Weed

i cant harvest the wet weed but everything else works perfectly fine and i dont even get errors

Issue with deliveries.lua

If someone can help me with this issue it would be greatly apprecaited.
md drugs

CreateThread(function()
local dealermenu = {}
if Config.StupidassNewQbItemName then
for k, v in pairs (QBConfig.ProductsStupidNameRewrite) do
dealermenu[#dealermenu + 1] = {
icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
title = v.label,
event = "md-drugs:client:travellingmerchantox",
args = {
item = v.name,
cost = v.price,
info = v.info,
amount = v.amount,
}
}

               lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu})
    end           
else
     for k, v in pairs (QBConfig.Products) do 
        dealermenu[#dealermenu + 1] = {
                      icon = "nui://"..Config.imagelink..QBCore.Shared.Items[v.name].image,
                      title = v.label,
                      event = "md-drugs:client:travellingmerchantox",
                      args = {
                          item = v.name,
                          cost = v.price,
                         info = v.info,
                         amount = v.amount,
                        }
                    }

               lib.registerContext({id = 'dealermenu',title = "Dealer Menu", options = dealermenu})
    end     
end

end)

map crashing issue

when i use that maps it's crashing my game when i try to noclip on pass away legion square ammunation

Attempt to index a nil value "lib"

I have put this into my QB server. When I launch the script I get this error:
image_2024-02-26_153053545

Is there an easy fix? i'm not too familiar with this code/script and don't want to mess around and break it, Any support would be great!

Thanks,
Raccoon

Corner Selling

Can't seem to get the drug selling to work after testing out each location

having an issue with cocaine

choping leaves and cutting to loose coke works fine, but once i try to bag it, a big bowl of coke gets placed inside of my ped and then nothing happens, if i try again i cant third eye it anymore.

Syntax error

Upon installation I encountered a syntax error following md-drugs/client/travellingmerchant.lua & target.lua. When I dove into the code I noticed that it calls for an "export.qb-target". Not sure if I'm correct or not on this but I don't think the lua likes the "-" in between qb and target. I'm sorry for the bother on this, any help is appreciated. I use all qb besides ps-hud.

Unable to use OX_fuel

SCRIPT ERROR: @md-drugs/client/oxyruns.lua:26: No such export SetFuel in resource ox_fuel

Trying to use OX fuel and keep getting this error

Emote does not work

I tried Scully emotes, it works but need to cancel the emote everytime after an action, dp and rpemotes does not work when doing an action. Is there a fix for this? I added the emotes action but does not changed anything

coke process

first stage of coke process starts but doesn't give me anything in return nothing comes up in f8 and the rest of the script works fine

same for all start processes apart from weed

Issue when entering Coke lab

I have a weird issue, when I am entering the coke lab a menu from QB-menu open up I have checked client file but did not find anything weird
Screenshot 2024-06-23 122855

ox target

hey so ox target does not seem to be working whenever i try to cutcokepowder,cutcoke,bagcoke etc same for meth

question

how do i get this to work with ls-phone

question

anyway this is useable without ui and buffs by PS i cant seem to get ps scripts working correctly for those but would really like to use this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.