[Release] [ESX] [Drugs]


#206

Hello I’m trying to make it so only the weed blip shows on the map but I cant figure out how if someone could tell me how that would be great. Thanks


#207

Someone can show me where is cocaine leaves located ingame?


#208

Can I get some help here, I can farm all the drugs, but I cant manufacture any of them. I have way more in my inventory than I need yet I still cant process any drug.

Maye this has something to do with it. > when I farm, I can farm for infinite amount of time, it never tells me my inventory is full. Idk if that’s the way its supposed to be or if its supposed to cut me off.


#209

try this
Config = {}
Config.MarkerType = 1
Config.DrawDistance = 100.0
Config.ZoneSize = {x = 5.0, y = 5.0, z = 3.0}
–Config.MarkerColor = {r = 100, g = 204, b = 100}
Config.RequiredCopsCoke = 0
Config.RequiredCopsMeth = 0
Config.RequiredCopsWeed = 0
Config.RequiredCopsOpium = 0
Config.Locale = ‘fr’

Config.Zones = {
CokeFarm = {x=2448.9228515625, y=-1836.8076171875, z=51.953701019287},
CokeTreatment = {x=-458.13967895508, y=-2278.6174316406, z=7.5158290863037},
CokeResell = {x=-1756.1984863281, y=427.31674194336, z=126.68292999268},
MethFarm = {x=1525.298828125, y=1710.0217285156, z=109.00956726074},
MethTreatment = {x=-1001.4151611328, y=4848.0087890625, z=274.00686645508},
MethResell = {x=-63.592178344727, y=-1224.0709228516, z=27.768648147583},
WeedFarm = {x=1609.125, y=6663.5942382813, z=20.961572647095},
WeedTreatment = {x=91.061386108398, y=3750.0380859375, z=39.77326965332},
WeedResell = {x=-54.249694824219, y=-1443.3666992188, z=31.068626403809},
OpiumFarm = {x=1972.784790039, y=3819.3999023438, z=33.428722381592},
OpiumTreatment = {x=971.86499023438,y=-2157.61328125, z=28.475107192994},
OpiumResell = {x=2331.0881347656,y=2570.2250976562,z=46.681819915772}
}

Config.Map = {
{name=“Kokain Toplama”, color=6, scale=0.8, id=403, x=2448.9228515625, y=-1836.8076171875, z=51.953701019287},
{name=“Kokain İşleme”, color=6, scale=0.8, id=403, x=-458.13967895508, y=-2278.6174316406, z=7.5158290863037},
{name=“Kokain Alıcısı”, color=6, scale=0.8, id=403, x=-1756.1984863281, y=427.31674194336, z=126.68292999268},
{name=“Meth Toplama”, color=6, scale=0.8, id=403, x=1525.298828125, y=1710.0217285156, z=109.00956726074},
{name=“Meth İşleme”, color=6, scale=0.8, id=403, x=-1001.4151611328, y=4848.0087890625, z=274.00686645508},
{name=“Meth Alıcısı”, color=6, scale=0.8, id=403, x=-63.592178344727, y=-1224.0709228516, z=27.768648147583},
{name=“Afyon Toplama”, color=6, scale=0.8, id=403, x=1972.784790039, y=3819.3999023438, z=33.428722381592},
{name=“Afyon İşleme”, color=6, scale=0.8, id=403, x=971.86499023438, y=-2157.61328125, z=28.475107192994},
{name=“Afyon Alıcısı”, color=6, scale=0.8, id=403, x=2331.0881347656, y=2570.2250976562, z=46.681819915772},
{name=“Esrar Toplama”, color=2, scale=0.8, id=140, x=1609.125, y=6663.5942382813, z=20.961572647095},
{name=“Esrar İşleme”, color=2, scale=0.8, id=140, x=91.061386108398, y=3750.0380859375, z=39.77326965332},
{name=“Esrar Alıcısı”, color=2, scale=0.8, id=140, x=-54.249694824219, y=-1443.3666992188, z=31.068626403809}
}

just change the names what you want (Esrar : Weed - Afyon : Opium - Meth : Meth - Kokain : Coke - Alıcı : Resell - İşleme : Treatment - Toplama : Farm )


#210

Cannot press E on circles


#211

can you send the map with the locations please ?


#212

I’ve got the same problem as @Samuel-etto. only i don’t get a message about limit at all. I have in database limit of 50 and i’ve set it in the file as 50 (like this: ~= 50). But i dont get a limit. i can gather as much as i want.

What am i doing wrong?


#213

I fixed my problem by setting the limit in the SQL database and leaving the files at ~=-1.


#214

Is IT possibile to turniej on animation when I start collet drugs? Canon anyone help?


#215

Hey! Im new in this forum and developing in fivem! I tried to collect and test esx_drugs script but it gives me this error
Error running system event handling function for resource esx_drugs: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/esx_drugs_sv.lua:622: attempt to index a nil value
stack traceback:
server/esx_drugs_sv.lua:622: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138

I dont know how i can fix this, can you help?


#217

please sent me


#218

So as most of us know, this is method of gathering drugs is very abusable, does anyone know how to make the player stand still while he is gathering to prevent abuse?


#219

I would like to make it so the user has to pay x amount of money as they gather, would it be possible to do this?


#220

@Blaise123 maybe when people come to weed farm make it like in shop, they need to buy x amount of weed for x amount of money


#221

When i change my drug location i cant get them to work


#222

it’s john abruzzi*


#223

Hi everyone. I’m trying to add an extra drug to my server, something similar to moonshine. I added extra code lines in server and client lua. I chose a specific place for my drug and added it into config but everytime i import my edited version of this script to my server I can’t collect any drug(weed, meth etc.) including my new mushroom. The weird thing is that I can still see the in game marker and script is starting without any errors. Have anyone got solution for this kind of problem? If it will be necessary I can send you my code on pv.
Thanks


#224

Anyone know how to make the drugs usable like alcohol?


#225

Is there any way that i can put for every 1 item they harvest transform or sell they have to press E. So for example to harvest 10 weed the player would have to press E 10 times


#226

I have added an animation to mine. You have to add that in the main.lua file for every step.

				TriggerServerEvent('esx_drugs:startHarvestCoke')
				TaskStartScenarioInPlace(playerPed, "WORLD_HUMAN_DRUG_DEALER_HARD", 0, 1)
				TriggerEvent("pNotify:SendNotification", {text = "Collecting coke", type = "success", timeout = 120000, layout = "centerLeft"})
				Citizen.Wait(5000)
				ClearPedTasksImmediately(playerPed)