This repository has been archived by the owner on Apr 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
62 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,23 @@ | ||
------------------------------------------------------------------------------------------- | ||
--------------------------------VERSION CHECK---------------------------------------------- | ||
------------------------------------------------------------------------------------------- | ||
-- Ne pas toucher! / Don't touch it! | ||
local HTTPrequest <const> = "https://raw.githubusercontent.com/SUBLiME-Association/sublime_administration-fivem-esxLegacy/version.json" | ||
|
||
local HTTPrequest = "https://raw.githubusercontent.com/SUBLiME-Association/sublime_administration-fivem-esxLegacy/main/version.json" | ||
Citizen.CreateThread(function() | ||
local Version, _v = LoadResourceFile(GetCurrentResourceName(), 'version.json') | ||
if Version then _v = json.decode(Version) else return print("[^1ERROR^0] Impossible de vérifier la version car le fichier n'existe pas!") end | ||
if json.encode(_v.enable) == "true" then | ||
PerformHttpRequest(HTTPrequest, function(code, res, headers) | ||
if code == 200 then | ||
local _gv = json.decode(res) | ||
if _gv.script == _v.script then | ||
if _gv.version ~= _v.version then | ||
print(( | ||
[[ | ||
^6---------------------------------------------------------------------- | ||
^4INFORMATION: ^2Veuillez mettre à jour %s! | ||
^4VERSION: ^2La version %s est disponible! | ||
^4CHANGELOG:^2 %s | ||
^4DOWNLOAD:^2 %s | ||
^6----------------------------------------------------------------------- | ||
]]):format(_gv.script,_gv.version,_gv.changelog,_gv.link)) | ||
end | ||
else | ||
print(( | ||
[[ | ||
^6---------------------------------------------------------------------- | ||
^4INFORMATION: ^2Veuillez mettre à jour %s! | ||
^4VERSION: ^2La version %s est disponible! | ||
^4CHANGELOG:^2 %s | ||
^4DOWNLOAD:^2 %s | ||
^6----------------------------------------------------------------------- | ||
]]):format(_gv.script,_gv.version,_gv.changelog,_gv.link)) | ||
end | ||
else | ||
print(('[^6%s^0] [^1ERROR^0] Impossible de vérifier la version!'):format(tostring(_v.script))) | ||
end | ||
end, 'GET') | ||
end | ||
end) | ||
CreateThread(function() | ||
local file, _v = LoadResourceFile(GetCurrentResourceName(), 'version.json') | ||
|
||
if file then _v = json.decode(file) else return print("[^1ERROR^0] Impossible de vérifier la version car le fichier n'existe pas!") end | ||
|
||
------------------------------------------------------------------------------------------- | ||
--------------------------------VERSION CHECK---------------------------------------------- | ||
------------------------------------------------------------------------------------------- | ||
local message <const> = "^3Veuillez mettre à jour la ressource %s\n^3votre version : ^1%s ^7->^3 nouvelle version : ^2%s\n^3liens : ^4%s" | ||
local link <const> = "https://github.com/SUP2Ak/sublime_administration/tree/fellow-template-legacy" | ||
|
||
PerformHttpRequest(HTTPrequest, function(code, res, headers) | ||
if code == 200 then | ||
local _gv = json.decode(res) | ||
if _v.version == _gv.version then return end | ||
print('^9---------------------------------------------------------') | ||
print(message:format(_gv.script, _v.version, _gv.version, link)) | ||
print('^9---------------------------------------------------------') | ||
else | ||
return print("[^1ERROR^0] Impossible de vérifier la version code erreur github!") | ||
end | ||
end, 'GET') | ||
|
||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
{ | ||
"enable": true, | ||
"script": "sublime_administration", | ||
"version": "0.0.0", | ||
"changelog": "^2\n\t- ^3Re télécharger la ressource sur le github de SUP2Ak si vous êtes sur la template de fellow allez dans release et prenez la version 1.7f sinon prenez 1.7", | ||
"link": "https://github.com/SUP2Ak/sublime_administration" | ||
"version": "1.7" | ||
} |