require('addon')
local events = require('samp.events')
local password = '123123'
local referal = 'Sam_Mason'
local dialogs = {
{title = '%(1/4%) Пароль', button = 1, listitem = 0, input = password},
{title = 'Авторизация', button = 1, listitem = 0, input = password},
{title = '%[2/4%] Выберите ваш пол', button = 1, listitem = 0, input = ''},
{title = '%[3/4%] Выберите цвет кожи', button = 1, listitem = math.random(0, 1), input = ''},
{title = '%[4/4%] Откуда вы о нас узнали?', button = 1, listitem = 1, input = ''},
{title = '%[4/4%] Введите ник пригласившего?', button = 1, listitem = 0, input = referal},
{title = 'Акции на Arizona Role Play', button = 1, listitem = 0, input = ''},
{title = 'Дополнительная информация', button = 0, listitem = 0, input = ''},
{title = 'Внимание!', button = 1, listitem = 0, input = ''}
}
function events.onShowDialog(id, style, title, button1, button2, text)
for _, dialog in pairs(dialogs) do
if title:find(dialog.title) then
newTask(sendDialogResponse, 3000, id, dialog.button, dialog.listitem, dialog.input)
return false
end
end
end
function events.onShowTextDraw(id, data)
if data.selectable and data.text == 'selecticon2' and data.position.x == 396.0 and data.position.y == 315.0 then
for i = 1, math.random(1, 10) do newTask(sendClickTextdraw, i * 500, id) end
elseif data.selectable and data.text == 'selecticon3' and data.position.x == 233.0 and data.position.y == 337.0 then
newTask(sendClickTextdraw, 6000, id)
end
end