# Buckets

{% hint style="warning" %}
**SERVER FUNCTIONS**
{% endhint %}

## bucket\_list

Stores bucket definitions for script use.\
If you need the full list for any reason you can access it this way.

```lua
bdtk.bucket_list = {
    main = {
        label = "Main World", -- label for display
        bucket = 0, -- default bucket
        mode = "strict", -- https://docs.fivem.net/natives/?_0xA0F2201F
        population_enabled = false, -- https://docs.fivem.net/natives/?_0xCE51AC2C
        player_cap = false, -- false | number: If number players max players in bucket will be capped at value.
        staff_only = false, -- e.g. { "admin", "mod" }
        vip_only = false, -- e.g. 2 = VIP level 2 required
        spawn = vector4(-268.47, -956.98, 31.22, 208.54), -- spawn point
        respawn = vector4(341.28, -1396.83, 32.51, 48.78) -- respawn point
    }
}
```

***

## get\_bucket

Returns the full bucket config for a given ID.

#### Parameters

* id: `string`

#### Returns

* `table | nil`

```lua
bdtk.get_bucket(id)
```

***

## get\_bucket\_by\_label

Returns the bucket config matching a label.

#### Parameters

* label: `string`

#### Returns

* `table | nil`

```lua
bdtk.get_bucket_by_label(label)
```

***

## get\_bucket\_spawn

Returns the spawn point for a bucket.

#### Parameters

* id: `string`

#### Returns

* `vector4 | nil`

```lua
bdtk.get_bucket_spawn(id)
```

***

## get\_bucket\_respawn

Returns the respawn point for a bucket.

#### Parameters

* id: `string`

#### Returns

* `vector4 | nil`

```lua
bdtk.get_bucket_respawn(id)
```

***

## is\_bucket\_staff\_only

Checks if a bucket is staff-only for a given role.

#### Parameters

* id: `string`
* role: `string`

#### Returns

* `boolean`

```lua
bdtk.is_bucket_staff_only(id, role)
```

***

## is\_bucket\_vip\_only

Checks if a bucket is VIP-only for a given level.

#### Parameters

* id: `string`
* vip\_level: `number`

#### Returns

* `boolean`

```lua
bdtk.is_bucket_vip_only(id, vip_level)
```

***

## apply\_bucket\_settings

Applies population and lockdown mode to all defined buckets.

```lua
bdtk.apply_bucket_settings()
```


---

# 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.boii.dev/fivem-free-resources/bdtk/api/modules/buckets.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.
