Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@altv/types-client

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@altv/types-client - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

364

index.d.ts

@@ -201,3 +201,2 @@ declare module "alt-client" {

* @remarks Changes will be reflected only on a particular instance of the vehicle. On creation, model handling will be used as a base and changed properties will be added on top of it.
*
*/

@@ -307,4 +306,3 @@ export interface IVehicleHandling {

/**
* Resource name of the executing entity.
*
* Resource name of the executing resource.
*/

@@ -317,3 +315,2 @@ export const resourceName: string;

* @remarks It's a slighty modified semantic versioning specification, which can be matched using this regular expression pattern `^(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))$`.
*
*/

@@ -326,3 +323,2 @@ export const version: string;

* @remarks It's the version of the SDK the current runtime was compiled with.
*
*/

@@ -333,3 +329,2 @@ export const sdkVersion: number;

* Represents the current client branch.
*
*/

@@ -347,3 +342,3 @@ export const branch: string;

constructor(arr: number[]);
constructor(arr: [number, number, number]);

@@ -405,2 +400,66 @@ constructor(obj: IVector3);

export class Vector2 {
public readonly x: number;
public readonly y: number;
constructor(x: number, y: number);
constructor(arr: [number, number]);
constructor(obj: IVector2);
public get length(): number;
public toArray(): [number, number];
public add(x: number, y: number): Vector2;
public add(value: number): Vector2;
public add(array: [number, number]): Vector2;
public add(vector: IVector2): Vector2;
public sub(x: number, y: number): Vector2;
public sub(value: number): Vector2;
public sub(array: [number, number]): Vector2;
public sub(vector: IVector2): Vector2;
public div(x: number, y: number): Vector2;
public div(value: number): Vector2;
public div(array: [number, number]): Vector2;
public div(vector: IVector2): Vector2;
public mul(x: number, y: number): Vector2;
public mul(value: number): Vector2;
public mul(array: [number, number]): Vector2;
public mul(vector: IVector2): Vector2;
public negative(): Vector2;
public normalize(): Vector2;
public distanceTo(vector: IVector2): number;
public angleTo(vector: IVector2): Vector2;
public angleToDegrees(vector: IVector2): Vector2;
public toRadians(): Vector2;
public toDegrees(): Vector2;
public isInRange(vector: IVector2, range: number): boolean;
}
export class RGBA {

@@ -433,2 +492,3 @@ /** r component of RGBA */

* Object usability.
*
* @returns False if object is no longer usable.

@@ -586,4 +646,3 @@ */

/**
* Current weapon components
*
* Current weapon components.
*/

@@ -593,3 +652,3 @@ public readonly currentWeaponComponents: Array<number>;

/**
* Tint index for currently equipeed weapon
* Tint index for currently equipped weapon.
*

@@ -601,4 +660,3 @@ * @alpha

/**
* Currently equipped weapon
*
* Currently equipped weapon.
*/

@@ -608,3 +666,3 @@ public readonly currentWeapon: number;

/**
* Is the player currently jumping
* Is the player currently jumping.
*

@@ -616,4 +674,3 @@ * @alpha

/**
* Is the player currently in ragdoll
*
* Is the player currently in ragdoll.
*/

@@ -623,4 +680,3 @@ public readonly isInRagdoll: boolean;

/**
* Is the player currently aiming
*
* Is the player currently aiming.
*/

@@ -630,5 +686,3 @@ public readonly isAiming: boolean;

/**
* Is the player currently shooting with a weapon
*
* @alpha
* Is the player currently shooting with a weapon.
*/

@@ -638,5 +692,3 @@ //public readonly isShooting: boolean;

/**
* Is the player currently reloading their weapon
*
* @alpha
* Is the player currently reloading their weapon.
*/

@@ -646,4 +698,3 @@ //public readonly isReloading: boolean;

/**
* Current armour
*
* Current armour.
*/

@@ -653,4 +704,3 @@ public readonly armour: number;

/**
* Max available armour value
*
* Max available armour value.
*/

@@ -660,4 +710,3 @@ public readonly maxArmour: number;

/**
* Current player movement speed
*
* Current player movement speed.
*/

@@ -667,4 +716,3 @@ public readonly moveSpeed: number;

/**
* Position the player is currently aiming at
*
* Position the player is currently aiming at.
*/

@@ -674,4 +722,3 @@ public readonly aimPos: Vector3;

/**
* Rotation of the head of the player
*
* Rotation of the head of the player.
*/

@@ -681,4 +728,3 @@ public readonly headRot: Vector3;

/**
* Curent seat the player is sitting in
*
* Curent seat the player is sitting in.
*/

@@ -688,4 +734,3 @@ public readonly seat: number;

/**
* The entity the player is aiming at
*
* The entity the player is aiming at.
*/

@@ -695,4 +740,3 @@ public readonly entityAimingAt: Entity | null;

/**
* The current aim offset of the player
*
* The current aim offset of the player.
*/

@@ -702,4 +746,3 @@ public readonly entityAimOffset: Vector3 | null;

/**
* Is the flashlight of the player activated
*
* Is the flashlight of the player activated.
*/

@@ -709,4 +752,3 @@ public readonly flashlightActive: boolean;

/**
* Current health of the player
*
* Current health of the player.
*/

@@ -716,4 +758,3 @@ public readonly health: number;

/**
* Current max health of the player
*
* Current max health of the player.
*/

@@ -748,3 +789,2 @@ public readonly maxHealth: number;

* Vehicle handling, which affects how vehicle responds and reacts to the inputs of a driver.
*
*/

@@ -754,3 +794,3 @@ public handling: IVehicleHandling;

/**
* Vehicle RPM
* Vehicle RPM.
*

@@ -762,8 +802,8 @@ * @returns Normalised value on a scale of [0, 1].

/**
* Vehicle wheels speed
*/
* Vehicle wheels speed.
*/
public readonly speed: number;
/**
* Vehicle speed vector
* Vehicle speed vector.
*/

@@ -773,3 +813,3 @@ public readonly speedVector: Vector3;

/**
* Vehicle wheels count
* Vehicle wheels count.
*/

@@ -1106,3 +1146,3 @@ public readonly wheelsCount: number;

* @param url URL of the html file.
* @param isOverlay true to render as overlay, false to render on game's GUI stage
* @param isOverlay true to render as overlay, false to render on game's GUI stage.
*/

@@ -1115,3 +1155,3 @@ constructor(url: string, isOverlay?: boolean);

* @param url URL of the html file.
* @param pos x, y coordinates of the position
* @param pos x, y coordinates of the position.
*/

@@ -1124,4 +1164,4 @@ constructor(url: string, pos: IVector2);

* @param url URL of the html file.
* @param pos x, y coordinates of the position
* @param size x, y to define the size
* @param pos x, y coordinates of the position.
* @param size x, y to define the size.
*/

@@ -1134,5 +1174,5 @@ constructor(url: string, pos: IVector2, size: IVector2);

* @param url URL of the html file.
* @param isOverlay true to render as overlay, false to render on game's GUI stage
* @param pos x, y coordinates of the position
* @param size x, y to define the size
* @param isOverlay true to render as overlay, false to render on game's GUI stage.
* @param pos x, y coordinates of the position.
* @param size x, y to define the size.
*/

@@ -1158,4 +1198,2 @@ constructor(url: string, isOverlay: boolean, pos: IVector2, size: IVector2);

public focus(): void;
/**

@@ -1186,2 +1224,10 @@ * Unsubscribes from WebView event handler with specified listener.

/**
* Focuses the webview so it can be interacted with.
*/
public focus(): void;
/**
* Unfocuses the webview so it ignores user input.
*/
public unfocus(): void;

@@ -1217,7 +1263,2 @@ }

/**
* @deprecated This property was removed on the other branches than release.
*/
public friendly: boolean;
public gxtName: string;

@@ -1243,12 +1284,4 @@

/**
* @deprecated This property was changed from instance member to static.
*/
public routeColor: number;
public scale: number;
/**
* @remarks This property will expect and return RGBA object on the other branches than release.
*/
public secondaryColor: number | RGBA;

@@ -1262,3 +1295,3 @@

public size: number;
public size: Vector2;

@@ -1389,6 +1422,15 @@ public sprite: number;

export class LocalStorage {
/**
* Gets the local storage instance.
*/
public static get(): LocalStorage;
/**
* Deletes the specified key from the local storage.
*/
public delete(key: string): void;
/**
* Deletes all keys from the local storage.
*/
public deleteAll(): void;

@@ -1401,6 +1443,15 @@

/**
* Gets the value from the specified key in the local storage.
*/
public get(key: string): any;
/**
* Saves the changes to the disk.
*/
public save(): void;
/**
* Sets the specified key to the specified value in the local storage.
*/
public set(key: string, value: any): void;

@@ -1441,7 +1492,2 @@ }

public static readonly currentUser: IDiscordUser | null;
/**
* @deprecated Seriously, don't use it because it might get removed someday in most unexpected moment.
*/
public static requestOAuth2Token(): Promise<IDiscordOAuth2Token>;
}

@@ -1543,4 +1589,13 @@

/**
* Adds a new gxt text with the specified value.
*
* @param key Gxt text name.
* @param value Gxt text value.
*/
export function addGxtText(key: string, value: string): void;
/**
* Executes the specified scaleform method on the minimap.
*/
export function beginScaleformMovieMethodMinimap(methodName: string): boolean;

@@ -1607,6 +1662,17 @@

/**
* Returns whether the game controls are currently enabled.
*/
export function gameControlsEnabled(): boolean;
export function getCursorPos(): IVector2;
/**
* Gets the current position of the cursor.
*/
export function getCursorPos(): Vector2;
/**
* Gets the value of the specified gxt text.
*
* @param key Gxt text name.
*/
export function getGxtText(key: string): string;

@@ -1616,6 +1682,20 @@

/**
* Gets the current alt:V locale.
*/
export function getLocale(): string;
/**
* Gets the current milliseconds per game minute.
*
* @remarks This is set with the {@link setMsPerGameMinute} function.
*/
export function getMsPerGameMinute(): number;
/**
* Gets the state of the specified permission.
*
* @param permId Permission id.
* @returns Permission state.
*/
export function getPermissionState(permId: Permission): PermissionState;

@@ -1652,11 +1732,4 @@

/**
* Sandbox mode.
* Returns if alt:V is in streamer mode.
*
* @returns True when alt:V client is launched in sandbox mode.
*/
export function isInSandbox(): boolean;
/**
* Streamer mode.
*
* @returns True when alt:V client is launched in streamer mode.

@@ -1668,3 +1741,3 @@ *

/**
* Debug mode.
* Returns if alt:V is in debug mode.
*

@@ -1680,3 +1753,3 @@ * @returns True when alt:V client is launched with debug mode enabled.

*
* @deprecated Use alt.Voice.activityInputEnabled instead
* @deprecated Use alt.Voice.activityInputEnabled instead.
*/

@@ -1709,3 +1782,5 @@ export function isVoiceActivityInputEnabled(): boolean;

/**
* @ignore Should not be used until fixed.
* Loads a model into memory synchronously.
*
* @param modelHash Hash of the model.
*/

@@ -1715,10 +1790,21 @@ export function loadModel(modelHash: number): void;

/**
* @ignore Should not be used until fixed.
* Loads a model into memory asynchronously.
*
* @param modelHash Hash of the model.
*/
export function loadModelAsync(modelHash: number): void;
/**
* Logs the specified arguments to the console.
*/
export function log(...args: any[]): void;
/**
* Logs the specified arguments as an error to the console.
*/
export function logError(...args: any[]): void;
/**
* Logs the specified arguments as a warning to the console.
*/
export function logWarning(...args: any[]): void;

@@ -1800,6 +1886,21 @@

/**
* Removes the specified gxt text.
*
* @param key Gxt text name.
*/
export function removeGxtText(key: string): void;
/**
* Unloads the specified ipl.
*
* @param iplName Name of the ipl.
*/
export function removeIpl(iplName: string): void;
/**
* Loads the specified ipl.
*
* @param iplName Name of the ipl.
*/
export function requestIpl(iplName: string): void;

@@ -1831,2 +1932,8 @@

/**
* Freezes the camera in place so it doesn't change position or rotation.
*
* @remarks You can still move your character even if your camera is frozen.
* @param state True to freeze the camera, false to unfreeze the camera.
*/
export function setCamFrozen(state: boolean): void;

@@ -1846,3 +1953,2 @@

* @param flag Config flag name.
*
* @returns State of the specified config flag.

@@ -1856,3 +1962,2 @@ */

* @param flag Config flag name.
*
* @returns True when the config flag exists.

@@ -1862,2 +1967,7 @@ */

/**
* Sets the current position of the cursor.
*
* @remarks The cursor has to be visible for this to take effect.
*/
export function setCursorPos(pos: IVector2): void;

@@ -1874,6 +1984,7 @@

export function setModel(modelName: string): void;
/**
* Sets the amount of real milliseconds that have to pass every game minute.
*/
export function setMsPerGameMinute(milliseconds: number): void;
export function setMsPerGameMinute(miliseconds: number): void;
/**

@@ -1886,3 +1997,2 @@ * Sets the rotation velocity for the specified entity.

* @param z The rotation velocity on the Z axis.
*
*/

@@ -1908,4 +2018,18 @@ export function setRotationVelocity(scriptID: number, x: number, y: number, z: number): void;

export function setWeatherCycle(weathers: Array<any>, multipliers: Array<any>): void;
/**
* Sets the current weather cycle.
*
* @remarks This has to be activated after using it by using the {@link setWeatherSyncActive} function.
* The weathers and multipliers array has to be of the same length.
* @param weathers An array containing the weather ids for the weather cycle.
* @param multipliers An array containing the multipliers for the weather cycle.
*/
export function setWeatherCycle(weathers: Array<number>, multipliers: Array<number>): void;
/**
* Sets whether the weather sync is active.
*
* @remarks The weather sync has to be set by using the {@link setWeatherCycle} function.
* @param isActive Whether the weather sync should be active.
*/
export function setWeatherSyncActive(isActive: boolean): void;

@@ -1921,2 +2045,8 @@

/**
* Toggles the game controls.
*
* @remarks When this is set to false, all controls are disabled, so you can't move your character or the camera.
* @param state True to enable controls, false to disable controls.
*/
export function toggleGameControls(state: boolean): void;

@@ -1950,12 +2080,38 @@

/**
* Starts the websocket connection.
*/
public start(): void;
/**
* Stops the websocket connection.
*/
public stop(): void;
/**
* Sends the specified message to the websocket server.
*
* @param message The message to send.
* @returns Whether sending the message was successful.
*/
public send(message: string | ArrayBuffer | ArrayBufferView): boolean;
/**
* Adds a sub protocol to the websocket.
*
* @param protocol Name of the protocol.
*/
public addSubProtocol(protocol: string): void;
/**
* Gets all added sub protocols.
*/
public getSubProtocols(): string[];
/**
* Sets the specified header to the specified value.
*
* @param header Header name.
* @param value Header value.
*/
public setExtraHeader(header: string, value: string): void;

@@ -1968,3 +2124,6 @@ }

* @param path Relative path to the game folder.
* @remarks Example: alt.loadYtyp("x64u.rpf/levels/gta5/_hills/country_06/country_06_metadata.rpf/cs6_08_interior_cs6_08_mine_int.ytyp")
* @example
* ```js
* alt.loadYtyp("x64u.rpf/levels/gta5/_hills/country_06/country_06_metadata.rpf/cs6_08_interior_cs6_08_mine_int.ytyp")
* ```
*

@@ -1979,3 +2138,6 @@ * @alpha

* @param path Relative path to the game folder.
* @remarks Example: alt.unloadYtyp("x64u.rpf/levels/gta5/_hills/country_06/country_06_metadata.rpf/cs6_08_interior_cs6_08_mine_int.ytyp")
* @example
* ```js
* alt.unloadYtyp("x64u.rpf/levels/gta5/_hills/country_06/country_06_metadata.rpf/cs6_08_interior_cs6_08_mine_int.ytyp")
* ```
*

@@ -1982,0 +2144,0 @@ * @alpha

{
"name": "@altv/types-client",
"version": "1.5.1",
"version": "1.5.2",
"description": "This package contains types definitions for alt:V client-side module.",

@@ -5,0 +5,0 @@ "types": "index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc