Lua колокольчик попаданий.

deddosouru

Смотрю аниме, служу Сатане
Друг
2,036
1,320
подключаешь events, bass и после полученного/нанесенного дамага воспроизводишь звук
пф

Lua:
function main()
    repeat
        printStringNow('loading',500)
        hnd = loadAudioStream(getWorkingDirectory()..'\\resource\\sound\\'..'1.wav')
        wait(100)
        if not hnd then
            if not doesDirectoryExist(getWorkingDirectory()..'\\resource') or not doesDirectoryExist(getWorkingDirectory()..'\\resource\\sound\\') then
                if createDirectory(getWorkingDirectory()..'\\resource\\sound\\') then
                    printStringNow('new folder created',500)
                end
            end
            downloadUrlToFile('https://www.dropbox.com/s/y0lf1c465md9zwz/5.wav?dl=1',getWorkingDirectory()..'\\resource\\sound\\'..'1.wav')
            while not doesFileExist(getWorkingDirectory()..'\\resource\\sound\\'..'1.wav') do wait(0);printStringNow('downloading',500) end
        end
    until hnd
    while true do wait(0)
        if isPlayerPlaying(PLAYER_HANDLE) then
            ch = getAllChars()
            for _, v in pairs(ch) do
                if hasCharBeenDamagedByChar(v,PLAYER_PED) then
                    setAudioStreamState(hnd, 1)
                    clearCharLastDamageEntity(v)
                end
            end
        end
    end
end
без ивентов, без басс, с созданием папок, и загрузкой звука с дроп бокса. как тебе такое илон маск.
 
Последнее редактирование:
  • Грустно
  • Нравится
Реакции: Xenocell и dmitri4

DolgorukovGTA

Известный
Проверенный
652
345
пф

Lua:
function main()
    repeat
        printStringNow('loading',500)
        hnd = loadAudioStream(getWorkingDirectory()..'\\resource\\sound\\'..'1.wav')
        wait(100)
        if not hnd then
            if not doesDirectoryExist(getWorkingDirectory()..'\\resource') or not doesDirectoryExist(getWorkingDirectory()..'\\resource\\sound\\') then
                if createDirectory(getWorkingDirectory()..'\\resource\\sound\\') then
                    printStringNow('new folder created',500)
                end
            end
            downloadUrlToFile('https://www.dropbox.com/s/y0lf1c465md9zwz/5.wav?dl=1',getWorkingDirectory()..'\\resource\\sound\\'..'1.wav')
            while not doesFileExist(getWorkingDirectory()..'\\resource\\sound\\'..'1.wav') do wait(0);printStringNow('downloading',500) end
        end
    until hnd
    while true do wait(0)
        if isPlayerPlaying(PLAYER_HANDLE) then
            ch = getAllChars()
            for _, v in pairs(ch) do
                if hasCharBeenDamagedByChar(v,PLAYER_PED) then
                    setAudioStreamState(hnd, 1)
                    clearCharLastDamageEntity(v)
                end
            end
        end
    end
end
без ивентов, без басс, с созданием папок, и загрузкой звука с дроп бокса. как тебе такое илон маск.
Классный звук колокола :sneaky:
 
  • Ха-ха
Реакции: deddosouru