local wm = require 'windows.message'
local vkeys = require 'vkeys'
function main()
while not isSampAvailable() do wait(0) end
addEventHandler('onWindowMessage', function(msg, wparam, lparam)
if msg == wm.WM_KEYDOWN or msg == wm.WM_SYSKEYDOWN then
if wparam == vkeys.VK_K and not sampIsCursorActive() then -- клавиша K
sampAddChatMessage(sampGetPlayerScore(select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))), -1)
end
end
end)
end