From c1bc97a044aab04dafbe99d8d7ec384beb273df1 Mon Sep 17 00:00:00 2001 From: renzuzu <82306584+renzuzu@users.noreply.github.com> Date: Sat, 11 Sep 2021 21:31:06 +0800 Subject: [PATCH] tweak(server): Job money Wait Logic --- server/server.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/server.lua b/server/server.lua index 2858361..bff1b8a 100644 --- a/server/server.lua +++ b/server/server.lua @@ -110,13 +110,14 @@ local default_routing = {} local current_routing = {} function Jobmoney(job) - local value = 0 + local value = -1 local job = job + local count = 0 CreateThread(function() value = exports.renzu_jobs:JobMoney(job).money end) - Wait(1500) - return tonumber(value) + while value == -1 and count < 150 do count = count + 1 Wait(0) end + return value end ESX.RegisterServerCallback('renzu_customs:pay', function (source, cb, t,shop)