ensure migration order

This commit is contained in:
Jérémie N'gadi
2020-05-11 22:41:56 +02:00
parent 1d9f33c70a
commit 3ef71f7d35
7 changed files with 19 additions and 28 deletions
+17 -6
View File
@@ -2,14 +2,25 @@ MySQL.ready(function()
print('[esx] ensuring migrations')
TriggerEvent('esx:migrations:ensure', function(module)
ESX.EnsureMigrations(module)
end)
local index = 0
local results = {}
local start
local manifest = LoadResourceFile(GetCurrentResourceName(), 'fxmanifest.lua')
end)
repeat
start, index = manifest:find("esxmodule '.-'", index)
if start then
local module = manifest:sub(start, index):sub(12):sub(0, -2)
ESX.EnsureMigrations(module)
end
until not start
AddEventHandler('esx:migrations:ensure', function(register)
register('base')
end)
RegisterNetEvent('esx:onPlayerJoined')