function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(0) end
local audio = loadAudioStream("moonloader/sound/plyus_org-z_uk-u_edomleniya-1.mp3")
sampRegisterChatCommand("play", cmd_bot)
while true do
wait(0)
if isPlayerPlaying(playerHandle) and enabled then
setAudioStreamState(audio, 1)
setAudioStreamVolume(audio, 100)
printStringNow('AKTIVIROVAN', 1000)
wait(10000)
end
end
end
function cmd_bot(arg)
enabled = not enabled
if enabled then
sampAddChatMessage(string.format("[%s]: Активирован", thisScript().name), 0x40FF40)
sampAddChatMessage(" {818ccd} АВТОР {f9bca4} VOLGUS KING", -1)
sampAddChatMessage(" {818ccd} КАНАЛ на YOUTUBE {f9bca4} youtube.com/volguskingplay", -1)
memory.setuint8(7634870, 1)
memory.setuint8(7635034, 1)
memory.fill(7623723, 144, 8)
memory.fill(5499528, 144, 6)
else
sampAddChatMessage(string.format("[%s]: Деактивирован", thisScript().name), 0xFF4040)
thisScript():reload()
memory.setuint8(7634870, 0)
memory.setuint8(7635034, 0)
memory.hex2bin('5051FF1500838500', 7623723, 8)
memory.hex2bin('0F847B010000', 5499528, 6)
end
end