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.6.1 to 1.7.0

761

index.d.ts

@@ -0,1 +1,2 @@

/// <reference types="@altv/types-shared"/>
/**

@@ -5,2 +6,4 @@ * @module alt-client

declare module "alt-client" {
import * as shared from "alt-shared";
export const enum Locale {

@@ -38,3 +41,3 @@ Arabic = "ar",

ChineseSimplified = "zh_cn",
ChineseTraditional = "zh_tw"
ChineseTraditional = "zh_tw",
}

@@ -46,3 +49,3 @@

WebRTC,
All
All,
}

@@ -54,3 +57,3 @@

Unspecified,
Failed
Failed,
}

@@ -65,21 +68,5 @@

Shooting = "shooting_ability",
Stealth = "stealth_ability"
Stealth = "stealth_ability",
}
export const enum FileEncoding {
Utf8 = "utf-8",
Utf16 = "utf-16",
Binary = "binary"
}
export const enum BaseObjectType {
Player,
Vehicle,
Blip,
WebView,
VoiceChannel,
Colshape,
Checkpoint
}
export const enum CheckpointType {

@@ -152,3 +139,3 @@ CylinderSingleArrow,

RingJetpack,
RingWhirl
RingWhirl,
}

@@ -160,3 +147,3 @@

Closing,
Closed
Closed,
}

@@ -178,3 +165,3 @@

leftVehicle: (vehicle: Vehicle, seat: number) => void;
removeEntity: (object: BaseObject) => void;
removeEntity: (object: shared.BaseObject) => void;
resourceStart: (errored: boolean) => void;

@@ -224,3 +211,3 @@ resourceStop: () => void;

camberStiffness: number;
centreOfMassOffset: Vector3;
centreOfMassOffset: shared.Vector3;
clutchChangeRateScaleDownShift: number;

@@ -238,3 +225,3 @@ clutchChangeRateScaleUpShift: number;

handlingFlags: number;
inertiaMultiplier: Vector3;
inertiaMultiplier: shared.Vector3;
initialDragCoeff: number;

@@ -297,20 +284,2 @@ initialDriveForce: number;

export interface IVehicleNeon {
left: boolean;
right: boolean;
front: boolean;
back: boolean;
}
export interface IVector2 {
readonly x: number;
readonly y: number;
}
export interface IVector3 {
readonly x: number;
readonly y: number;
readonly z: number;
}
export interface IHttpResponse {

@@ -322,245 +291,7 @@ readonly statusCode: number;

/**
* Resource name of the executing resource.
*/
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-]*))*))$`.
*/
export const version: string;
/**
* Represents the current client SDK version.
*
* @remarks It's the version of the SDK the current runtime was compiled with.
*/
export const sdkVersion: number;
/**
* Represents the current client branch.
*/
export const branch: string;
export class Vector3 {
public readonly x: number;
public readonly y: number;
public readonly z: number;
constructor(x: number, y: number, z: number);
constructor(arr: [number, number, number]);
constructor(obj: IVector3);
public get length(): number;
public toArray(): [number, number, number];
public add(x: number, y: number, z: number): Vector3;
public add(value: number): Vector3;
public add(array: [number, number, number]): Vector3;
public add(vector: IVector3): Vector3;
public sub(x: number, y: number, z: number): Vector3;
public sub(value: number): Vector3;
public sub(array: [number, number, number]): Vector3;
public sub(vector: IVector3): Vector3;
public div(x: number, y: number, z: number): Vector3;
public div(value: number): Vector3;
public div(array: [number, number, number]): Vector3;
public div(vector: IVector3): Vector3;
/** @alpha */
public dot(x: number, y: number, z: number): Vector3;
/** @alpha */
public dot(value: number): Vector3;
/** @alpha */
public dot(array: [number, number, number]): Vector3;
/** @alpha */
public dot(vector: IVector3): Vector3;
public mul(x: number, y: number, z: number): Vector3;
public mul(value: number): Vector3;
public mul(array: [number, number, number]): Vector3;
public mul(vector: IVector3): Vector3;
public negative(): Vector3;
public normalize(): Vector3;
public distanceTo(vector: IVector3): number;
public angleTo(vector: IVector3): Vector3;
public angleToDegrees(vector: IVector3): Vector3;
public toRadians(): Vector3;
public toDegrees(): Vector3;
public isInRange(vector: IVector3, range: number): boolean;
}
/**
* @alpha
*/
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 {
/** r component of RGBA */
public r: number;
/** g component of RGBA */
public g: number;
/** b component of RGBA */
public b: number;
/** a component of RGBA */
public a: number;
export class WorldObject extends shared.BaseObject {
/**
* @param r An r component.
* @param g An g component.
* @param b An b component.
* @param a An a component.
*/
constructor(r: number, g: number, b: number, a: number);
}
export class BaseObject {
/**
* Type of the object.
*/
public readonly type: BaseObjectType;
/**
* Object usability.
*
* @returns False if object is no longer usable.
*/
public readonly valid: boolean;
/**
* Removes the object from the world.
*/
public destroy(): void;
/**
* Removes the specified key.
*
* @param key The key of the value to remove.
*/
public deleteMeta(key: string): void;
/**
* Gets a value using the specified key.
*
* @param key The key of the value to get.
* @returns Dynamic value associated with the specified key.
*/
public getMeta(key: string): any;
/**
* Determines whether contains the specified key.
*
* @param key The key of the value to locate.
* @returns True when element associated with the specified key is stored.
*/
public hasMeta(key: string): boolean;
/**
* Stores the given value with the specified key.
*
* @remarks The given value will be shared locally.
* @param key The key of the value to store.
*/
public setMeta(key: string, value: any): void;
}
export class WorldObject extends BaseObject {
/**
* Object position
*/
public pos: Vector3;
public pos: shared.Vector3;
}

@@ -570,11 +301,11 @@

public checkpointType: CheckpointType;
public nextPos: Vector3;
public nextPos: shared.Vector3;
public radius: number;
public height: number;
public color: RGBA;
public color: shared.RGBA;
constructor(type: CheckpointType, pos: Vector3, nextPos: Vector3, radius: number, height: number, rgbcolor: RGBA);
constructor(type: CheckpointType, pos: shared.Vector3, nextPos: shared.Vector3, radius: number, height: number, rgbcolor: shared.RGBA);
public isEntityIn(entity: Entity): boolean;
public isPointIn(pos: Vector3): boolean;
public isPointIn(pos: shared.Vector3): boolean;
}

@@ -593,5 +324,5 @@

* Returns whether the entity is spawned in the game world.
*
*
* @remarks This does the same thing as checking if the {@link scriptID} is 0.
*
*
* @alpha

@@ -607,6 +338,6 @@ */

*/
public readonly pos: Vector3;
public readonly pos: shared.Vector3;
/** Entity rotation in radians */
public readonly rot: Vector3;
public readonly rot: shared.Vector3;

@@ -668,5 +399,5 @@ public readonly visible: boolean;

/**
* Array with all streamed in players
*
/**
* Array with all streamed in players
*
* @alpha

@@ -758,3 +489,3 @@ */

*/
public readonly aimPos: Vector3;
public readonly aimPos: shared.Vector3;

@@ -764,3 +495,3 @@ /**

*/
public readonly headRot: Vector3;
public readonly headRot: shared.Vector3;

@@ -780,3 +511,3 @@ /**

*/
public readonly entityAimOffset: Vector3 | null;
public readonly entityAimOffset: shared.Vector3 | null;

@@ -816,13 +547,13 @@ /**

* Set & get the volume for 3D Voice.
*
*
* @remarks Value needs to be between 0-1.
*/
public spatialVolume: number
public spatialVolume: number;
/**
* Set & get the volume for 2D Voice.
*
*
* @remarks Value needs to be between 0-1.
*/
public nonSpatialVolume: number
public nonSpatialVolume: number;
}

@@ -834,5 +565,5 @@

/**
* Array with all streamed in vehicles
*
/**
* Array with all streamed in vehicles
*
* @alpha

@@ -873,6 +604,6 @@ */

/**
* Vehicle RPM.
*
* @returns Normalised value on a scale of [0, 1].
*/
* Vehicle RPM.
*
* @returns Normalised value on a scale of [0, 1].
*/
public readonly rpm: number;

@@ -888,7 +619,7 @@

*/
public readonly speedVector: Vector3;
public readonly speedVector: shared.Vector3;
/**
* Vehicle wheels count.
*/
* Vehicle wheels count.
*/
public readonly wheelsCount: number;

@@ -929,3 +660,3 @@

*/
//public readonly customPrimaryColor: RGBA;
//public readonly customPrimaryColor: shared.RGBA;

@@ -944,3 +675,3 @@ /**

*/
//public readonly customSecondaryColor: RGBA;
//public readonly customSecondaryColor: shared.RGBA;

@@ -1057,3 +788,3 @@ /**

*/
//public readonly neonColor: RGBA;
//public readonly neonColor: shared.RGBA;

@@ -1217,3 +948,3 @@ /**

export class WebView extends BaseObject {
export class WebView extends shared.BaseObject {
/** View visibility state */

@@ -1237,6 +968,6 @@ public isVisible: boolean;

* @param pos x, y coordinates of the position.
*
*
* @alpha
*/
constructor(url: string, pos: IVector2);
constructor(url: string, pos: shared.IVector2);

@@ -1249,6 +980,6 @@ /**

* @param size x, y to define the size.
*
*
* @alpha
*/
constructor(url: string, pos: IVector2, size: IVector2);
constructor(url: string, pos: shared.IVector2, size: shared.IVector2);

@@ -1262,6 +993,6 @@ /**

* @param size x, y to define the size.
*
*
* @alpha
*/
constructor(url: string, isOverlay: boolean, pos: IVector2, size: IVector2);
constructor(url: string, isOverlay: boolean, pos: shared.IVector2, size: shared.IVector2);

@@ -1289,2 +1020,3 @@ /**

* @remarks Listener should be of the same reference as when event was subscribed.
*
* @param eventName Name of the event.

@@ -1331,6 +1063,6 @@ * @param listener Listener that should be removed.

* Gets all the listeners for the specified webview event.
*
*
* @param eventName Name of the event.
* @returns Array of listener functions for that event.
*
*
* @alpha

@@ -1342,3 +1074,3 @@ */

export class Blip extends WorldObject {
public static routeColor: RGBA;
public static routeColor: shared.RGBA;

@@ -1391,3 +1123,3 @@ public alpha: number;

public secondaryColor: number | RGBA;
public secondaryColor: number | shared.RGBA;

@@ -1400,3 +1132,3 @@ public shortRange: boolean;

public size: Vector2;
public size: shared.Vector2;

@@ -1438,3 +1170,3 @@ public sprite: number;

public camberStiffnesss: number;
public centreOfMassOffset: Vector3;
public centreOfMassOffset: shared.Vector3;
public clutchChangeRateScaleDownShift: number;

@@ -1452,3 +1184,3 @@ public clutchChangeRateScaleUpShift: number;

public handlingFlags: number;
public inertiaMultiplier: Vector3;
public inertiaMultiplier: shared.Vector3;
public initialDragCoeff: number;

@@ -1531,4 +1263,2 @@ public initialDriveForce: number;

* Gets the local storage instance.
*
* @deprecated Use the static methods instead.
*/

@@ -1539,3 +1269,3 @@ public static get(): LocalStorage;

* Gets the value from the specified key in the local storage.
*
*
* @alpha

@@ -1547,3 +1277,3 @@ */

* Deletes the specified key from the local storage.
*
*
* @alpha

@@ -1553,13 +1283,14 @@ */

/**
* Deletes all keys from the local storage.
*
* @alpha
*/
/**
* Deletes all keys from the local storage.
*
* @alpha
*/
public static deleteAll(): void;
/**
* @remarks Alias for deleteAll.
* @alpha
*/
/**
* Alias for {@link deleteAll}.
*
* @alpha
*/
public static clear(): void;

@@ -1569,3 +1300,3 @@

* Saves the changes to the disk.
*
*
* @alpha

@@ -1575,7 +1306,7 @@ */

/**
* Sets the specified key to the specified value in the local storage.
*
* @alpha
*/
/**
* Sets the specified key to the specified value in the local storage.
*
* @alpha
*/
public static set(key: string, value: any): void;

@@ -1585,3 +1316,3 @@

* Deletes the specified key from the local storage.
*
*
* @deprecated Use the static methods instead.

@@ -1593,3 +1324,3 @@ */

* Deletes all keys from the local storage.
*
*
* @deprecated Use the static methods instead.

@@ -1601,3 +1332,3 @@ */

* @remarks Alias for deleteAll.
*
*
* @deprecated Use the static methods instead.

@@ -1609,3 +1340,3 @@ */

* Gets the value from the specified key in the local storage.
*
*
* @deprecated Use the static methods instead.

@@ -1617,3 +1348,3 @@ */

* Saves the changes to the disk.
*
*
* @deprecated Use the static methods instead.

@@ -1625,3 +1356,3 @@ */

* Sets the specified key to the specified value in the local storage.
*
*
* @deprecated Use the static methods instead.

@@ -1666,28 +1397,2 @@ */

export class File {
/**
* Determines whether file exists with the specified filename.
*
* @param filename The name of the file.
* @returns Return is dependent on whether file with the specified filename exists.
*/
public static exists(filename: string): boolean;
/**
* Reads content of the file.
*
* @param filename The name of the file.
* @param encoding The encoding of the file. If not specified, it defaults to "utf-8".
*/
public static read(filename: string, encoding?: FileEncoding.Utf8 | FileEncoding.Utf16): string;
/**
* Reads content of the file.
*
* @param filename The name of the file.
* @param encoding The encoding of the file.
*/
public static read(filename: string, encoding: FileEncoding.Binary): ArrayBuffer;
}
export class Voice {

@@ -1701,3 +1406,3 @@ /**

* Determines if the voice activation is enabled.
*
*
* @alpha

@@ -1709,3 +1414,3 @@ */

* Returns the keycode of the voice activation key.
*
*
* @alpha

@@ -1717,52 +1422,6 @@ */

/**
* Removes the specified key.
* Adds a new GXT entry with the specified value.
*
* @param key The key of the value to remove.
*/
export function deleteMeta(key: string): void;
/**
* Gets a value using the specified key.
* @remarks The GXT entry FE_THDR_GTAO is locked and cannot be changed.
*
* @param key The key of the value to get.
* @returns Dynamic value associated with the specified key.
*/
export function getMeta(key: string): any;
/**
* Determines whether contains the specified key.
*
* @param key The key of the value to locate.
* @returns True when element associated with the specified key is stored.
*/
export function hasMeta(key: string): boolean;
/**
* Stores the given value with the specified key.
*
* @remarks The given value will be shared locally to all resources.
* @param key The key of the value to store.
*/
export function setMeta(key: string, value: any): void;
/**
* Gets a value using the specified key.
*
* @param key The key of the value to get.
* @returns Dynamic value associated with the specified key.
*/
export function getSyncedMeta(key: string): any;
/**
* Determines whether contains the specified key.
*
* @param key The key of the value to locate.
* @returns Return is dependent on whether element associated with the specified key is stored.
*/
export function hasSyncedMeta(key: string): boolean;
/**
* Adds a new GXT entry with the specified value.
*
* @remarks The GXT entry FE_THDR_GTAO is locked and cannot be changed.
* @param key GXT entry name.

@@ -1779,44 +1438,2 @@ * @param value GXT entry value.

/**
* Clears a timer set with the {@link everyTick} function.
*
* @param id The id of a timer.
*/
export function clearEveryTick(id: number): void;
/**
* Clears a timer set with the {@link setInterval} function.
*
* @param id The id of a timer.
*/
export function clearInterval(id: number): void;
/**
* Clears a timer set with the {@link nextTick} function.
*
* @param id The id of a timer.
*/
export function clearNextTick(id: number): void;
/**
* Clears a timer set with the {@link setTimeout} function.
*
* @param id The id of a timer.
*/
export function clearTimeout(id: number): void;
/**
* @hidden
*/
export function clearTimer(id: number): void;
/**
* Emits specified event across client resources.
*
* @param player Event is sent to specific player.
* @param eventName Name of the event.
* @param args Rest parameters for emit to send.
*/
export function emit(name: string, ...args: any[]): void;
/**
* Emits specified event to server.

@@ -1831,10 +1448,2 @@ *

/**
* Schedules execution of handler on every frame.
*
* @param handler Handler that should be scheduled for execution.
* @returns A number representing the id value of the timer that is set. Use this value with the {@link clearEveryTick} function to cancel the timer.
*/
export function everyTick(handler: (...args: any[]) => void): number;
/**
* Returns whether the game controls are currently enabled.

@@ -1847,7 +1456,7 @@ */

*/
export function getCursorPos(): Vector2;
export function getCursorPos(): shared.Vector2;
/**
* Gets the value of the specified GXT entry.
*
*
* @param key GXT entry name.

@@ -1866,3 +1475,3 @@ */

* Gets the current milliseconds per game minute.
*
*
* @remarks This is set with the {@link setMsPerGameMinute} function.

@@ -1874,3 +1483,3 @@ */

* Gets the state of the specified permission.
*
*
* @param permId Permission id.

@@ -1889,9 +1498,2 @@ * @returns Permission state.

/**
* Creates a hash using Jenkins one-at-a-time algorithm.
*
* @param str A string from which hash will be created.
*/
export function hash(str: string): number;
/**
* Returns state of console window.

@@ -1920,4 +1522,5 @@ *

* Returns if alt:V is in debug mode.
*
*
* @returns True when the alt:V client is launched with debug mode enabled.
*
* @deprecated In dev branch, use {@link debug}.

@@ -1929,5 +1532,5 @@ */

* Returns whether voice activity input is enabled in alt:V settings.
*
*
* @returns True when voice activity input is enabled in alt:V settings.
*
*
* @deprecated Use alt.Voice.activityInputEnabled instead.

@@ -1939,3 +1542,3 @@ */

* Returns whether the specified key is toggled.
*
*
* @param key Keycode.

@@ -1963,3 +1566,3 @@ */

* Loads a model into memory synchronously.
*
*
* @param modelHash Hash of the model.

@@ -1971,3 +1574,3 @@ */

* Loads a model into memory asynchronously.
*
*
* @param modelHash Hash of the model.

@@ -1978,35 +1581,2 @@ */

/**
* 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;
/**
* Schedules execution of handler on next frame.
*
* @param handler Handler that should be scheduled for execution.
* @returns A number representing the id value of the timer that is set. Use this value with the {@link clearNextTick} function to cancel the timer.
*/
export function nextTick(handler: (...args: any[]) => void): number;
/**
* Unsubscribes from a client event with the specified listener.
*
* @remarks Listener should be of the same reference as when event was subscribed to.
*
* @param eventName Name of the event.
* @param listener Listener that should be removed.
*/
export function off(eventName: string, listener: (...args: any[]) => void): void;
/**
* Unsubscribes from a server event with the specified listener.

@@ -2030,14 +1600,2 @@ *

/**
* Subscribes to all client events with the specified listener.
*
* @remarks Listener will be only called for user-created events.
*
* @param eventName Name of the event.
* @param listener Listener that should be added.
*
* @alpha
*/
export function on(listener: (eventName: string, ...args: any[]) => void): void;
/**
* Subscribes to a client event with the specified listener, which only triggers once.

@@ -2051,14 +1609,2 @@ *

/**
* Subscribes to all client events with the specified listener, which only triggers once.
*
* @remarks Listener will be only called for user-created events.
*
* @param eventName Name of the event.
* @param listener Listener that should be added.
*
* @alpha
*/
export function once(listener: (eventName: string, ...args: any[]) => void): void;
/**
* Subscribes to a server event with the specified listener.

@@ -2105,3 +1651,3 @@ *

* Removes the specified GXT entry.
*
*
* @param key GXT entry name.

@@ -2113,3 +1659,3 @@ */

* Unloads the specified ipl.
*
*
* @param iplName Name of the ipl.

@@ -2121,3 +1667,3 @@ */

* Loads the specified ipl.
*
*
* @param iplName Name of the ipl.

@@ -2130,3 +1676,3 @@ */

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

@@ -2139,5 +1685,5 @@ */

*
* @return Return is dependent on the success of the operation.
* @remarks This only takes a screenshot of the raw GTA:V window. WebViews, game overlays etc. won't be captured.
*
* @returns Return is dependent on the success of the operation.
*/

@@ -2155,4 +1701,5 @@ export function takeScreenshotGameOnly(): Promise<string>;

* 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.

@@ -2188,17 +1735,8 @@ */

* 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;
export function setCursorPos(pos: shared.IVector2): void;
/**
* Schedules execution of handler in specified intervals.
*
* @param handler Handler that should be scheduled for execution.
* @param milliseconds The time, in milliseconds, between execution of specified handler.
* @returns A number representing the id value of the timer that is set. Use this value with the {@link clearInterval} function to cancel the timer.
*/
export function setInterval(handler: (...args: any[]) => void, milliseconds: number): number;
/**
* Sets the amount of real milliseconds that have to pass every game minute.

@@ -2227,15 +1765,7 @@ */

/**
* Schedules execution of handler once after the expiration of interval.
* Sets the current weather cycle.
*
* @param handler Handler that should be scheduled for execution.
* @param milliseconds The time, in milliseconds, before execution of specified handler.
* @returns A number representing the id value of the timer that is set. Use this value with the {@link clearTimeout} function to cancel the timer.
*/
export function setTimeout(handler: (...args: any[]) => void, milliseconds: number): number;
/**
* 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.

@@ -2248,4 +1778,5 @@ * @param multipliers An array containing the multipliers for the weather cycle.

* 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.

@@ -2259,2 +1790,3 @@ */

* @remarks This is handled by resource scoped internal integer, which gets increased/decreased by every function call. When you show your cursor 5 times, to hide it you have to do that 5 times accordingly.
*
* @param state A boolean indicating whenever cursor should be visible or not.

@@ -2266,4 +1798,5 @@ */

* 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.

@@ -2276,3 +1809,3 @@ */

/** @alpha */
export class WebSocketClient extends BaseObject {
export class WebSocketClient extends shared.BaseObject {
public autoReconnect: boolean;

@@ -2312,3 +1845,3 @@

* Sends the specified message to the websocket server.
*
*
* @param message The message to send.

@@ -2321,3 +1854,3 @@ * @returns Whether sending the message was successful.

* Adds a sub protocol to the websocket.
*
*
* @param protocol Name of the protocol.

@@ -2334,3 +1867,3 @@ */

* Sets the specified header to the specified value.
*
*
* @param header Header name.

@@ -2343,9 +1876,9 @@ * @param value Header value.

* Gets all the listeners for the specified websocket event.
*
*
* @param eventName Name of the event.
* @returns Array of listener functions for that event.
*
*
* @alpha
*/
public getEventListeners(eventName: string | null): Function[];
public getEventListeners(eventName: string | null): Function[];
}

@@ -2356,3 +1889,2 @@

*
* @param path Relative path to the game folder.
* @example

@@ -2363,2 +1895,4 @@ * ```js

*
* @param path Relative path to the game folder.
*
* @alpha

@@ -2371,3 +1905,2 @@ */

*
* @param path Relative path to the game folder.
* @example

@@ -2378,2 +1911,4 @@ * ```js

*
* @param path Relative path to the game folder.
*
* @alpha

@@ -2385,9 +1920,8 @@ */

* Evaluates and executes the given JavaScript code.
*
* @remarks
* The code is evaluated in its own context, so it cannot access variables, functions
* etc. from the calling file.
*
* @remarks The code is evaluated in its own context, so it cannot access variables, functions etc. from the calling file.
*
* @param code The JavaScript code.
* @returns The exports of the evaluated module.
*
*
* @alpha

@@ -2398,16 +1932,7 @@ */

/**
* Returns whether the specified resource exists.
*
* @param name Name of the resource.
*
* @alpha
*/
export function hasResource(name: string): boolean;
/**
* Gets all the listeners for the specified local event.
*
*
* @param eventName Name of the event or null for generic event.
* @returns Array of listener functions for that event.
*
*
* @alpha

@@ -2419,6 +1944,6 @@ */

* Gets all the listeners for the specified remote event.
*
*
* @param eventName Name of the event or null for generic event.
* @returns Array of listener functions for that event.
*
*
* @alpha

@@ -2429,3 +1954,3 @@ */

/** @alpha */
export class HttpClient extends BaseObject {
export class HttpClient extends shared.BaseObject {
public constructor();

@@ -2458,7 +1983,8 @@

* Gets the Base64 encoded string of the headshot with the specified ID.
*
*
* @remarks The headshot ID is returned by the `registerPedheadshot3`, `registerPedheadshotTransparent` or `registerPedheadshot` native.
*
* @param id ID of the headshot.
* @returns The Base64 string of the headshot image.
*
*
* @alpha

@@ -2468,10 +1994,3 @@ */

/**
* Returns if alt:V is in debug mode.
*
* @returns True when the alt:V client is launched with debug mode enabled.
*
* @alpha
*/
export const debug: boolean;
export * from "alt-shared";
}

7

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

@@ -33,3 +33,6 @@ "types": "index.d.ts",

},
"homepage": "https://github.com/altmp/altv-types#readme"
"homepage": "https://github.com/altmp/altv-types#readme",
"peerDependencies": {
"@altv/types-shared": "1.0.x"
}
}
# Summary
This package contains types definitions for alt:V client-side module.

@@ -14,2 +15,3 @@

# Details
Files were exported from [https://github.com/altmp/altv-types/tree/master/client](https://github.com/altmp/altv-types/tree/master/client)
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