Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///SCRSETGLOBALOPTIONS
- global.checkForUpdates = true;
- global.versionDataUrl = "https://pastebin.com/raw/Z5sWFNap";
- global.gameVersion = "1.0";
- ///GAME START
- if (global.checkForUpdates)
- {
- global.httpUpdateCheck = http_get(global.versionDataUrl);
- }
- ///HTTP
- var Id = async_load[? "id"];
- var status = async_load[? "status"];
- var result = async_load[? "result"];
- if (Id == global.httpUpdateCheck)
- {
- if (status == 0)
- {
- var map = json_decode(result);
- if (map != -1)
- {
- global.newestVersionNumber = map[? "game-version"];
- global.newestVersionLink = map[? "download-link"];
- global.isUpToDate = (global.gameVersion == global.newestVersionNumber);
- }
- }
- }
Add Comment
Please, Sign In to add comment