forked from overextended/ox_inventory
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathversion.lua
More file actions
25 lines (24 loc) · 1.11 KB
/
version.lua
File metadata and controls
25 lines (24 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
if shared.versioncheck then
CreateThread(function()
Wait(1000)
local resource = GetCurrentResourceName()
local url = GetResourceMetadata(resource, 'repository', 0)
local version = GetResourceMetadata(resource, 'version', 0)
PerformHttpRequest(('%s/master/fxmanifest.lua'):format(url:gsub('github.com', 'raw.githubusercontent.com')), function(error, response)
if error == 200 and response then
local latest = response:match('%d%.%d+%.%d+')
if version < latest then
print(('^3An update is available for ox_inventory - please download the latest release (current version: %s)'):format(latest, version))
print([[^3 - https://github.com/overextended/ox_inventory/releases
- rebalanced weapon durability loss
- support multiple police jobs
- player inventories no longer "lock" after using a container
- remove invalid durability when loading an inventory
- all weapons are removed from players when disarming
- various tweaks to code flow and structure
^0]])
end
end
end, 'GET')
end)
end