local sampev = require('lib.samp.events')
local activate = false
-- В main
sampRegisterChatCommand("act", function()
activate = not activate
sampAddChatMessage(activate and "Activated" or "Deactivated", -1)
end)
--
function sampev.onServerMessage(color, text)
if activate then
if text:match('пришло сообщение от') then
lua_thread.create(function()
setGameKeyState(21, 255)
wait(1)
setGameKeyState(21, 0)
end)
end
end
end