- 8,869
- 11,579
- Версия MoonLoader
- .026-beta
Lua:
local last_key = 0
local wm = require 'lib.windows.message'
addEventHandler("onWindowMessage", function (msg, wparam, lparam)
if msg == wm.WM_KEYDOWN and wparam ~= last_key then
last_key = wparam
local hand = sounds[1]
if hand ~= nil then
setAudioStreamVolume(hand, settings.volume.v)
setAudioStreamState(hand, sound_state.PLAY)
end
elseif msg == wm.WM_KEYUP and wparam == last_key then
last_key = 0
end
end)