if CONFIG.System.UpdateCheck then CreateThread(function() local version = GetResourceMetadata(GetCurrentResourceName(), 'version', 0) PerformHttpRequest(CONFIG.GithubApiURL .. 'repos/toxic-development/FiveM2Discord/releases/latest', function(err, text, headers) local data = json.decode(text) local git = CONFIG.GithubBaseURL .. 'toxic-development/FiveM2Discord/releases/latest' if data.tag_name < version then print('| =================================== ') print('| FiveM2Discord | Update Check ') print('| =================================== ') print('| Current Version: ' .. version ) print('| Latest Version: ' .. data.tag_name ) print('| =================================== ') print('| you are using an outdated version! ') print('| Please grab the latest version from ') print('| here:' .. git ) print('| =================================== ') elseif data.tag_name > verion then print('| ====================================== ') print('| FiveM2Discord | Update Check ') print('| ====================================== ') print('| Current Version: ' .. version ) print('| Latest Version: ' .. data.tag_name ) print('| ====================================== ') print('| i don\'t know how you traveled in time!') print('| but you are using a higher version than') print('| our current latest version! ') print('| ====================================== ') print('| please re-download/install the script ') print('| from here: ' .. git ) print('| ====================================== ') elseif data.tag_name == version then print('| ====================================== ') print('| FiveM2Discord | Update Check ') print('| ====================================== ') print('| Current Version: ' .. version ) print('| Latest Version: ' .. data.tag_name ) print('| ====================================== ') print('| you are using the latest version! ') print('| ====================================== ') end end, 'GET', '', { ['Content-Type'] = 'application/json' }) end) end