RO/setSoundSpeed

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.

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

Sintaxă

bool setSoundSpeed (element sunet, float viteză)

OOP Syntax Help! I don't understand this!

Method: sound:setSpeed(...)
Variable: .speed
Counterpart: getSoundSpeed


Argumente Necesare

  • sunet: element-ul de tip sound element a cărui viteză de redare trebuie redată.
  • viteză: un număr de tip float reprezentând viteza de redare dorită.

Redare

Redă true dacă viteza de redare a elementului de tip sound a fost schimbată cu succes. În caz contrar, false.

Exemplu

function soundFunc()
sound = playSound("/sounds/jizzy.mp3",true) -- Redă sunetul 'jizzy.mp3' din fișierul sounds;
setSoundSpeed(sound, 1.2) -- Setează viteza de redare a sunetului;
end
addCommandHandler("play", soundFunc)

Vizualizați de asemenea