From 2b7a1c2e6dd2cb2f0e19087a53f9a00dd1cb87ff Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Sat, 7 Jun 2025 18:14:53 +0100 Subject: [PATCH] Start working on billPlayer() function The intention here is to try and add multiple "billing" script functions, so the user can pre-set it for scripts that use `jim_bridge` Currently only handles `jim-payments` --- shared/playerfunctions.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/shared/playerfunctions.lua b/shared/playerfunctions.lua index ab76ccf..5f84207 100644 --- a/shared/playerfunctions.lua +++ b/shared/playerfunctions.lua @@ -153,6 +153,18 @@ end -- Economy Event Handlers ------------------------------------------------------------- +--- BillPlayer +function billPlayer(data) + if not Config.System.Billing or Config.System.Billing == "jim" then + TriggerEvent("jim-payments:client:Charge", { + job = data.job, + gang = data.gang, + coords = data.coords.xyz, + img = data.img + }) + end +end + --- Charges a player by removing money from their account. --- --- @param cost number The amount to charge.