How to add a zone to get the job?

Hello I would like to know if someone can help me for a script that allows to have a job but that has one place

Hi dude, I found this: :highlightPlacementCoords(x, y, z, colorIndex)

draws circular marker at pos
-1 = none
0 = red
1 = green
2 = blue
3 = green larger
4 = nothing
5 = green small

Andd your set your script position at the same place that the marker. The marker is just visual. But I think there is a way to add color (like yellow)

for create a zone is script only client is

Citizen.CreateThread(function()

	while true do

        Citizen.Wait(1000)
		local playerPos = GetEntityCoords(GetPlayerPed(-1))

		--ici mettre les variable des pts de farm
        local distanceWeedFarm = GetDistanceBetweenCoords(playerPos.x, playerPos.y, playerPos.z, 2212.22, 5577.224, 53.82, true)

		if distanceWeedFarm < 20 then
			--recolte de cannabis
			sendnotif(tostring("~b~Appuyez sur ~g~E ~b~pour récolter"))
			if IsControlJustPressed(1,Keys["E"]) then
				 TriggerServerEvent('menu:additem',"cannabis",30)
            	sendnotif(tostring("~g~ + 1 ~b~Cannabis"))
            	TriggerServerEvent('menu:success')
            	Citizen.Wait(1000)
			end
         end
	end
end)

just one exemple d’ont use TriggerServerEvent(‘menu:success’) and TriggerServerEvent(‘menu:additem’,“cannabis”,30) is event handler just for me

for marker :

local blip = AddBlipForCoord(131.14, -1302.6, 29.23)
   SetBlipSprite(blip, tonumber(102))
  SetBlipDisplay(blip, 3)
  
  BeginTextCommandSetBlipName("STRING");
  AddTextComponentString(tostring("Dealer"))
  EndTextCommandSetBlipName(blip)
2 Likes

Oh ok he talk about a zone not a marker

But is the event highlightplacement working with fiveM ?

Dictateurfou

Je serais très intéressé par ton script, zone récolte et vente de cannabis, ça me permettrais de m’en servir pour le minage, fermier, etc… Si jamais tu souhaites le partager bien entendu… mais j’en serais vraiment ravis ! je le cherche depuis un BOUT de temps la… tu peux me MP si possible

I would be very interested in your script, zone harvest and sale of cannabis, it would allow me to use it for mining, farmer, etc … If you want to share it of course … but I would really love it ! I’m looking for a time BOUT the … you can me MP if possible

Bonsoir, pourrais-tu m’éclairer sur l’endroit où placer ce script et comment le peaufiner je t’en serais infiniment reconnaissant !

Hey, can you help me for the place where I have to put this script and how to upgrade it you’re great my friend !

Un petit partage d’un script complet pour ce genre de métier serais super pour aider les petites commu et les apprentis dev à aller de l’avant pls

A small sharing of a complete script for this kind of craft would be great to help small commu and dev apps to move forward pls

TY

Tout à fait d’accord, j’aimerais beaucoup le voir histoire d’apprendre un peu plus afin de continuer à le serveur local avec des potes.

Strongly agree, I’d love to see you history learn more in order to keep the local server with some friends.