- 140
- 8
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
- Версия MoonLoader
- .026-beta
Код:
function samp.onServerMessage(color, text)
if text:find('[A] '..nick..'['..id..'] для '..report.aName..'['..report.aID..']: Приветствую, начинаю работу по вашей жалобе.') then
sampSendChat('/re '..report.sID)
end
if text:find('[A] '..nick..'['..id..'] для '..report.aName..'['..report.aID..']: Передам ваш репорт') then
sampSendChat('/a « '..report.aName..'['..report.aID..'] » '..report.rText)
end
end
вот так я реализовал эти переменные:
Lua:
local report = {
aName = '',
aID = '',
sName = '',
sID = '',
rText = ''
}
function samp.onShowDialog(id, style, title, button1, button2, text)
if string.find(text:gsub('%{......%}',''),'Имя: (.+)%[(%d+)%]\nНарушитель: (.+)%[(%d+)%]\nЖалоба: (.+)') then--перехватываем текст из диалога с ид 990
report.aName, report.aID, report.sName, report.sID, report.rText = string.match(text:gsub('%{......%}',''),"Имя: (.+)%[(%d+)%]\nНарушитель: (.+)%[(%d+)%]\nЖалоба: (.+)\nВведите")--форматируем его
end
end
@chapo
Последнее редактирование: