From b7a284e05148a81799dda906da9bfff35af90129 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Fri, 2 May 2025 12:29:02 +0100 Subject: [PATCH] Fix new duty sync This should have been placed in a `onPlayerLoaded()` but it was checking at script start for player info before that info was able to be grabbed --- shared/jobfunctions.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shared/jobfunctions.lua b/shared/jobfunctions.lua index 83b3dc1..910b74c 100644 --- a/shared/jobfunctions.lua +++ b/shared/jobfunctions.lua @@ -14,7 +14,13 @@ ------------------------------------------------------------- -- This attempts to sync up with the players framework onDuty variable -- This stops the script getting confused when one is false and one is true -onDuty = not isServer() and getPlayer().onDuty or false +onDuty = false + +if not isServer() then + onPlayerLoaded(function() + onDuty = getPlayer().onDuty + end, true) +end ------------------------------------------------------------- -- Boss Role Detection