mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
refactor(package): use cache.ped for points
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Vector3 } from '@nativewrappers/client';
|
||||
import { cache } from '../cache';
|
||||
|
||||
let points: Point[] = [];
|
||||
let nearbyPoints: Point[] = [];
|
||||
@@ -49,7 +50,7 @@ setInterval(() => {
|
||||
nearbyCount = 0;
|
||||
}
|
||||
|
||||
const coords = Vector3.fromArray(GetEntityCoords(PlayerPedId(), false));
|
||||
const coords = Vector3.fromArray(GetEntityCoords(cache.ped, false));
|
||||
|
||||
if (closestPoint && coords.distance(closestPoint.coords) > closestPoint.distance) {
|
||||
closestPoint = undefined;
|
||||
|
||||
Reference in New Issue
Block a user