From 67ffedb4105f527fa4aeaf773960ab3446778eb4 Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 9 Jan 2024 05:40:15 +0100 Subject: [PATCH] fix(client/vehiclepush): push vehicle from anywhere --- client/vehiclepush.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/vehiclepush.lua b/client/vehiclepush.lua index 2bf5229..18b0e0c 100644 --- a/client/vehiclepush.lua +++ b/client/vehiclepush.lua @@ -40,7 +40,8 @@ CreateThread(function() local sleep while true do sleep = 250 - if Vehicle.Vehicle then + local pos = GetEntityCoords(cache.ped) + if Vehicle.Vehicle and #(pos - Vehicle.Coords) < 3.5 then local vehClass = GetVehicleClass(Vehicle.Vehicle) sleep = 0