From ef0cd6fff25c1097b1439119ceb18fd344952e86 Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:37:23 +0000 Subject: [PATCH 1/2] Try to fix linting report --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 49be319..66cffd2 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1379,7 +1379,7 @@ RegisterNUICallback('TakePhoto', function(_, cb) CreateMobilePhone(1) CellCamActivate(true, true) local takePhoto = true - while takePhoto do + while takePhoto == true do if IsControlJustPressed(1, 27) then -- Toogle Mode frontCam = not frontCam CellFrontCamActivate(frontCam) From 3df474540428f992bad0a40843d6baa2573129dc Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Wed, 15 Jan 2025 12:40:21 +0000 Subject: [PATCH 2/2] Remove `takePhoto = false` when there is a return --- client/main.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/main.lua b/client/main.lua index 66cffd2..35e9c3e 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1379,7 +1379,7 @@ RegisterNUICallback('TakePhoto', function(_, cb) CreateMobilePhone(1) CellCamActivate(true, true) local takePhoto = true - while takePhoto == true do + while takePhoto do if IsControlJustPressed(1, 27) then -- Toogle Mode frontCam = not frontCam CellFrontCamActivate(frontCam) @@ -1395,7 +1395,6 @@ RegisterNUICallback('TakePhoto', function(_, cb) if fivemerrData == nil then DestroyMobilePhone() CellCamActivate(false, false) - takePhoto = false return end @@ -1407,7 +1406,6 @@ RegisterNUICallback('TakePhoto', function(_, cb) Wait(400) TriggerServerEvent('qb-phone:server:getImageFromGallery') cb(json.encode(imageData.url)) - takePhoto = false end) end