From 8e4b6052ccfdbe393d678ca9f84ccf4bf4869b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Wed, 2 Aug 2017 16:03:27 +0200 Subject: [PATCH] Press [E] to exit property --- client/main.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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()