From 0c85c4e4b212015fbf97a4707ad59aa55904768d Mon Sep 17 00:00:00 2001 From: Ark Date: Tue, 12 Jan 2021 14:14:26 -0600 Subject: [PATCH] Update main.lua --- server/main.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 0c3ac488..a01aee93 100644 --- a/server/main.lua +++ b/server/main.lua @@ -16,8 +16,9 @@ function GetInServiceCount(name) return count end +RegisterServerEvent('esx_service:activateService') AddEventHandler('esx_service:activateService', function(name, max) - InService[name] = {} + InService[name] = {} MaxInService[name] = max end) @@ -53,6 +54,8 @@ ESX.RegisterServerCallback('esx_service:isInService', function(source, cb, name) if InService[name][source] then isInService = true end + else + print(('[esx_service] [^3WARNING^7] A service "%s" is not activated'):format(name)) end cb(isInService)