From cfbe1a1ddf81e9062c26b1adc2e813fbd008ba7f Mon Sep 17 00:00:00 2001 From: GeneralIroh Date: Tue, 28 Nov 2023 11:30:29 -0600 Subject: [PATCH 1/3] Added wait before getting getting notes from the database, as it would not get new notes without it. --- server/documents.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/server/documents.lua b/server/documents.lua index b1e1983..171826e 100644 --- a/server/documents.lua +++ b/server/documents.lua @@ -129,6 +129,7 @@ RegisterNetEvent('qb-phone:server:documents_Save_Note_As', function(data, Receiv end end + Wait(250) local Notes = exports.oxmysql:executeSync('SELECT * FROM phone_note WHERE citizenid = ?', {CID}) Wait(100) TriggerClientEvent('qb-phone:RefReshNotes_Free_Documents', src, Notes) From ee7981c527d3d9614781f530e0bbe2f2546c41e6 Mon Sep 17 00:00:00 2001 From: GeneralIroh Date: Tue, 28 Nov 2023 11:36:14 -0600 Subject: [PATCH 2/3] Fix linting --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index ebade20..6bec521 100644 --- a/client/main.lua +++ b/client/main.lua @@ -409,7 +409,7 @@ RegisterCommand('phone', function() end) RegisterKeyMapping('phone', 'Open Phone', 'keyboard', 'M') RegisterCommand("+answer", function() - if (PhoneData.CallData.CallType == "incoming" or PhoneData.CallData.CallType == "outgoing" and not PhoneData.CallData.CallType == "ongoing") then + if ((PhoneData.CallData.CallType == "incoming" or PhoneData.CallData.CallType == "outgoing") and not (PhoneData.CallData.CallType == "ongoing")) then if not PlayerData.metadata['ishandcuffed'] and not PlayerData.metadata['inlaststand'] and not PlayerData.metadata['isdead'] and not IsPauseMenuActive() and hasPhone() then AnswerCall() else From 02e4264b5c16ef0b9407d73bc7968f2c50faf43f Mon Sep 17 00:00:00 2001 From: GeneralIroh Date: Tue, 28 Nov 2023 11:37:44 -0600 Subject: [PATCH 3/3] lint --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 6bec521..820da39 100644 --- a/client/main.lua +++ b/client/main.lua @@ -409,7 +409,7 @@ RegisterCommand('phone', function() end) RegisterKeyMapping('phone', 'Open Phone', 'keyboard', 'M') RegisterCommand("+answer", function() - if ((PhoneData.CallData.CallType == "incoming" or PhoneData.CallData.CallType == "outgoing") and not (PhoneData.CallData.CallType == "ongoing")) then + if (PhoneData.CallData.CallType == "incoming" or PhoneData.CallData.CallType == "outgoing") and PhoneData.CallData.CallType ~= "ongoing" then if not PlayerData.metadata['ishandcuffed'] and not PlayerData.metadata['inlaststand'] and not PlayerData.metadata['isdead'] and not IsPauseMenuActive() and hasPhone() then AnswerCall() else