From 33e928008ee8e855044d8277593fc7a3cc11bcfa Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sun, 19 Apr 2020 11:53:45 +0200 Subject: [PATCH] Fixed StopResource() not allowing some resources to be stopped --- server/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 651d5c57..f37fa6b3 100644 --- a/server/main.lua +++ b/server/main.lua @@ -2,6 +2,7 @@ Citizen.CreateThread(function() SetMapName('San Andreas') SetGameType('Roleplay') local resourcesStopped = {} + ExecuteCommand('add_ace resource.es_extended command.stop allow') for resourceName,reason in pairs(Config.IncompatibleResourcesToStop) do local status = GetResourceState(resourceName) @@ -11,7 +12,7 @@ Citizen.CreateThread(function() Citizen.Wait(100) end - StopResource(resourceName) + ExecuteCommand(('stop %s'):format(resourceName)) resourcesStopped[resourceName] = reason end end