DOCUMENTATION
  • 🌐INTRODUCTION
  • ℹ️INFORMATION
  • 💲PAID SCRIPTS
    • 🎧Surround (Spatial Audio)
      • Introduction
      • Installation
      • API
        • Client
          • Set
          • Get
          • Handlers
        • Server
          • Set
          • Get
        • Shared
      • Examples
    • 🏨Motels
      • Introduction
        • Motel Manager
        • Customer
        • Rent Cycle
        • Share Key
        • Auto System
        • Admin
        • Logs
        • Configurable Codes
        • Optimization
      • Installation
  • 🆓FREE SCRIPTS
    • FiveM Manager Bot
      • INSTALLATION
Powered by GitBook
On this page
  • Check Sound Is Exists
  • Streamer Mode Is Enabled
  • Get TimeStamp
  • Get Type
  • Get Link
  • Get Coords
  • Is Looped
  • Get Info
  • Get Max Duration
  • Get Volume
  • Check Is Playing
  • Check Is Dynamic
  • Check Is Stopped
  • Check Is Paused
  • Get Panner
  • Is Hearing Any Sound
  • Sound Is Loaded

Was this helpful?

  1. PAID SCRIPTS
  2. Surround (Spatial Audio)
  3. API
  4. Client

Get

These are getters

Check Sound Is Exists

local soundExists = exports['mx-surround']:soundExists(soundId)

Parameters

  • soundId: string

Returns

  • boolean


Streamer Mode Is Enabled

local enabledStreamerMode = exports['mx-surround']:isStreamerModeEnabled()

Returns

  • boolean


Get TimeStamp

local timeStamp = exports['mx-surround']:getTimeStamp(soundId)

If the nil or empty returns. It means the song is not loaded yet!

Parameters

  • soundId: string

Returns

  • number | boolean | nil

    • Returns sound' timestamp in seconds


Get Type

local soundType = exports['mx-surround']:getSoundType(soundId)

Parameters

  • soundId: string

Returns

  • "stereo" | "spatial" | false


Get Link

local link = exports['mx-surround']:getLink(soundId)

Parameters

  • soundId: string

Returns

  • string | false


Get Coords

local coords = exports['mx-surround']:getCoords(soundId)

Parameters

  • soundId: string

Returns

  • vector3 | false


Is Looped

local looped = exports['mx-surround']:isLooped(soundId)

Parameters

  • soundId: string

Returns

  • boolean


Get Info

local info = exports['mx-surround']:getInfo(soundId)

Parameters

  • soundId: string

Returns

  • table | false


Get Max Duration

local maxDuration = exports['mx-surround']:getMaxDuration(soundId)

Parameters

  • soundId: string

Returns

  • number | false

    • Returns sound' max duration in seconds


Get Volume

local volume = exports['mx-surround']:getVolume(soundId)

Parameters

  • soundId: string

Returns

  • number | false

    • If sound is the dynamic returns maxVolume or is not returns volume


Check Is Playing

local playing = exports['mx-surround']:isPlaying(soundId)

Parameters

  • soundId: string

Returns

  • boolean


Check Is Dynamic

local dynamic = exports['mx-surround']:isDynamic(soundId)

Parameters

  • soundId: string

Returns

  • boolean


Check Is Stopped

local stopped = exports['mx-surround']:isStopped(soundId)

Parameters

  • soundId: string

Returns

  • boolean


Check Is Paused

local paused = exports['mx-surround']:isPaused(soundId)

Parameters

  • soundId: string

Returns

  • boolean


Get Panner

local panner = exports['mx-surround']:getPanner(soundId)

Parameters

  • soundId: string

Returns

  • PannerNode | false


Is Hearing Any Sound

local isHearing = exports['mx-surround']:hearingAnySound()

Returns

  • boolean


Sound Is Loaded

local isLoaded = exports['mx-surround']:soundIsLoaded()

This function waits until a song is created, if not loaded succesfully then returns false

Returns

  • boolean

PreviousSetNextHandlers

Last updated 1 year ago

Was this helpful?

💲
🎧