> For the complete documentation index, see [llms.txt](https://docs.ak4y.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ak4y.com/scripts/ak4y-shredding/editable-files/cl_utils.lua.md).

# cl\_utils.lua

Copy

```
local sleep = 1000
CreateThread(function()
    if Config.Interaction == "drawtext" then
        while true do
            Wait(sleep)
            local foundzone = false
            if GetDistanceBetweenCoords(vec3(Config.SellCoords.coords.x, Config.SellCoords.coords.y, Config.SellCoords.coords.z), GetEntityCoords(PlayerPedId()), true) < 10 then
                foundzone = true
            end

            if GetDistanceBetweenCoords(vec3(Config.JobCoords.coords.x, Config.JobCoords.coords.y, Config.JobCoords.coords.z), GetEntityCoords(PlayerPedId()), true) < 10 then
                foundzone = true
            end

            if foundzone then
                sleep = 1
                if GetDistanceBetweenCoords(vec3(Config.SellCoords.coords.x, Config.SellCoords.coords.y, Config.SellCoords.coords.z), GetEntityCoords(PlayerPedId()), true) < 2 then
                    Draw3DText({
                        text = "[E] " .. Config.locales[Config.Locale]["game"]["access_sell"],
                        coords = vec3(Config.SellCoords.coords.x, Config.SellCoords.coords.y, Config.SellCoords.coords.z) + vec3(0, 0, 1.0)
                    })
                    if IsControlJustReleased(0, 38) then
                        TriggerEvent('ak4y-shredding:SellMenu')
                    end
                end
                if GetDistanceBetweenCoords(vec3(Config.JobCoords.coords.x, Config.JobCoords.coords.y, Config.JobCoords.coords.z), GetEntityCoords(PlayerPedId()), true) < 2 then
                    Draw3DText({
                        text = "[E] " .. Config.locales[Config.Locale]["game"]["access_menu"],
                        coords = vec3(Config.JobCoords.coords.x, Config.JobCoords.coords.y, Config.JobCoords.coords.z) + vec3(0, 0, 1.0)
                    })
                    if IsControlJustReleased(0, 38) then
                        TriggerEvent('ak4y-shredding:OpenMenu')
                    end
                end
            else
                sleep = 1000
            end
        end
    end
end)

RegisterNetEvent('ak4y-shredding-DisableGpsItem', function()
    if missionstarted and not disabledgps then
        TriggerServerEvent('ak4y-shredding:RemoveGpsRemover')
        TriggerEvent('mhacking:show')
        TriggerEvent('mhacking:start', math.random(6, 7), math.random(15, 30), onHackDone)
    end
end)

onHackDone = function(success)
    TriggerEvent('mhacking:hide')
    if not success then return end
    TriggerServerEvent('ak4y-shredding:DisableBlip', LobbyData) -- don't change
end
```

[Previoussv\_utils.lua](/scripts/ak4y-shredding/editable-files/sv_utils.lua.md) [Nextak4y-giveaway](https://codeworks-fivem.gitbook.io/fivem/~/revisions/8Ic3aVqC3adZS1pXlS13/group-1/ak4y/ak4y-giveaway)

Last updated 6 months ago


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ak4y.com/scripts/ak4y-shredding/editable-files/cl_utils.lua.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
