# Arc-Trucking

<figure><img src="/files/Re4O7sXi4UFfO8uJbaka" alt=""><figcaption></figcaption></figure>

## What is Arc-Trucking?

*Arc-Trucking is a Very Optimised but Advanced Script for any FiveM Server looking for more Legal and Illegal Opportunities for their Players.*

*This Script allows Players in your Server to Complete Legal Trucking Missions to earn Money but... can also do Illegal Missions if allowed to make a boat-load more but comes the risk of being caught in the process.*

*This Script can advance your Server by giving players a more inclusive Trucking Job.*

## Installation:

1. Download the script from our Official Github or Purchase the Script from our Official Tebex store:   \ <mark style="color:purple;">\[GITHUB]👉</mark> <https://github.com/whisperoffical1>   \ <mark style="color:purple;">\[TEBEX]👉</mark> [<mark style="color:purple;">https://arctyx-studios.tebex.io</mark>](https://arctyx-studios.tebex.io)
2. Extract the ZIP into a Regular Folder with the same name:

"<mark style="color:red;">Arc-Trucking</mark>"

3. Place the folder into your resources directory.
4. Add the following line to your server.cfg:

<mark style="color:red;">ensure Arc-Trucking</mark>

5. Configure the <mark style="color:red;">Mainconfig.lua</mark> + <mark style="color:red;">destinations.lua</mark> + <mark style="color:red;">whitelistedvehicles.lua</mark> + <mark style="color:red;">emotes.lua</mark> (if available) to your server's needs.

6. If using <mark style="color:yellow;">ps-dispatch</mark> <mark style="color:$primary;">then: Locate</mark> <mark style="color:red;">Arc-Trucking</mark><mark style="color:$primary;">, Locate</mark> <mark style="color:red;">configeration/mainconfig.lua</mark> <mark style="color:$primary;">and open.</mark>

7. <mark style="color:$primary;">Locate</mark> <mark style="color:red;">Config.Dispatch</mark> <mark style="color:$primary;">and change it to</mark> <mark style="color:red;">Config.Dispatch = '</mark><mark style="color:yellow;">PS</mark><mark style="color:red;">'</mark>

8. If using <mark style="color:yellow;">ps-dispatch</mark> then: Locate <mark style="color:yellow;">ps-dispatch</mark>, Locate <mark style="color:yellow;">client/alerts.lua</mark> and open.

9. Add the following to bottom of file: <br>

   ```lua
   --==============Arc-Trucking Police Alerts==============--

   local function TruckingJobCarTrailerRobbery()
       local coords = GetEntityCoords(cache.ped)
       local vehicle = GetVehicleData(cache.vehicle)

       local dispatchData = {
           message = locale('Car Trailer Robbery'), -- add this into your locale
           codeName = 'cartrailerrobbery', -- this should be the same as in config.lua
           code = '10-35',
           icon = 'fas fa-car-burst',
           priority = 2,
           coords = coords,
           street = GetStreetAndZone(coords),
           heading = GetPlayerHeading(),
           vehicle = vehicle.name,
           plate = vehicle.plate,
           color = vehicle.color,
           class = vehicle.class,
           doors = vehicle.doors,
           jobs = { 'police' }
       }

       TriggerServerEvent('ps-dispatch:server:notify', dispatchData)
   end
   exports('TruckingJobCarTrailerRobbery', TruckingJobCarTrailerRobbery)

   local function TruckingJobCargoRobbery()
       local coords = GetEntityCoords(cache.ped)
       local vehicle = GetVehicleData(cache.vehicle)

       local dispatchData = {
           message = locale('Cargo Robbery'), -- add this into your locale
           codeName = 'cargorobbery', -- this should be the same as in config.lua
           code = '10-90',
           icon = 'radar_gang_attack_p',
           priority = 2,
           coords = coords,
           street = GetStreetAndZone(coords),
           heading = GetPlayerHeading(),
           vehicle = vehicle.name,
           plate = vehicle.plate,
           color = vehicle.color,
           class = vehicle.class,
           doors = vehicle.doors,
           jobs = { 'police' }
       }

       TriggerServerEvent('ps-dispatch:server:notify', dispatchData)
   end
   exports('TruckingJobCargoRobbery', TruckingJobCargoRobbery)

   --==============Arc-Trucking Police Alerts==============--
   ```

10. if using <mark style="color:yellow;">ps-dispatch</mark> then: Locate <mark style="color:yellow;">ps-dispatch,</mark> Locate <mark style="color:yellow;">shared/config.lua</mark> and open.

11. Add the following under "<mark style="color:yellow;">bobcatsecurityheist</mark>"\ <br>

    ```lua
            ['cartrailerrobbery'] = {
            radius = 0,
            sprite = 500,
            color = 5,
            scale = 1.5,
            length = 5,
            sound = 'robberysound',
            offset = false,
            flash = false
        },
        ['cargorobbery'] = {
            radius = 0,
            sprite = 351,
            color = 48,
            scale = 1.5,
            length = 5,
            sound = 'robberysound',
            offset = false,
            flash = false
        },
    ```

    <br>

12. if using <mark style="color:yellow;">cd-dispatch</mark> then: Locate <mark style="color:red;">Blood-Trucking</mark>, Locate <mark style="color:red;">configeration/mainconfig.lua</mark> and Open.

13. Locate <mark style="color:red;">Config.Dispatch</mark> and change to: <mark style="color:red;">Config.Dispatch = '</mark><mark style="color:yellow;">CD</mark><mark style="color:red;">'</mark>

14. If using <mark style="color:yellow;">qb-dispatch</mark> then: Locate <mark style="color:yellow;">qb-dispatch</mark>, Locate <mark style="color:yellow;">cl\_main.lua</mark> and Open.

15. in <mark style="color:yellow;">RegisterNetEvent("qb-dispatch:createBlip", function(type, coords)</mark> paste this code anywhere inside of it:\ <br>

    ```lua
    --==============Arc-Trucking Police Alerts==============--

        elseif type == "truckingjobCartrailerrobbery" then
            local alpha = 250
            local Blip = AddBlipForRadius(coords, 75.0)
            SetBlipSprite(Blip, 500)
            SetBlipColour(Blip, 5)
            SetBlipAsShortRange(Blip, true)
            BeginTextCommandSetBlipName("STRING")
            AddTextComponentString('10-35 Car Trailer Robbery In Progress')
            EndTextCommandSetBlipName(Blip)
            while alpha ~= 0 do
                Citizen.Wait(120 * 4)
                alpha = alpha - 1
                SetBlipAlpha(Blip, alpha)
                if alpha == 0 then
                    RemoveBlip(Blip)
                    return
                end
            end
            elseif type == "truckingjobcargorobbery" then
            local alpha = 250
            local Blip = AddBlipForRadius(coords, 75.0)
            SetBlipSprite(Blip, 351)
            SetBlipColour(Blip, 48)
            SetBlipAsShortRange(Blip, true)
            BeginTextCommandSetBlipName("STRING")
            AddTextComponentString('10-90 Cargo Robbery In Progress')
            EndTextCommandSetBlipName(Blip)
            while alpha ~= 0 do
                Citizen.Wait(120 * 4)
                alpha = alpha - 1
                SetBlipAlpha(Blip, alpha)
                if alpha == 0 then
                    RemoveBlip(Blip)
                    return
                end
            end

    --==============Arc-Trucking Police Alerts==============--
    ```

    <br>

16. If using <mark style="color:yellow;">qb-dispatch</mark>: Scroll down in <mark style="color:yellow;">cl\_main.lua</mark> until you find <mark style="color:yellow;">RegisterNetEvents</mark>

17. Paste the following code anywhere below <mark style="color:yellow;">RegisterNetEvent("qb-dispatch:vanrobbery", function()</mark>\ <br>

    ```lua
    --==============Arc-Trucking Police Alerts==============--

    RegisterNetEvent("qb-dispatch:truckingjobcartrailerrobbery", function()
        local playerPed = PlayerPedId()
        local currentPos = GetEntityCoords(playerPed)
        local gender = GetPedGender()
        TriggerServerEvent('dispatch:svNotify', {
            dispatchCode = "10-35",
            firstStreet = GetStreetAndZone(),
            gender = gender,
            priority = 1,
            origin = {x = currentPos.x, y = currentPos.y, z = currentPos.z},
            dispatchMessage = "Car Trailer Robbery"
        })
        PlaySound(-1, "Lose_1st", "GTAO_FM_Events_Soundset", 0, 0, 1)
        TriggerServerEvent("qb-dispatch:truckingjobcartrailerrobbery", currentPos)
    end)

    RegisterNetEvent("qb-dispatch:truckingjobcargorobbery", function()
        local playerPed = PlayerPedId()
        local currentPos = GetEntityCoords(playerPed)
        local gender = GetPedGender()
        TriggerServerEvent('dispatch:svNotify', {
            dispatchCode = "10-90",
            firstStreet = GetStreetAndZone(),
            gender = gender,
            priority = 1,
            origin = {x = currentPos.x, y = currentPos.y, z = currentPos.z},
            dispatchMessage = "Cargo Robbery"
        })
        PlaySound(-1, "Lose_1st", "GTAO_FM_Events_Soundset", 0, 0, 1)
        TriggerServerEvent("qb-dispatch:truckingjobcargorobbery", currentPos)
    end)

    --==============Arc-Trucking Police Alerts==============--
    ```

    <br>

18. If using qb-dispatch: Locate <mark style="color:yellow;">sv\_main.lua</mark> and open.

19. Paste this code at the bottom of the file:\ <br>

    ```lua
    --==============Arc-Trucking Police Alerts==============--

    RegisterServerEvent("qb-dispatch:truckingjobcartrailerrobbery", function(coords)
        for idx, id in pairs(QBCore.Functions.GetPlayers()) do
            local xPlayer = QBCore.Functions.GetPlayer(id)
            if isAuth(xPlayer.PlayerData.job.name) then
                TriggerClientEvent("qb-dispatch:createBlip", xPlayer.PlayerData.source, "truckingjobcartrailerrobbery", coords)
            end
        end
    end)

    RegisterServerEvent("qb-dispatch:truckingjobcargorobbery", function(coords)
        for idx, id in pairs(QBCore.Functions.GetPlayers()) do
            local xPlayer = QBCore.Functions.GetPlayer(id)
            if isAuth(xPlayer.PlayerData.job.name) then
                TriggerClientEvent("qb-dispatch:createBlip", xPlayer.PlayerData.source, "truckingjobcargorobbery", coords)
            end
        end
    end)

    --==============Arc-Trucking Police Alerts==============--
    ```

    \
    \\

20. Restart your server or use refresh + ensure from console followed with the folder name.

## Dependencies

1. [QBCore](https://github.com/qbcore-framework/qb-core)
2. [qb-target](https://github.com/qbcore-framework/qb-target) or [ox\_target](https://github.com/overextended/ox_target) (only if you want to use targetting)
3. [Blood-DrawText](https://bld-development.tebex.io/package/blood-drawtext) (only if you want to use my DrawText System) (script can use GTAs built in drawtext to)
4. [ps-dispatch](https://github.com/Project-Sloth/ps-dispatch) or [cd-dispatch](https://codesign.pro/product/4206357) or [qb-dispatch](https://github.com/iplocator/qb-dispatch)


---

# Agent Instructions: 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:

```
GET https://bld-scripting.gitbook.io/bld-development-or-documentation/scripts/arc-trucking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
