From 10e83d4c274b215ef8fe1ee1f4fc29c6d68c9356 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sun, 16 Sep 2018 13:15:30 +0200 Subject: [PATCH] Fixed playerdata not loaded yet --- client/main.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/main.lua b/client/main.lua index ddd6dca..ca1d926 100644 --- a/client/main.lua +++ b/client/main.lua @@ -92,6 +92,10 @@ function ApplyDoorState(doorID) end function IsAuthorized(doorID) + if ESX.PlayerData.job.name == nil then + return false + end + for i=1, #doorID.authorizedJobs, 1 do if doorID.authorizedJobs[i] == ESX.PlayerData.job.name then return true