Skip to content

Commit

Permalink
Fixed playerdata not loaded yet
Browse files Browse the repository at this point in the history
  • Loading branch information
ElPumpo committed Sep 16, 2018
1 parent 98d1633 commit 10e83d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 10e83d4

Please sign in to comment.