⚙ī¸Integration

Information about how to integrate our speaker system with your server's resources.

Introduction

We have made the script very easy to use while also keeping it very customizable.

After successfully installing the resource, you should start by completing these following steps:

1ī¸âƒŖ Speaker creation

  1. Speaker menu

Players can create new speakers through the speakers menu by default.

The default command for speakers menu is /speakers.

  1. Inventory

If you don't want the players to be able to create new speakers through the command, this resource also supports inventory based speakers.

To make this feature work, you will need to change creationMethod to inventory in editable_server/config.lua and create the speaker item in your inventory resource.

All speakers use the same item. The difference is in item metadata (image, label, description).

Add this section to ox_inventory/data/items.lua

['speaker'] = {
    label = 'Speaker',
    weight = 0,
    description = 'Speaker.',
    consume = 0,
    server = {
        export = 'rahe-speakers.speaker'
    }
},

If you didn't name the item speaker, adjust the inventoryItemId in editable_server/config.lua accordingly.

If you didn't name the item speaker, adjust the inventoryItemId in editable_server/config.lua accordingly.

ī¸2ī¸âƒŖ Obtaining Youtube API key

A YouTube API key is required for certain features like queues and music history.

We provide two detailed tutorials on how to obtain it: one text-based and one video.

Choose whichever you prefer.

  1. Video tutorial

  1. Text tutorial

  1. Register or login into Google Console Cloud

  2. Skip to step 7 if you already have an account

  3. Select your country and accept Terms of Service

  4. Navigate to APIs & Services > Credentials in the left sidebar

  5. Click Create Project, fill in details, and click Create

  6. Once project is set up, click Create Credentials

  7. Select API key

  8. Copy the key and insert it into editable_server/config.lua -> youtubeApiKey

  9. Go to Enabled APIs and Services in the left sidebar

  10. Click Enable APIs and Services at the top

  11. Search for YouTube Data API v3 and select it

  12. Click Enable

All done! The script will now use youtube API to fetch music related data!

Last updated