0xIbra
February 8, 2023, 8:38pm
1
Script
This script is pretty basic so it does not consume much cpu or memory.
It consists of harvesting coca leaves, processing them into cocaine and selling it to the buyer as shown on the showcase video.
Source code and Documentation
The source code and docs are available on Github here: https://github.com/0xIbra/qb-cocaine
Consider leaving a star on Github repo and sharing if you liked this script.
7 Likes
Balt1
February 8, 2023, 10:58pm
2
Hello, very good script, I would like it to be for ESX too
By the way, what hud do you use?
2 Likes
0xIbra
February 9, 2023, 6:04am
3
Hi, unfortunately i won’t be working on ESX any time soon.
If you’re familiar with programming, it wouldn’t be that hard to adapt for ESX.
Regarding the HUD, i’m using qz-hud that i’ve forked and changed to my requirements:
It’s a QBCore only script as well i’m afraid.
1 Like
Is it hard to do so u can corner the cocaine you make?
Ok, so I’m pretty new to all this but I’ve figured out how to change the coords to work elsewhere off the island. My question is… How would I go about setting multiple coords for the PickingZone? Is that possible?
0xIbra
February 24, 2023, 6:10am
6
It would require some coding, you would have to make a for loop to iterate over a number of coords around here:
while true do
playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
local playerHeading = GetEntityHeading(playerPed)
local cocaFieldCoords = Config.PickingZone
-- ==================
-- === Harvesting ===
-- ==================
-- picking zone
local dist = #(playerCoords - cocaFieldCoords)
-- if is near coca field, then start loop and show help text
if dist <= 17.0 then
isInsideZone = true
exports['qb-core']:DrawText(Lang:t("info.pick_coca_leaves"), 'left')
helpTextShowing = true
cocaPickingZoneLoop()
else -- if not then stop showing help text as the player is far away
isInsideZone = false
end