From 5e6714a3239776002f4b5cb383fc520e2bf2bd9c Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sun, 5 Aug 2018 13:08:02 +0200 Subject: [PATCH] Implemented ESX.Game.IsSpawnPointClear(coords, radius) --- client/functions.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/functions.lua b/client/functions.lua index 967b1078..f4b2e459 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -661,6 +661,12 @@ ESX.Game.GetVehicleInDirection = function() return vehicle end +ESX.Game.IsSpawnPointClear = function(coords, radius) + local vehicles = ESX.Game.GetVehiclesInArea(coords, radius) + + return #vehicles == 0 +end + ESX.Game.GetPeds = function(ignoreList) local ignoreList = ignoreList or {}