HU/getSoundSpeed

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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

Szintaxis

float getSoundSpeed ( element theSound )

OOP Syntax Help! I don't understand this!

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


Kötelező argumentumok

  • theSound: visszaadja a visszajátszási hangelem sebességét.

Visszaadott érték

A hangelem visszajátszási sebességét adja vissza float értékben. Alapértelmezett hang visszajátszási sebesség az 1.0.

Példa

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)

Lásd még

Fordította