From be7dc860f522b98a40af93cc5e63819614e5424c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Sun, 6 Aug 2017 14:35:43 +0200 Subject: [PATCH] Add seat check --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index c348aefd..55822d69 100644 --- a/client/main.lua +++ b/client/main.lua @@ -18,7 +18,7 @@ AddEventHandler('esx_property:hasEnteredMarker', function(name, part, parking) local coords = GetEntityCoords(playerPed) local garage = Config.Garages[name] - if IsPedInAnyVehicle(playerPed, false) then + if IsPedInAnyVehicle(playerPed, false) and GetPedInVehicleSeat(vehicle, -1) == playerPed then local vehicle, distance = ESX.Game.GetClosestVehicle({ x = coords.x,