From 2e4fcff33343004e819009f5a584c1329cbdcb71 Mon Sep 17 00:00:00 2001 From: jimathy Date: Mon, 25 Apr 2022 10:01:51 +0100 Subject: [PATCH] Debug for missing jobs in config --- server.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server.lua b/server.lua index 6568ea8..35812f5 100644 --- a/server.lua +++ b/server.lua @@ -11,6 +11,10 @@ local function cv(amount) return formatted end +AddEventHandler('onResourceStart', function(resource) + if GetCurrentResourceName() == resource then for k, v in pairs(Config.Jobs) do if not QBCore.Shared.Jobs[k] then print("Jim-Payments: Config.Jobs searched for job '"..k.."' and couldn't find it in the Shared") end end end +end) + --QBCore.Commands.Add("cashregister", "Use mobile cash register", {}, false, function(source) TriggerClientEvent("jim-payments:client:Charge", source, true) end) RegisterServerEvent('jim-payments:Tickets:Give', function(data, biller) @@ -142,4 +146,4 @@ QBCore.Functions.CreateCallback('jim-payments:MakePlayerList', function(source, onlineList[#onlineList+1] = { value = tonumber(v), text = "["..v.."] - "..P.PlayerData.charinfo.firstname..' '..P.PlayerData.charinfo.lastname } end cb(onlineList) -end) \ No newline at end of file +end)