SerweryWłasny serwerDla twórcówForumFAQDokumentacjaBezpieczeństwo
Pobierz launcher
  1. Dokumentacja
  2. Funkcje klienta
  3. getSoundPosition

Funkcja

getSoundPosition

KlientDźwięk (klient)Identyczna z MTA:SA

Zwraca, w której sekundzie jest odtwarzanie.

Składnia

float getSoundPosition(sound theSound)

Argumenty

theSoundsound
Dźwięk.

Zwraca

Sekunda albo false.

Przykład

addEventHandler("onClientRender", root, function()
    if isElement(music) then
        dxDrawText(("%.0f / %.0f s"):format(getSoundPosition(music), getSoundLength(music)), 20, 320)
    end
end)

Zobacz też