function se.onShowDialog(dialogId, style, title, button1, button2, text)
if dialogId == 0 and title:match("(%d+)") then
sampCloseCurrentDialogWithButton(1)
for i = 0, 72 do
if text:find("{FFFFFF}%[("..tostring(i)..")%]%s+%P+%s+{8F8FDC}%[(%d+) %W+%]%s+") then
invSlots[i+1], invSlotsItems[i+1], invSlotsCount[i+1] = text:match("{FFFFFF}%[("..tostring(i)..")%]%s+(%P+)%s+{8F8FDC}%[(%d+) %W+%]%s+")
end
if text:find("{FFFFFF}%[("..tostring(i)..")%]%s+%P+%s+{8F8FDC}%[(%d+%A+)%]%s+") then
invSlots[i+1], invSlotsItems[i+1], invSlotsCount[i+1] = text:match("{FFFFFF}%[("..tostring(i)..")%]%s+(%P+)%s+{8F8FDC}%[(%d+%A+)%]%s+")
end
if tonumber(invSlots[i+1]) == nil or tonumber(invSlots[i+1]) == '' then
invSlots[i+1] = i
invSlotsItems[i+1] = "Пусто"
invSlotsCount[i+1] = ""
end
--sampAddChatMessage(""..tostring(invSlots[i]).." "..tostring(invSlotsItems[i]).." "..tostring(invSlotsCount[i]), -1)
end
end
end