HU/getSoundSpeed: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client function hu}} This function is used to return the playback speed of the specified sound element. ==Syntax== <syntaxhighlight lang="lua">float get...")
 
No edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function hu}}
{{Client function hu}}
This function is used to return the playback speed of the specified [[sound]] [[element]].
 
Ez a funkció a megadott [[sound|hang]][[element|elem]] lejátszási sebességének visszaadására szolgál.


==Syntax==  
==Syntax==  

Revision as of 11:37, 19 July 2018

Ez a funkció a megadott hangelem lejátszási sebességének visszaadására szolgál.

Syntax

float getSoundSpeed ( element theSound )

OOP Syntax Help! I don't understand this!

Method: sound:getSpeed(...)
Variable: .speed
Counterpart: setSoundSpeed


Required Arguments

  • theSound: the sound element which playback speed you want to return.

Returns

Returns an float value indicating the playback speed of the sound element. Default sound playback speed is 1.0.

Example

Click to collapse [-]
Client
function outputSpeed(soundname) 
	local sound = playSound("sounds/"..tostring(soundname)..".mp3") --Play the sound from the sounds folder
	setSoundVolume(sound, 0.5) -- set the sound volume to 50%
	outputChatBox("The sound speed : "..getSoundSpeed(sound)) -- output the sound speed
end
addCommandHandler("soundspeed",outputSpeed)

See Also