This article's documentation is for anything that uses the Source engine. Click here for more information.

Play

From Valve Developer Community
Jump to: navigation, search
English (en)Русский (ru)
... Icon-Important.png

play is a console command available in all Source Source games.

Команда play используется непосредственно в игре. В Hammer Editor нужно использовать ambient_generic

Syntax: <play путь/имя_звука.формат>
Воспроизведите звук, в котором"имя_звука.формат"будет взят из папки <sound/>
Пример:play music/hl1_song11.mp3
Звук под названием"hl1_song11.mp3"будет взят из папкиsound/music/

Note.pngNote:Если аудио имеет расширение.wav, то его формат писать не обязательно. Для файлов.mp3 это обязательно.
Warning.pngWarning:If you trigger this command from a map in Hammer editor, never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor in order to recover your map.

См. также