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

<figure><img src="https://4274191150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcaPZpEbITNtKQaqEE6V%2Fuploads%2F5zxKWmU8qBC8EH4x72Mm%2Fbus.png?alt=media&#x26;token=d5b3f414-f1b6-4400-a475-63da47ac66c1" 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="https://4274191150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcaPZpEbITNtKQaqEE6V%2Fuploads%2FCy3y3Gv3t8FZT4Pa6RRc%2Ffeatures.png?alt=media&#x26;token=0477a285-417f-4ada-8bee-4413fec70123" 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="https://4274191150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcaPZpEbITNtKQaqEE6V%2Fuploads%2FKolaTzag0myC87a8DXZz%2Finstall.png?alt=media&#x26;token=3165a02a-6af8-42f2-b619-3388fb5bc51d" 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="https://4274191150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcaPZpEbITNtKQaqEE6V%2Fuploads%2FzUBw2K8iJtQN1PmrvtyY%2Fchangelog.png?alt=media&#x26;token=a35ca929-89e9-4d76-a7e1-5967797b7a25" 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="https://4274191150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcaPZpEbITNtKQaqEE6V%2Fuploads%2FNwMogM8VwPQ3aPHa5VUu%2Fpurchase.png?alt=media&#x26;token=b0f72168-8d77-4fea-b347-8735abd1e002" 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)
