From 03aca47caf87c489c8cc1af760df63e725181251 Mon Sep 17 00:00:00 2001 From: DN8lol <87434244+BoogeyMan11588@users.noreply.github.com> Date: Sun, 21 Jul 2024 20:15:02 -0400 Subject: [PATCH] Update interactions.lua Add client-side interactions for searching player until new server-side can be fixed. --- client/interactions.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/interactions.lua b/client/interactions.lua index 3910c5dd..ba48ac46 100644 --- a/client/interactions.lua +++ b/client/interactions.lua @@ -282,6 +282,17 @@ RegisterNetEvent('police:client:CuffPlayer', function() end end) +RegisterNetEvent('police:client:SearchPlayer', function() + local player, distance = QBCore.Functions.GetClosestPlayer() + if player ~= -1 and distance < 2.5 then + local playerId = GetPlayerServerId(player) + TriggerServerEvent("inventory:server:OpenInventory", "otherplayer", playerId) + TriggerServerEvent("police:server:SearchPlayer", playerId) + else + QBCore.Functions.Notify(Lang:t("error.none_nearby"), "error") + end +end) + RegisterNetEvent('police:client:GetEscorted', function(playerId) local ped = PlayerPedId() QBCore.Functions.GetPlayerData(function(PlayerData)