diff --git a/client/package.json b/client/package.json index 46ea9a0..e232e16 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@altv/types-client", - "version": "16.4.1", + "version": "16.5.0", "description": "This package contains types definitions for alt:V client-side module.", "types": "index.d.ts", "files": [ diff --git a/natives/package.json b/natives/package.json index 7466625..0ff3c40 100644 --- a/natives/package.json +++ b/natives/package.json @@ -1,6 +1,6 @@ { "name": "@altv/types-natives", - "version": "16.4.1", + "version": "16.5.0", "description": "This package contains types definitions for alt:V client-side natives.", "types": "index.d.ts", "files": [ diff --git a/server/index.d.ts b/server/index.d.ts index db99a14..2c2656b 100644 --- a/server/index.d.ts +++ b/server/index.d.ts @@ -219,6 +219,7 @@ declare module "alt-server" { Vehicle = 2, Ped = 4, Object = 8, + VirtualEntity = 16, } export enum Benefit { @@ -528,6 +529,12 @@ declare module "alt-server" { readonly count: number; } + export enum SortOrderEnum { + NoSorting = 0, + Ascending = 1, + Descending = 2, + } + /** * Extend it by interface merging for use in baseobject meta {@link "alt-server".BaseObject getMeta method}, {@link "alt-server".BaseObject setMeta method}, etc. * @@ -3411,13 +3418,14 @@ declare module "alt-server" { * @param dimension Can be set to {@link "alt-shared".globalDimension} to get entities in any dimension. * @param limit How many entities to return if there are more entities in the specified range, dimension. (`-1` to disable). * @param allowedTypes + * @param sortOrder Optional parameter to sort entities by distance to the position. (0 - no sorting, 1 - ascending, 2 - descending). * * @remarks If two entities are closer than 1 unit to a position, it is not determined which one will be included. * For example, if there is a vehicle at 0, 1.5, 0 and player at 0, 1.0, 0, * then if we pass `position` as `new alt.Vector3(0, 0, 0)` and `limit` as `1` vehicle may be returned but the player will not. * */ - export function getClosestEntities(position: shared.IVector3, range: number, dimension: number, limit: number, allowedTypes: BaseObjectFilterType): readonly Entity[]; + export function getClosestEntities(position: shared.IVector3, range: number, dimension: number, limit: number, allowedTypes: BaseObjectFilterType, sortOrder?: SortOrderEnum): readonly Entity[]; export function setVoiceExternalPublic(host: string, port: number): void; diff --git a/server/package.json b/server/package.json index dd7d77d..1088d8e 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "@altv/types-server", - "version": "16.4.1", + "version": "16.5.0", "description": "This package contains types definitions for alt:V server-side module.", "types": "index.d.ts", "files": [ diff --git a/shared/package.json b/shared/package.json index 112d229..fb67a25 100644 --- a/shared/package.json +++ b/shared/package.json @@ -1,6 +1,6 @@ { "name": "@altv/types-shared", - "version": "16.4.1", + "version": "16.5.0", "description": "This package contains types definitions for alt:V JS module shared types.", "types": "index.d.ts", "files": [ diff --git a/webview/package.json b/webview/package.json index 467e5df..5763700 100644 --- a/webview/package.json +++ b/webview/package.json @@ -1,6 +1,6 @@ { "name": "@altv/types-webview", - "version": "16.4.1", + "version": "16.5.0", "description": "This package contains types definitions for alt:V client-side WebView.", "types": "index.d.ts", "files": [ diff --git a/worker/package.json b/worker/package.json index 3461c62..e1eadf4 100644 --- a/worker/package.json +++ b/worker/package.json @@ -1,6 +1,6 @@ { "name": "@altv/types-worker", - "version": "16.4.1", + "version": "16.5.0", "description": "This package contains types definitions for alt:V client-side Worker.", "types": "index.d.ts", "files": [