local sampev = require 'lib.samp.events'
local CloseDig = false
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('analit.auto', function()
CloseDig = true
sampSendChat('/analit')
end)
wait(-1)
end
function sampev.onShowDialog(id, style, title, button1, button2, text)
if title:find('Управление земель') and CloseDig then
CloseDig = false
sampSendDialogResponse(id, 1, 10, nil)
sampCloseCurrentDialogWithButton(1)
return false
end
end