EvoLabs
  • 👋Welcome
  • Scripts
    • 🔊evo_sound
      • Installation
      • Config
      • Exports
      • Sync System
    • 🔉evo_sound_player
      • Installation
      • Config
      • Exports
      • Hooks (client-side only)
Powered by GitBook
On this page
  • Client
  • Playing sounds
  • Playing TTS
  • Getters
  • Events
  • Server
  • Playing Sounds
  • Playing TTS
  • Setters
  1. Scripts
  2. evo_sound

Exports

You can use exports by doing: exports["evo_sound"]:PlayUrl(soundId, url, vol, loop, options)

Client

Playing sounds

Function
Desc

Plays URL, will be heard everywhere

Plays URL at location

Playing TTS

Function
Desc

Plays TTS, will be heard everywhere

Plays TTS at location

overrides must be nil or a table, it can override distance, isDynamic, isSpatial and isFilterable

{ distance = 10, isDynamic = true, isSpatial = true, isFilterable = true }

Getters

Function
Desc

Returns current sound URL

Returns current sound position

Returns true if looped, false otherwise

Returns full sound object

Returns true if sound exists, false otherwise

Returns true if sound is playing, false otherwise

Returns true if sound is paused, false otherwise

Returns current sound distance

Returns current sound volume

Returns true if sound is dynamic, false otherwise

Returns sound timestamp

Returns sound max duration

Returns true if player is in streamer mode (muted)

Returns all sounds object

Returns true if player is close to sound

Returns true if sound is spatial

Returns true if sound is fitlerable

Returns true if sound is attached to any entity

Returns attached entity netId

Returns sound current interiorId

Returns sound current audio type (audio, stream)

Events

All events take soundId as first param and a function as second param

Event
Desc

Triggered when sound starts. Wont trigger if SkipEvents is set to true Sound object is passed to the delegate function

Triggered when sound ends Sound object is passed to the delegate function

Triggered when sound is loading Sound object is passed to the delegate function

Triggered when sound is paused Sound object is passed to the delegate function

Triggered when sound is resumed Sound object is passed to the delegate function

Triggered when sound starts Sound object is passed to the delegate function

Triggered when there is an error playing the sound Sound object is passed to the delegate function

Triggered when sound timestamp is updated Sound object is passed to the delegate function

Triggered when sound gets in player range Sound object is passed to the delegate function

Server

Playing Sounds

Plays URL, will be heard everywhere

Plays URL at location

Playing TTS

Function
Desc

Plays TTS, will be heard everywhere

Plays TTS at location

Setters

Function
Desc

Change sound position

Change sound position

Destroy sound

Pause sound

Resume sound

Set sound volume

Set sound timestamp

Enable/disable sound destruction on finish

PreviousConfigNextSync System

Last updated 7 months ago

Triggered when sync data is retrieved from the UI Sync object is passed to the delegate function. Learn more about sync on

🔊
PlayUrl(soundId, url, vol, loop, options)
PlayUrlPos(soundId, url, vol, pos, loop, options, overrides)
PlayTTS(soundId, text, lang, vol, options)
PlayTTSPos(soundId, text, lang, vol, pos, options, overrides)
getLink(soundId)
getPosition(soundId)
isLooped(soundId)
getInfo(soundId)
soundExists(soundId)
isPlaying(soundId)
isPaused(soundId)
getDistance(soundId)
getVolume(soundId)
isDynamic(soundId)
getTimeStamp(soundId)
getMaxDuration(soundId)
isPlayerInStreamerMode()
getAllAudioInfo()
isPlayerCloseToAnySound()
isSpatial(soundId)
isFilterable(soundId)
isAttached(soundId)
getAttachedNetId(soundId)
getInteriorId(soundId)
getAudioType(soundId)
onPlayStart(soundId, delegate)
onPlayEnd(soundId, delegate)
onLoading(soundId, delegate)
onPlayPause(soundId, delegate)
onPlayResume(soundId, delegate)
onPlayStartSilent(soundId, delegate)
onPlayError(soundId, delegate)
onTimestamp(soundId, delegate)
onSoundSync(soundId, delegate)
onInRange(soundId, delegate)
PlayUrl(source, soundId, url, vol, loop)
PlayUrlPos(source, soundId, url, vol, pos, loop, overrides)
PlayTTS(source, soundId, text, lang, vol, loop)
PlayTTSPos(source, soundId, text, lang, vol, pos, loop, overrides)
Position(source, soundId, pos)
Distance(source, soundId, distance)
Destroy(source, soundId)
Pause(source, soundId)
Resume(source, soundId)
setVolume(source, soundId, vol)
setTimeStamp(source, soundId, time_)
destroyOnFinish(soundId, bool)
Sync System