require "lib.moonloader"
local bass = require 'lib.bass'
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
audioHandle = bass.BASS_StreamCreateFile(false, 'moonloader/mp3.mp3', 0, 0, 0)
if audioHandle ~= 0 then
bass.BASS_ChannelSetAttribute(audioHandle, BASS_ATTRIB_VOL, 1.0)
else
sampAddChatMessage('[Error] Loading sound.', -1)
end
end
end
function sampev.onServerMessage(color, text)
if audioHandle ~= 0 then
if text:find("собака") then
bass.BASS_ChannelPlay(audioHandle, false)
end
end
end