Press [E] to exit property

This commit is contained in:
Jérémie N'gadi
2017-08-02 16:03:27 +02:00
parent 863ad88ecc
commit 8e4b6052cc
+7 -1
View File
@@ -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()