[Release] wrp_drugs the all in one drugs script

Labas, gal butu galima gauti tavo dc?

Most of the bugs were already fixed in the latest patches, I have been sick for a couple weeks now and will continue work on my scripts tomorrow or at the start of next week.

1 Like

Awesome looking script. Im new to server installs but can work my way through things. Is it possible for anyone who has a few minutes to respond and tell a girl what items need to be added to mysql i have tried many variations with no luck. Sorry to bug you guys and thanks in advance

hey in my sql i made 2 items as folows (name)cannabis (label)marijuana) 2nd (name)bags item(bags) if your free can you message me what you named your items in mysql dont wanna bother dev he mentioned in last reply of thread being sick. I am able to pick the weed but when i get 2 process place it says not enough vrecia which is not enough bags i google vrecia lol

1 Like

I got the script working working thanks a lot @Dutchy30 it only sells marijuana from another esx drug script I have in however its just as good. were very excited to use it in roleplay thanks dutchy and dev.

You dont need the drugs scipt. You need the item. You can get the item any way you want. But its easier if you use any drugs script.

You can change the config file so it accept a other item.

output = {{item = “weed_pooch”, amount = 1}},

weed_pooch is the item you sell too a npc. Change that too something else and you sell that to the npc.

I see the newest version no longer has the start and end times, is this something we still could do?

Hi, there is no SQL file to generate the item ? A least for an exemple ? O_o
Good script, i’m trying tomorrow to combine those 4 things :

To farm / process the drug, but also to use it/sell to people (RP part) and the esx-drugeffects for having good PvP scene with littles boost :smiley: and of course esx_status to use it with the amazing @VortisRD Threw HUD UI for the effect to appear on HUD.

Jeez, idea’s are exploding on my brain !

With this 4 scripts you can do many illegal circuits with everythings needed

  • Farm drugs
  • Process (multiple times Drugs)
  • PVE & Player to Player interaction (selling)
  • Use it for things. Boost, RP, death, hanghover…
  • And a cool HUD to have information on the situation.

Thanks to every man who build them !

@Draven4s Hi sir.
I want to tell you thanks for this script he is very cool.
I manage to configure it on my own way but i need your help on this part.

local distA = GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, closestCoords.x, closestCoords.y, closestCoords.z)
			if Config.sellMode == 2 then
				--print(distA)
				if Config.sellMode == 2 and distA ~= nil and distA < 10.0 and pwba[closestPed] == nil then
					DrawText3D(closestCoords.x, closestCoords.y, closestCoords.z + 1, "[E] Vendre")
					if IsControlJustReleased(0, Keys["E"]) and distA < 2.4 then
						working = true
						TriggerServerEvent("wrp_drugs:sellToNPC")
						TaskChatToPed(closestPed, playerPed, 16, 0.0, 0.0, 0.0, 0.0, 0.0)
						pwba[closestPed] = closestPed
						Citizen.Wait(500)
					end

				end

This is the actual part where we sell Drugs to the closest NPC we go accross.
But i want to enable this function ONLY if the player have in his inventory the drug (by name) and a certain quantity, that we can list.

I think, i think a lot and i can’t manage to do it myself.
I think (with ESX) that i need xPlayer.getInventory(minimal) and i need to check the name and the count variable. But that only what i can manage to do alone.

SCRIPT ERROR: @wrp_drugs/server/main.lua:137: attempt to index a nil value (field ‘?’)

SCRIPT ERROR: @wrp_drugs/server/main.lua:119: bad argument #2 to ‘random’ (number expected, got nil) can anybody give me a hand on this error? When I go up to the drugs and press E this is the error I get.

so when i gather the weed it does the animation fine collects a weed etc but after the animation stops i then can not pick anymore it says im still doing this action idea which part of the script i need to change to stop this happening ?

First of all, great script @Draven4s
Very easy to configure, and set up and configure and get rolling.
I love it.

However I recently encountered a bug whenever it is sell mode 3 (location based sales)
At the end of each sale (once it gives you the money and takes the drugs)
It gets stuck into a constant loop of restarting the sale until all drugs are sold, preventing the user selling the drugs from being able to “cancel” or back out of the sell. This could become problematic during scenarios where someone gets rolled up on while in the act of selling and it renders them unable to cancel and flee.

Do you (or anyone else within the thread) have any idea as to how this can be fixed and corrected to allow a cancellation mid-way through a location sale?

The moment you gather drugs the max i want is 100 but you can farm over hundred i changed this in my database and all but it doesn’t work now players can farm unlimited drugs, no errors or other things

Sorry, I haven’t been supporting this resource for a while, but I will be rewritting it entirely in the near future. Also I’m thinking about creating new scripts like this in the near future as well!

1 Like

please need new drugs scripts as majority do not work

I might update this soon. I say might, because I am busy with university and can’t find much time to update it.

For me the drugs spawn as soon as the server starts not on the assigned time, any idea how to fix this?

Deleted?

remove post!!!