- 2,417
- 1,207
- Версия MoonLoader
- .026-beta
json по ссылке, как вытащить значение с него и вывести допустим в чат
Нашел решение
Нашел решение
Lua:
local json = getWorkingDirectory() .. '\\'..thisScript().name..'-version.json'
if doesFileExist(json) then os.remove(json) end
downloadUrlToFile('https://raw.githubusercontent.com/Venibon/Ghetto-Helper/main/autoupdate.json', json,
function(id, status, p1, p2)
if status == dlstatus.STATUSEX_ENDDOWNLOAD then
if doesFileExist(json) then
local f = io.open(json, 'r')
if f then
local info = decodeJson(f:read('*a'))
updateversion = info.latest
f:close()
os.remove(json)
end
end
end
end)
Последнее редактирование: