Encrypted & Unencrypted Options
Reliable Scripts
Fast Support
Fair Prices

Installation Instructions for gs_ttswatch

Follow these steps to properly install and configure your new resource:

  1. Download the Resource
    • Go to portal.cfx.re
    • Navigate to Assets > Granted Assets > gs_ttswatch
    • Download the resource
  2. Extract the Files
    • Open the downloaded .zip file
    • Inside, you'll find a folder named gs_ttswatch
    • Move the entire gs_ttswatch folder into your desired server resources folder (e.g., /resources/[scripts])
  3. Add to Server Configuration
    • Open your server.cfg
    • Add the following line:
      ensure gs_ttswatch
  4. Restart the Server
    • Restart your FiveM server (Important!)
  5. Configure the Script (Optional)
    • Navigate to gs_ttswatch/config.lua
    • Edit the configuration options to fit your server's needs
Additional documentation

Setting up ElevenLabs

  1. Create a free account on ElevenLabs here.
  2. After creating an account, click on Developers at the bottom left and navigate to the API Keys tab.
  3. Press + Create Key and make sure you set Text to Speech to Access.
  4. Copy the API key to gs_ttswatch/config.lua under Config.ElevenLabs.ApiKey.
  5. You can generate up to 20,000 characters for free each month. If you require more characters, you can upgrade to a paid monthly subscription on ElevenLabs.
  6. If you want to use all 20,000 characters, set ModelId = 'eleven_turbo_v2_5' in gs_ttswatch/config.lua.

Triggering audible notification from script

You can play a notification from a server-sided script through:

exports.gs_ttswatch:PlayAudioMessage(serverId, text, name, image, volume, voiceId)
exports.gs_ttswatch:IsAudioLoading(serverId) -- This export returns true while the audible notification is being generated.

or from a client-sided script through:

exports.gs_ttswatch:PlayAudioMessage(text, name, image, volume, voiceId)

If you want to save ElevenLabs credits, you can go to the Text to Speech option in your ElevenLabs account, generate the desired audio and go to History on the top right. Under this tab, you can hover over previously created audio files, and download these directly. Place the downloaded audio file in the gs_ttswatch/html/audio folder and play it directly using the export below.

You can play any pre-recorded audio file (if the file is added to gs_ttswatch/html/audio) from a server-sided script through:

exports.gs_ttswatch:PlaySavedAudioMessage(serverId, fileName, name, image, volume)

or from a client-sided script through:

exports.gs_ttswatch:PlaySavedAudioMessage(fileName, name, image, volume)

Input arguments:

  • serverId: The server-id of the player that should receive the notification (only for server-sided exports).
  • text: The text that will be transformed into a voice-over.
  • fileName: The name of the audio file that will play, i.e. "sample.mp3" (audio file needs to be located in gs_ttswatch/html/audio).
  • name: The name that will be displayed on the hologram.
  • image: The image that will be displayed on the hologram (you can add custom images to gs_ttswatch/html/images).
  • volume: The volume of the voice-over (value between 0-1).
  • voiceId: The voice-id that will be used as the voice.