# \[QB/ESX] Bus Travel \[PAID]

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

{% hint style="info" %}
This script is a bus script with the ability to add your own coordinates to where you want to teleport while third-eyeing bus stops & also included with a fade-animation that has progress bar while onboarding the bus. This is a good resource for ways to get around the city for those who don't have a vehicle & want to travel by "bus".
{% endhint %}

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

* <mark style="color:orange;">Group/Job lock specific teleports.</mark>
* <mark style="color:orange;">Configurable text (language).</mark>
* <mark style="color:orange;">Configurable coordinates for teleports.</mark>
* <mark style="color:orange;">Configurable text for bus locations.</mark>
* <mark style="color:orange;">Configurable pricing per bus ride.</mark>

```
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
```

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

* This resource is drag/drop. You will just need to add the following inside of your server.cfg after you've dropped the file into your resources.

> <mark style="color:orange;">ensure adminplus-bus</mark>

{% hint style="warning" %}
Feel free to check the config.lua & customize the bus stop locations.
{% endhint %}

```lua
-- ███████████████████████████████████████████████████████████████████████████ --    

Config = {}

--[[

    add this under "description" if you want to job lock who can access what teleport.

    groups = {
        'none',
    },

    example:

        [1] = {
            coords = vec3(57.07, -1539.88, 29.29),
            heading = 45.1057,
            title = 'LSPD',
            description = '',
            groups = {
                'police',
            },
        },

]]

Config.Text = {
    ['NoAccessTitle'] = 'No Access',
    ['NoAccessDescription'] = 'You do not have access to this bus stop.',
    ['Interact'] = 'Interact'
}

--  ____                                                      ____                 
-- |  _ \   _ __    ___     __ _   _ __    ___   ___   ___    | __ )    __ _   _ __ 
-- | |_) | | '__|  / _ \   / _` | | '__|  / _ \ / __| / __|   |  _ \   / _` | | '__|
-- |  __/  | |    | (_) | | (_| | | |    |  __/ \__ \ \__ \   | |_) | | (_| | | |   
-- |_|     |_|     \___/   \__, | |_|     \___| |___/ |___/   |____/   \__,_| |_|   
--                         |___/                                                    

Config.TeleportTime = 10000

Config.OxLibProgress = true

function ProgressBar()
    if Config.OxLibProgress then
        lib.progressCircle({
            duration = Config.TeleportTime,
            label = 'Taking the bus...',
            position = 'bottom',
            useWhileDead = false,
            canCancel = false,
            disable = {
                car = true,
                move = true,
                combat = true,
            },
        })
    else
        Wait(Config.TeleportTime)
    end
end

-- ____                    ____    _                         
-- | __ )   _   _   ___    / ___|  | |_    ___    _ __    ___ 
-- |  _ \  | | | | / __|   \___ \  | __|  / _ \  | '_ \  / __|
-- | |_) | | |_| | \__ \    ___) | | |_  | (_) | | |_) | \__ \
-- |____/   \__,_| |___/   |____/   \__|  \___/  | .__/  |___/
--                                               |_|          

Config.Price = 5

-- This is used to be able to third eye the bus stops
Config.Item = 'lametro' -- use me if you want item to be used before traveling
--Config.Item = nil -- if you do not want a item to be used uncomment me & comment the one above

Config.Distance = 2.0

Config.BusStops = {
    Busses = { -- Bus Stop
        [1] = {
            coords = vec3(439.0709, -2032.1765, 23.5744),
            heading = 321.33,
            title = 'Watts',
            description = '',
        },
        [2] = {
            coords = vec3(57.07, -1539.88, 29.29),
            heading = 45.1057,
            title = 'Strawberry Ave (Inglewood)',
            description = '',
        },
        [3] = {
            coords = vec3(768.3368, -941.8106, 25.7075),
            heading = 0.0,
            title = 'Popular St',
            description = '',
        },
        [4] = {
            coords = vec3(-1214.73, -1218.43, 7.69),
            heading = 0.0,
            title = 'Bay City Ave',
            description = '',
        },
        [5] = {
            coords = vec3(-1476.15, -634.91, 30.58),
            heading = 0.0,
            title = 'Del Perro (Santa Monica)',
            description = '',
        },
        [6] = {
            coords = vec3(356.09, -1066.97, 29.56),
            heading = 0.0,
            title = 'Vespucci (LSPD)',
            description = '',
            groups = {
                'police',
            },
        },
    },
}

-- ███████████████████████████████████████████████████████████████████████████ --    
```

```
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
```

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

```markup
V 1.0.0
```

* Original Release

```
V 1.0.1
```

* Added required 'item' to be able to third-eye bus stops. (useful for metro cards etc).

```
V 1.0.2
```

* Added QB/ESX compatability.

<pre><code><strong>⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
</strong></code></pre>

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

* <mark style="color:yellow;">Forums Post - none</mark>
* <mark style="color:yellow;">Showcase (video) - none</mark>
* [<mark style="color:yellow;">Tebex (purchase)</mark>](https://adminplus.tebex.io/package/5659619)
* [<mark style="color:yellow;">Support (discord)</mark>](https://discord.gg/J2mP9kJJ83)


---

# 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://docs.adminplus.dev/paid-scripts/qb-esx-bus-travel-paid.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.
