diff --git a/client/camera.lua b/client/camera.lua index 699d7c1..6ecdfdb 100644 --- a/client/camera.lua +++ b/client/camera.lua @@ -28,6 +28,7 @@ local new_z local movcamera local newscamera +local isLoggedIn = LocalPlayer.state.isLoggedIn --FUNCTIONS-- local function HideHUDThisFrame() @@ -136,6 +137,7 @@ end) CreateThread(function() while true do + if not isLoggedIn then return end if QBX.PlayerData.job.name == 'reporter' then if holdingCam then lib.requestAnimDict(camanimDict) @@ -165,6 +167,7 @@ end) CreateThread(function() while true do + if not isLoggedIn then return end if QBX.PlayerData.job.name == 'reporter' then if holdingCam then if IsControlJustReleased(1, 244) then @@ -243,6 +246,7 @@ end) CreateThread(function() while true do + if not isLoggedIn then return end if QBX.PlayerData.job.name == 'reporter' then if holdingCam then if IsControlJustReleased(1, 38) then @@ -340,6 +344,7 @@ end) CreateThread(function() while true do + if not isLoggedIn then return end if QBX.PlayerData.job.name == 'reporter' then if holdingBmic then lib.requestAnimDict(bmicanimDict) @@ -402,4 +407,4 @@ RegisterNetEvent('qbx_newsjob:client:toggleMic', function() mic_net = nil holdingMic = false end -end) \ No newline at end of file +end) diff --git a/client/main.lua b/client/main.lua index 4b51947..41df09a 100644 --- a/client/main.lua +++ b/client/main.lua @@ -433,7 +433,7 @@ local function init() registerEnterRoof() registerExitRoof() - if QBX.PlayerData.job.name == 'reporter' then + if QBX.PlayerData.job.name == 'reporter' and isLoggedIn then registerVehicleStorage() registerHeliStorage() end