GetSpeaker#
local speaker = exports["wais-speaker"]:GetSpeaker(netId)
- netId:
number- The entity to which the sound is linked NetworkId
Return:
- src:
string- The YouTube video ID of the music being played. Example:
YPuSGGPkMT8.mp3
- The YouTube video ID of the music being played. Example:
- volume:
float- The volume of the song
- min:
0.1 - max:
1.0
- loop?:
boolean- Default:
false
- Default:
- rate?:
float- Default:
1.0
- Default:
- distance:
float- The maximum distance the sound can be heard.
- duration:
float- The current duration of the song.
- maxDuration:
float- The maximum length of the song. (Second)
- play:
boolean- If the song is playing,
true; otherwise,false
- If the song is playing,
- isVehicle:
boolean- If the song is linked to the entity vehicle, then
true, otherwisefalse
- If the song is linked to the entity vehicle, then
OpenMenu#
exports["wais-speaker"]:openMenu(size)
- size:
string- The size of the menu that will open.
- Types:
small,large