From 77ff8e977b06fac338f76f581370c2c8b9142353 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Sun, 11 Sep 2022 11:06:38 +1000 Subject: [PATCH] feat(client/zones): set cache.coords People keep asking for coords to be added to cache, but it be problematic to spam the events system every tick with that information. If zones is loaded, we can set cache locally without relying on events. --- imports/zones/client.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imports/zones/client.lua b/imports/zones/client.lua index 88803d9..4abde3e 100644 --- a/imports/zones/client.lua +++ b/imports/zones/client.lua @@ -223,8 +223,10 @@ local tick CreateThread(function() while true do - local coords = GetEntityCoords(cache.ped) table.wipe(inside) + + local coords = GetEntityCoords(cache.ped) + cache.coords = coords insideCount = 0 for _, zone in pairs(Zones) do