Hi,
Im trying to figure out why OpenBodySearchMenu(target) doesen’t work when player has their hands up.
Everytime a player has their hands up, you, as the othe player wanting to search, should be able to see all the persons stuff.
This works perfectly on my dev server. Only thing I did was chaning the artifact of the server due to random crashes on an earlier artifact.
CODE:(linked to a label with value “search”
elseif data2.current.value == 'search' then
local player, distance = ESX.Game.GetClosestPlayer()
local target, distance = ESX.Game.GetClosestPlayer()
if distance ~= -1 and distance <= 3.0 then
--- Check if the player has hand up, dead, or cuffed..
if IsEntityPlayingAnim(GetPlayerPed(player), "random@mugging3", "handsup_standing_base", 3) or IsEntityPlayingAnim(GetPlayerPed(player), "mp_arresting", "idle", 3) or IsPedDeadOrDying(GetPlayerPed(player)) then
OpenBodySearchMenu(target)
end
--- Check if the player does not have their hands up.
if not IsEntityPlayingAnim(GetPlayerPed(player), "random@mugging3", "handsup_standing_base", 3) then
sendNotification('Player does not have he's hands up', 'error', 2500)
end
else
sendNotification('No one close', 'error', 2500)
end