From a7610d39f52396ff91e01d31e69315763c640d7e Mon Sep 17 00:00:00 2001 From: GyozaLion <115346313+GyozaLion@users.noreply.github.com> Date: Sun, 6 Oct 2024 20:24:12 +0700 Subject: [PATCH 1/3] Update main.lua Enabling People to move around while using the phone --- client/main.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/main.lua b/client/main.lua index 90475a8..e84fa7f 100755 --- a/client/main.lua +++ b/client/main.lua @@ -83,19 +83,20 @@ function OpenPhone() if HasPhone then PhoneData.PlayerData = QBCore.Functions.GetPlayerData() SetNuiFocus(true, true) - -- SetNuiFocusKeepInput(true) SendNUIMessage({ event = 'z-phone', isOpen = true, }) PhoneData.isOpen = true - + if Config.AllowWalking then + SetNuiFocusKeepInput(true) CreateThread(function() while PhoneData.isOpen do - DisableDisplayControlActions() + DisableLookAroundActions() -- only disable looking around Wait(1) end end) + end if not PhoneData.CallData.InCall then DoPhoneAnimation('cellphone_text_in') @@ -152,4 +153,4 @@ RegisterNUICallback('close', function(_, cb) PhoneData.isOpen = false end) cb('ok') -end) \ No newline at end of file +end) From 1a036e89570243ad0dc7e3afbfe046cba70126d3 Mon Sep 17 00:00:00 2001 From: GyozaLion <115346313+GyozaLion@users.noreply.github.com> Date: Sun, 6 Oct 2024 20:24:55 +0700 Subject: [PATCH 2/3] Update garages.lua Fixed Some issue for people who's using older version or Jdev version of qb-garages --- server/garages.lua | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/server/garages.lua b/server/garages.lua index f29c7b8..040528f 100644 --- a/server/garages.lua +++ b/server/garages.lua @@ -4,17 +4,18 @@ lib.callback.register('z-phone:server:GetVehicles', function(source, body) local Player = QBCore.Functions.GetPlayer(source) if Player ~= nil then local citizenid = Player.PlayerData.citizenid + + -- Adjusted SQL query: Removed `created_at` local query = [[ select - pv.vehicle, - pv.plate, - pv.garage, - pv.fuel, - pv.engine, - pv.body, - pv.state, - DATE_FORMAT(pv.created_at, '%d %b %Y %H:%i') as created_at - from player_vehicles pv WHERE pv.citizenid = ? order by plate asc + vehicle, + plate, + garage, + fuel, + engine, + body, + state + from player_vehicles WHERE citizenid = ? order by plate asc ]] local result = MySQL.query.await(query, { @@ -29,4 +30,4 @@ lib.callback.register('z-phone:server:GetVehicles', function(source, body) end return {} -end) \ No newline at end of file +end) From 557537c1fe7b2b2ff33a179223c0f7e46cbcdb9e Mon Sep 17 00:00:00 2001 From: GyozaLion <115346313+GyozaLion@users.noreply.github.com> Date: Sun, 6 Oct 2024 20:25:29 +0700 Subject: [PATCH 3/3] Update config.lua Enabling people to walk around while using the phone --- config/config.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.lua b/config/config.lua index c4aa921..ff7f616 100644 --- a/config/config.lua +++ b/config/config.lua @@ -4,6 +4,7 @@ Config.Debug = false Config.OpenPhone = 'M' Config.RepeatTimeout = 3000 Config.CallRepeats = 5 +Config.AllowWalking = true Config.App = { InetMax = { @@ -79,4 +80,4 @@ Config.Signal = { ChanceSignal = 0.75 } } -} \ No newline at end of file +}