local function islemebolgeleri(location, actionName, event, markerSize)
local sleep = 2000
local playercoords = GetEntityCoords(PlayerPedId())
local distance = GetDistanceBetweenCoords(playercoords, location.x, location.y, location.z, true)
if distance < markerSize then
sleep = 1
DrawMarker(2, location.x, location.y, location.z - 0.5, 0.0, 0.0, 0.0, 0.0, 0, 0.0, Config.MarkerBoyutu, Config.MarkerBoyutu, Config.MarkerBoyutu, 255, 255, 0, 50, false, true, 2, nil, nil, false)
if distance < 1 then
sleep = 1
DrawText3D(location.x, location.y, location.z, '[E] ' .. actionName)
if IsControlJustReleased(0, 38) then
TriggerEvent("progressbar:client:progress", {
name = "muz",
duration = 5000,
label = actionName,
useWhileDead = false,
canCancel = true,
controlDisables = {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
},
animation = {
animDict = "amb@prop_human_bum_shopping_cart@male@idle_a",
anim = "idle_c",
flags = 49,
},
}, function(status)
if not status then
TriggerServerEvent(event)
end
end)
end
end
end
return sleep
end
local function CreateBlip(x, y, z, blipText)
local blip = AddBlipForCoord(x, y, z)
SetBlipSprite(blip, 233)
SetBlipAsShortRange(blip, true)
SetBlipScale(blip, 0.8)
SetBlipColour(blip, 51)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(blipText)
EndTextCommandSetBlipName(blip)
end
Citizen.CreateThread(function()
while true do
local sleep = 2000
sleep = islemebolgeleri(Config.MuzToplama, "Muz Topla", "screwmuztoplama", 30)
sleep = islemebolgeleri(Config.MuzIsleme, "Muz İşle", "screwmuzisleme", 4)
sleep = islemebolgeleri(Config.MuzSatis, "Muzlu Pasta Sat", "screwmuzlupastasat", 4)
Citizen.Wait(sleep)
end
end)
if Config.BlipAc then
CreateThread(function()
CreateBlip(Config.MuzToplamaBlip.x, Config.MuzToplamaBlip.y, Config.MuzToplamaBlip.z, Config.MuzToplamaBlipAd)
CreateBlip(Config.MuzIslemeBlip.x, Config.MuzIslemeBlip.y, Config.MuzIslemeBlip.z, Config.MuzIslemeBlipAd)
CreateBlip(Config.MuzSatisBlip.x, Config.MuzSatisBlip.y, Config.MuzSatisBlip.z, Config.MuzSatisBlipAd)
end)
end