HolyLib Wiki

VoiceData

VoiceData

This class represents the VoiceData received by a client

Metatable function Description
__tostring Returns a formated string of the VoiceData -> VoiceData [Player Slot][Length/Size]
__index Used to find the functions on the metatable and access saved variables
__newindex Used to allow one to save variables on the object
__gc Internally deletes the VoiceData turning it invalid

Methods

VoiceData VoiceData:CreateCopy( )
Creates a exact copy of the voice data.
string VoiceData:GetData( )
Returns the compressed voice data.
Can be set using VoiceData:SetData
number VoiceData:GetLength( )
Returns the length of the compressed voice data.
Can be set using VoiceData:SetLength
number VoiceData:GetPlayerSlot( )
Returns the currently set player slot.
The player slot is used as the owner of the voice data / the player that sent/spoke it.
Can be set using VoiceData:SetPlayerSlot
boolean VoiceData:GetProximity( )
Returns if the VoiceData is in proximity.
Can be set using VoiceData:SetProximity
table VoiceData:GetTable( )
Returns the lua table used by newindex and index
Returns the uncompressed voice data.
boolean VoiceData:IsValid( )
Returns whether this VoiceData is valid.
VoiceData:SetData( string data, number length = nil )
Sets the new compressed voice data.
VoiceData:SetLength( number length )
Sets the length of the compressed voice data.
You should be careful when using this.
VoiceData:SetPlayerSlot( number plySlot )
Sets the currently set player slot.
The player slot is used as the owner of the voice data / the player that sent/spoke it.
VoiceData:SetProximity( boolean plySlot = false )
Sets if the VoiceData is in proximity.