diff --git a/client/main.lua b/client/main.lua index 0da41a9e..cd7194dd 100644 --- a/client/main.lua +++ b/client/main.lua @@ -868,7 +868,9 @@ AddEventHandler('esx_property:hasEnteredMarker', function(name, part) end if part == 'exit' then - ExitProperty(name) + CurrentAction = 'room_exit' + CurrentActionMsg = 'Appuez sur ~INPUT_CONTEXT~ pour sortir de la propriété' + CurrentActionData = {propertyName = name} end if part == 'roomMenu' then @@ -1026,6 +1028,10 @@ Citizen.CreateThread(function() OpenRoomMenu(CurrentActionData.property) end + if CurrentAction == 'room_exit' then + ExitProperty(CurrentActionData.propertyName) + end + CurrentAction = nil GUI.Time = GetGameTimer()