mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
@@ -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 = {}
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user