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.3.4 to 1.4.4

728

index.d.ts

@@ -37,2 +37,16 @@ declare module "alt-client" {

export const enum Permission {
None,
ScreenCapture,
WebRTC,
All
}
export const enum PermissionState {
Allowed,
Denied,
Unspecified,
Failed
}
export const enum StatName {

@@ -64,2 +78,72 @@ Stamina = "stamina",

export const enum CheckpointType {
CylinderSingleArrow,
CylinderDoubleArrow,
CylinderTripleArrow,
CylinderCycleArrow,
CylinderCheckerboard,
CylinderWrench,
CylinderSingleArrow2,
CylinderDoubleArrow2,
CylinderTripleArrow2,
CylinderCycleArrow2,
CylinderCheckerboard2,
CylinderWrench2,
RingSingleArrow,
RingDoubleArrow,
RingTripleArrow,
RingCycleArrow,
RingCheckerboard,
SingleArrow,
DoubleArrow,
TripleArrow,
CycleArrow,
Checkerboard,
CylinderSingleArrow3,
CylinderDoubleArrow3,
CylinderTripleArrow3,
CylinderCycleArrow3,
CylinderCheckerboard3,
CylinderSingleArrow4,
CylinderDoubleArrow4,
CylinderTripleArrow4,
CylinderCycleArrow4,
CylinderCheckerboard4,
CylinderSingleArrow5,
CylinderDoubleArrow5,
CylinderTripleArrow5,
CylinderCycleArrow5,
CylinderCheckerboard5,
RingPlaneUp,
RingPlaneLeft,
RingPlaneRight,
RingPlaneDown,
Empty,
Ring,
Empty2,
Cylinder,
Cylinder1,
Cylinder2,
Cylinder3,
Cylinder4,
Cylinder5,
Empty3,
Empty4,
Empty5,
Empty6,
RingDollar,
RingWolf,
RingQuestionMark,
RingPlane,
RingChopper,
RingBoat,
RingCar,
RingBike,
RingBicycle,
RingTruck,
RingParachute,
RingJetpack,
RingWhirl
}
export interface IClientEvent {

@@ -69,5 +153,9 @@ anyResourceError: (resourceName: string) => void;

anyResourceStop: (resourceName: string) => void;
/** @beta */
changedVehicleSeat: (vehicle: Vehicle, oldSeat: number, seat: number) => void;
connectionComplete: () => void;
consoleCommand: (name: string, ...args: string[]) => void;
disconnect: () => void;
/** @beta */
enteredVehicle: (vehicle: Vehicle, seat: number) => void;
gameEntityCreate: (entity: Entity) => void;

@@ -77,2 +165,4 @@ gameEntityDestroy: (entity: Entity) => void;

keyup: (key: number) => void;
/** @beta */
leftVehicle: (vehicle: Vehicle, seat: number) => void;
removeEntity: (object: BaseObject) => void;

@@ -87,2 +177,4 @@ resourceStart: (errored: boolean) => void;

* No particular usage for now, stick to {@link everyTick} instead.
*
* @beta
*/

@@ -93,3 +185,3 @@ render: () => void;

export interface IDiscordOAuth2Token {
readonly token: string
readonly token: string;
readonly expires: number;

@@ -109,8 +201,9 @@ readonly scopes: string;

* This handling applies to particular vehicle instance, as opposed to the {@link HandlingData}.
*
*
* @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.
*
*
* @beta
*/
export interface IVehicleHandling {
readonly handlingNameHash: number;
acceleration: number;

@@ -137,3 +230,2 @@ antiRollBarBiasFront: number;

handlingFlags: number;
readonly handlingNameHash: number;
inertiaMultiplier: Vector3;

@@ -197,2 +289,9 @@ initialDragCoeff: number;

export interface IVehicleNeon {
left: boolean;
right: boolean;
front: boolean;
back: boolean;
}
export interface IVector2 {

@@ -213,14 +312,32 @@ readonly x: number;

/**
* Resource name of the executing entity.
*
* @beta
*/
export const resourceName: string;
/**
* Represents the current client version.
*
* @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-]*))*))$`.
*
* @beta
*/
export const Version: string;
export const version: string;
/**
* Represents the current client SDK version.
*
* @remarks It's the version of the SDK the current runtime was compiled with.
*
* @beta
*/
export const sdkVersion: number;
/**
* Represents the current client branch.
*
* @beta
*/
export const Branch: string;
export const branch: string;

@@ -239,2 +356,80 @@ export class Vector3 {

constructor(obj: IVector3);
/** @beta */
public get length(): number;
/** @beta */
public toArray(): [number, number, number];
/** @beta */
public add(x: number, y: number, z: number): Vector3;
/** @beta */
public add(value: number): Vector3;
/** @beta */
public add(array: [number, number, number]): Vector3;
/** @beta */
public add(vector: IVector3): Vector3;
/** @beta */
public sub(x: number, y: number, z: number): Vector3;
/** @beta */
public sub(value: number): Vector3;
/** @beta */
public sub(array: [number, number, number]): Vector3;
/** @beta */
public sub(vector: IVector3): Vector3;
/** @beta */
public div(x: number, y: number, z: number): Vector3;
/** @beta */
public div(value: number): Vector3;
/** @beta */
public div(array: [number, number, number]): Vector3;
/** @beta */
public div(vector: IVector3): Vector3;
/** @beta */
public mul(x: number, y: number, z: number): Vector3;
/** @beta */
public mul(value: number): Vector3;
/** @beta */
public mul(array: [number, number, number]): Vector3;
/** @beta */
public mul(vector: IVector3): Vector3;
/** @beta */
public negative(): Vector3;
/** @beta */
public normalize(): Vector3;
/** @beta */
public distanceTo(vector: IVector3): Vector3;
/** @beta */
public angleTo(vector: IVector3): Vector3;
/** @beta */
public angleToDegrees(vector: IVector3): Vector3;
/** @beta */
public toRadians(): Vector3;
/** @beta */
public toDegrees(): Vector3;
/** @beta */
public isInRange(vector: IVector3, range: number): boolean;
}

@@ -317,3 +512,22 @@

/**
* @beta
*/
export class Checkpoint extends WorldObject {
public checkpointType: CheckpointType;
public nextPos: Vector3;
public radius: number;
public height: number;
public color: RGBA;
constructor(type: CheckpointType, pos: Vector3, nextPos: Vector3, radius: number, height: number, rgbcolor: RGBA);
public isEntityIn(entity: Entity): boolean;
public isPointIn(pos: Vector3): boolean;
}
export class Entity extends WorldObject {
/** @beta */
public static readonly all: Array<Entity>;
/** Entity unique id */

@@ -336,2 +550,5 @@ public readonly id: number;

/** @beta */
public readonly visible: boolean;
/**

@@ -406,2 +623,135 @@ * Retrieves the entity from the pool.

/**
* Current weapon components
*
* @beta
*/
public readonly currentWeaponComponents: Array<number>;
/**
* Tint index for currently equipeed weapon
*
* @beta
*/
public readonly currentWeaponTintIndex: number;
/**
* Currently equipped weapon
*
* @beta
*/
public readonly currentWeapon: number;
/**
* Is the player currently jumping
*
* @beta
*/
public readonly isJumping: boolean;
/**
* Is the player currently in ragdoll
*
* @beta
*/
public readonly isInRagdoll: boolean;
/**
* Is the player currently aiming
*
* @beta
*/
public readonly isAiming: boolean;
/**
* Is the player currently shooting with a weapon
*
* @beta
*/
public readonly isShooting: boolean;
/**
* Is the player currently reloading their weapon
*
* @beta
*/
public readonly isReloading: boolean;
/**
* Current armour
*
* @beta
*/
public readonly armour: number;
/**
* Max available armour value
*
* @beta
*/
public readonly maxArmour: number;
/**
* Current player movement speed
*
* @beta
*/
public readonly moveSpeed: number;
/**
* Position the player is currently aiming at
*
* @beta
*/
public readonly aimPos: Vector3;
/**
* Rotation of the head of the player
*
* @beta
*/
public readonly headRot: Vector3;
/**
* Curent seat the player is sitting in
*
* @beta
*/
public readonly seat: number;
/**
* The entity the player is aiming at
*
* @beta
*/
public readonly entityAimingAt: Entity | null;
/**
* The current aim offset of the player
*
* @beta
*/
public readonly entityAimOffset: Vector3 | null;
/**
* Is the flashlight of the player activated
*
* @beta
*/
public readonly flashlightActive: boolean;
/**
* Current health of the player
*
* @beta
*/
public readonly health: number;
/**
* Current max health of the player
*
* @beta
*/
public readonly maxHealth: number;
/**
* Retrieves the player from the pool.

@@ -432,2 +782,3 @@ *

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

@@ -437,15 +788,326 @@ */

/** Vehicle RPM [0, 1] */
/**
* Vehicle RPM
*
* @returns Normalised value on a scale of [0, 1].
*/
public readonly rpm: number;
/** Vehicle wheel speed */
/**
* Vehicle wheels speed
*/
public readonly speed: number;
/** Vehicle wheel speed vector */
/**
* Vehicle speed vector
*/
public readonly speedVector: Vector3;
/** Vehicle wheel count */
/**
* Vehicle wheels count
*/
public readonly wheelsCount: number;
/**
* Is the vehicle destroyed.
*
* @beta
*/
public readonly destroyed: boolean;
/**
* Available modkits for the vehicle.
*
* @beta
*/
public readonly modKitsCount: number;
/**
* Current vehicle modkit.
*
* @beta
*/
public readonly modKit: number;
/**
* Vehicle primary color.
*
* @beta
*/
public readonly primaryColor: number;
/**
* Custom (RGB) vehicle primary color.
*
* @beta
*/
public readonly customPrimaryColor: RGBA;
/**
* Vehicle secondary color.
*
* @beta
*/
public readonly secondaryColor: number;
/**
* Custom (RGB) vehicle secondary color.
*
* @beta
*/
public readonly customSecondaryColor: RGBA;
/**
* Vehicle pearl color.
*
* @beta
*/
public readonly pearlColor: number;
/**
* Vehicle wheel color.
*
* @beta
*/
public readonly wheelColor: number;
/**
* Vehicle interior color.
*
* @beta
*/
public readonly interiorColor: number;
/**
* Vehicle dashboard color.
*
* @beta
*/
public readonly dashboardColor: number;
/**
* Vehicle tire smoke color.
*
* @beta
*/
public readonly tireSmokeColor: number;
/**
* Vehicle wheel type.
*
* @beta
*/
public readonly wheelType: number;
/**
* Vehicle front wheels variation.
*
* @beta
*/
public readonly frontWheels: number;
/**
* Vehicle rear wheels variation.
*
* @beta
*/
public readonly rearWheels: number;
/**
* Are custom tires active.
*
* @beta
*/
public readonly customTires: boolean;
/**
* Vehicle darkness.
*
* @beta
*/
public readonly darkness: number;
/**
* Vehicle number plate type index.
*
* @beta
*/
public readonly numberPlateIndex: number;
/**
* Vehicle number plate text.
*
* @beta
*/
public readonly numberPlateText: string;
/**
* Vehicle window tint.
*
* @beta
*/
public readonly windowTint: number;
/**
* Vehicle dirt level.
*
* @beta
*/
public readonly dirtLevel: number;
/**
* Vehicle neon.
*
* @beta
*/
public readonly neon: IVehicleNeon;
/**
* Vehicle neon color.
*
* @beta
*/
public readonly neonColor: RGBA;
/**
* Vehicle livery.
*
* @beta
*/
public readonly livery: number;
/**
* Vehicle roof livery.
*
* @beta
*/
public readonly roofLivery: number;
/**
* Vehicle engine state.
*
* @beta
*/
public readonly engineOn: boolean;
/**
* Vehicle handbrake state.
*
* @beta
*/
public readonly handbrakeActive: boolean;
/**
* Vehicle headlight color.
*
* @beta
*/
public readonly headlightColor: number;
/**
* Vehicle active radio station.
*
* @beta
*/
public readonly activeRadioStation: number;
/**
* Vehicle siren state.
*
* @beta
*/
public readonly sirenActive: boolean;
/**
* Vehicle lock state.
*
* @beta
*/
public readonly lockState: number;
/**
* Vehicle daylight state.
*
* @beta
*/
public readonly daylightOn: boolean;
/**
* Vehicle nightlight state.
*
* @beta
*/
public readonly nightlightOn: boolean;
/**
* Vehicle roof state.
*
* @beta
*/
public readonly roofState: number;
/**
* Vehicle flamethrower state.
*
* @beta
*/
public readonly flamethrowerActive: boolean;
/**
* Vehicle lights multiplier.
*
* @beta
*/
public readonly lightsMultiplier: number;
/**
* The vehicle's engine health.
*
* @beta
*/
public readonly engineHealth: number;
/**
* The vehicle's petrol tank health.
*
* @beta
*/
public readonly petrolTankHealth: number;
/**
* Vehicle repairs count.
*
* @beta
*/
public readonly repairsCount: number;
/**
* The vehicle's body health.
*
* @beta
*/
public readonly bodyHealth: number;
/**
* The vehicle's additional body health.
*
* @beta
*/
public readonly bodyAdditionalHealth: number;
/**
* Does the vehicle currently have the bulletproof windows?
*
* @beta
*/
public readonly hasArmoredWindows: boolean;
/**
* Determines whether the vehicle's engine should be turned on/off automatically.
*
* @beta
*/
public readonly manualEngineControl: boolean;
/**
* Retrieves the vehicle from the pool.

@@ -529,2 +1191,6 @@ *

export class Blip extends WorldObject {
/**
* @beta
*/
public static routeColor: RGBA;
public alpha: number;

@@ -552,5 +1218,11 @@ public asMissionCreator: boolean;

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

@@ -584,2 +1256,3 @@ public showCone: boolean;

export class HandlingData {
public readonly handlingNameHash: number;
public acceleration: number;

@@ -606,3 +1279,2 @@ public antiRollBarBiasFront: number;

public handlingFlags: number;
public readonly handlingNameHash: number;
public inertiaMultiplier: Vector3;

@@ -759,2 +1431,9 @@ public initialDragCoeff: number;

export class Voice {
/**
* Determines whether the microphone input is currently disabled.
*/
static muteInput: boolean;
}
/**

@@ -882,2 +1561,4 @@ * Removes the specified key.

export function getPermissionState(permId: Permission): PermissionState;
/**

@@ -905,2 +1586,9 @@ * Gets a value of the specified statistic.

/**
* Returns state of game window.
*
* @returns True when game window is focused.
*/
export function isGameFocused(): boolean;
/**
* Sandbox mode.

@@ -916,2 +1604,4 @@ *

* @returns True when alt:V client is launched in streamer mode.
*
* @beta
*/

@@ -979,2 +1669,4 @@ export function isInStreamerMode(): boolean;

export function once<K extends keyof IClientEvent>(eventName: K, listener: IClientEvent[K]): void;
/**

@@ -988,2 +1680,4 @@ * Subscribes to client event handler with specified listener.

export function once<S extends string>(event: Exclude<S, keyof IClientEvent>, listener: (...args: any[]) => void | Promise<void>): void;
/**

@@ -997,2 +1691,4 @@ * Subscribes to client event handler with specified listener.

export function onceServer(eventName: string, listener: (...args: any[]) => void): void;
export function removeGxtText(key: string): void;

@@ -1008,2 +1704,4 @@

* @return Return is dependent on the success of the operation.
*
* @beta
*/

@@ -1017,2 +1715,4 @@ export function takeScreenshot(): Promise<string>;

* @remarks This only takes a screenshot of the raw GTA:V window. WebViews, game overlays etc. won't be captured.
*
* @beta
*/

@@ -1047,3 +1747,3 @@ export function takeScreenshotGameOnly(): Promise<string>;

* Sets the rotation velocity for the specified entity.
*
*
* @param scriptID The script id of the entity.

@@ -1053,2 +1753,4 @@ * @param x The rotation velocity on the X axis.

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

@@ -1055,0 +1757,0 @@ export function setRotationVelocity(scriptID: number, x: number, y: number, z: number): void;

2

package.json
{
"name": "@altv/types-client",
"version": "1.3.4",
"version": "1.4.4",
"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