HU/isSoundPaused

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 jelenlegi szünetállapotának visszaadására szolgál.

Ha az elem egy játékos, akkor ez a funkció a játékos hangját fogja használni.

Szintaxis

bool isSoundPaused ( element theSound )

OOP Syntax Help! I don't understand this!

Method: sound:isPaused(...)
Variable: .paused
Counterpart: setSoundPaused


Kötelező argumentumok

  • theSound: the sound element which pause state you want to return.

Visszaadott érték

Visszaad egy true értéket, ha a hangelem szüneteltetve van, false ha nincs, vagy ha érvénytelen argumentumokat adtunk meg.

Példa

Ez a példa ellenőrizni fogja, hogy a hang szüneteltetve van-e, vagy sem, és tájékoztatja erről a játékost.

Click to collapse [-]
Client
theSound = playSound("music/song.mp3")
function checkSongPause()
    local pause = isSoundPaused(theSound)
    if(pause == true) then
        outputChatBox("The sound is paused!")
    else
        outputChatBox("The sound is not paused!")
    end
end
addCommandHandler("checkpause", checkSongPause)

Changelog

Version Description
1.3.2 Added player element to use a players voice

See Also

Fordította