Merge pull request #760 from ArkSeyonet/master

Update es_extended
This commit is contained in:
Jérémie N'gadi
2020-05-17 11:35:33 +02:00
committed by GitHub
2 changed files with 0 additions and 31 deletions
-2
View File
@@ -14,5 +14,3 @@ Config.EnableHud = true -- enable the default hud? Display current jo
Config.MaxWeight = 24 -- the max inventory weight without backpack
Config.PaycheckInterval = 7 * 60000 -- how often to recieve pay checks in milliseconds
Config.EnableDebug = false
Config.IncompatibleResourcesToStop = {}
-29
View File
@@ -1,35 +1,6 @@
Citizen.CreateThread(function()
SetMapName('San Andreas')
SetGameType('Roleplay')
local resourcesStopped, isAceGranted = {}, false
for resourceName,reason in pairs(Config.IncompatibleResourcesToStop) do
local status = GetResourceState(resourceName)
if status == 'started' or status == 'starting' then
while GetResourceState(resourceName) == 'starting' do
Citizen.Wait(100)
end
if not isAceGranted then
ExecuteCommand('add_ace resource.es_extended command.stop allow')
isAceGranted = true
end
ExecuteCommand(('stop %s'):format(resourceName))
resourcesStopped[resourceName] = reason
end
end
if ESX.Table.SizeOf(resourcesStopped) > 0 then
local allStoppedResources = ''
for resourceName,reason in pairs(resourcesStopped) do
allStoppedResources = ('%s\n- ^3%s^7, %s'):format(allStoppedResources, resourceName, reason)
end
print(('[es_extended] [^3WARNING^7] Stopped %s incompatible resource(s) that can cause issues when used with ESX. They are not needed and can safely be removed from your server, remove these resource(s) from your resource directory and your configuration file:%s'):format(ESX.Table.SizeOf(resourcesStopped), allStoppedResources))
end
end)
RegisterNetEvent('esx:onPlayerJoined')