mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
fix(zones): set zone distance on creation (#44)
* fix(zones): set zone distance on creation Signed-off-by: PotatoFarmer441 <helioau@live.com.au> * Update shared.lua Signed-off-by: PotatoFarmer441 <helioau@live.com.au> --------- Signed-off-by: PotatoFarmer441 <helioau@live.com.au>
This commit is contained in:
@@ -345,6 +345,8 @@ local function setZone(data)
|
||||
data.contains = data.contains or contains
|
||||
|
||||
if lib.context == 'client' then
|
||||
local coords = cache.coords or GetEntityCoords(cache.ped)
|
||||
data.distance = #(data.coords - coords)
|
||||
data.setDebug = setDebug
|
||||
|
||||
if data.debug then
|
||||
|
||||
Reference in New Issue
Block a user