local sampev = require('lib.samp.events')
local state = false
local timer = os.clock()
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('gomunkul',function ()
state = not state
printStringNow(state and 'gomunkul' or '306',1500)
end)
while true do
wait(0)
if state then
if os.clock()-timer > 60*5 then
setGameKeyState(21, 255)
timer = os.clock()
end
end
end
end
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
if state then
if title:find('Банковский пост') or title:find('{.-}Банковский пост') then
lua_thread.create(function ()
wait(300)
sampSendDialogResponse(dialogId,1,0,'')
end)
return false
end
end
end