RO/getSoundSpeed

From Multi Theft Auto: Wiki
Revision as of 19:01, 17 February 2019 by Vinyard (talk | contribs) (Created page with "__NOTOC__ {{RO/Funcție client}} Această funcție este utilizată pentru a obține viteza de redare a unui element de tip sound. ==Sintaxă== <syntaxhighlight lang...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

Această funcție este utilizată pentru a obține viteza de redare a unui element de tip sound.

Sintaxă

float getSoundSpeed (element sunet)

OOP Syntax Help! I don't understand this!

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


Argumente Necesare

  • sunet: Elementul de tip sound element a cărui viteză de redare se dorește a fi obținută.

Redare

Redă o valoare de tip float ce indică viteza de redare a elementului de tip sound. Viteza default este 1.0.

Exemplu

Click to collapse [-]
Client
function outputSpeed(soundname) 
	local sound = playSound("sounds/" .. tostring(soundname) .. ".mp3") -- Redare sunet din fișierul 'sounds';
	setSoundVolume(sound, 0.5) -- Setarea volumului la 50%;
	outputChatBox("Viteza de redare a sunetului este: " .. getSoundSpeed(sound)) -- Obținerea vitezei de redare a sunetului.
end
addCommandHandler("soundspeed", outputSpeed)

Vizualizați de asemenea