require 'moonloader'
local active = false
function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('go', function()
active = not active
sampAddChatMessage("{FF0000}Статус : "..(active and "{FFFFFF}работает" or "{FFFFFF}остановлен"), -1)
lua_thread.create(function()
while active do
wait(0)
setVirtualKeyDown(0x48, true)
setVirtualKeyDown(0x48, false)
wait(0 * 1000)
end
end)
end)