function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
if bot then
if dialogId == 1387 and title == '{FFFF80}Материалы' then
for line in string.gmatch(text, "[^\r\n]+") do
local line = line:gsub('{FFFFFF}', '', 999) --D6DAF0
local line = line:gsub('{D6DAF0}', '', 999) -- BBECAE
local line = line:gsub('{BBECAE}', ' ', 999) -- FF816A
local line = line:gsub('{FF816A}', ' ', 999)
local num, line, number = line:match('(%d+).(.*)\t (%d+)')
local number = tonumber(number)
local num = tonumber(num)
setCharCoordinates(PLAYER_PED, 1277.2501220703, -1189.1593017578, 77.130279541016)
if number < 100 then
sampSendDialogResponse(dialogId, 1, num-1, num)
return false
end
end
end
end
end
--1284.5875244141 -1198.7915039063 78.129318237305
--1387