Skip to content

Commit

Permalink
feat(client|server): various new APIs (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxshady authored Jan 29, 2025
1 parent 06d1e65 commit 522249c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@ declare module "alt-client" {

playerStartTalking: (target: Player) => void;
playerStopTalking: (target: Player) => void;

/**
* @remarks This event is only triggered for local player.
*/
playerDimensionChange: (player: Player, oldDimension: number, newDimension: number) => void;
/**
* @remarks This event is only triggered for local player.
*/
playerInteriorChange: (player: Player, oldInterior: number, newInterior: number) => void;
}

export interface IDiscordUser {
Expand Down
15 changes: 15 additions & 0 deletions server/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,18 @@ declare module "alt-server" {
readonly cloudAuthResult: CloudAuthResult;
readonly id: number;
readonly isAccepted: boolean;
readonly hwid3: string;

/**
* Set text for (potential) player in queue.
*
* @example
* ```js
* alt.on("connectionQueueAdd", (connection) => {
* connection.text = "Your position in queue: 3";
* })
* ```
*/
text: string;

/**
Expand Down Expand Up @@ -491,6 +502,7 @@ declare module "alt-server" {
readonly skillAbove50MaxAmmoMp: number;
readonly maxSkillMaxAmmoMp: number;
readonly bonusMaxAmmoMp: number;
readonly damageType: string;
}

export interface IAmmoFlags {
Expand Down Expand Up @@ -1060,6 +1072,8 @@ declare module "alt-server" {
public readonly isInMelee: boolean;
public readonly isInCover: boolean;
public readonly isParachuting: boolean;
public readonly isOnVehicle: boolean;
public readonly isInWater: boolean;

/**
* Position the player is currently aiming at.
Expand Down Expand Up @@ -1091,6 +1105,7 @@ declare module "alt-server" {
public readonly isSpawned: boolean;
public readonly socialID: string;
public readonly socialClubName: string;
public readonly hwid3: string;
public readonly hwidHash: string;
public readonly hwidExHash: string;
public readonly authToken: string;
Expand Down

0 comments on commit 522249c

Please sign in to comment.