Buckets

bucket_list

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

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

bdtk.get_bucket(id)

get_bucket_by_label

Returns the bucket config matching a label.

Parameters

  • label: string

Returns

  • table | nil

bdtk.get_bucket_by_label(label)

get_bucket_spawn

Returns the spawn point for a bucket.

Parameters

  • id: string

Returns

  • vector4 | nil

bdtk.get_bucket_spawn(id)

get_bucket_respawn

Returns the respawn point for a bucket.

Parameters

  • id: string

Returns

  • vector4 | nil

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

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

bdtk.is_bucket_vip_only(id, vip_level)

apply_bucket_settings

Applies population and lockdown mode to all defined buckets.

bdtk.apply_bucket_settings()

Last updated