@byte-fw/byte
Version:
<p align="center"> <img width="460" src="https://github.com/user-attachments/assets/62a88d31-c0a9-4140-bc98-571dee3cb733"> </p>
1,652 lines (1,568 loc) • 49 kB
TypeScript
declare module "byte-client" {
export type ByteExport = {
interfaces: {};
types: {
CEntityType: any;
};
classes: {
InventorySlot: ExportedClass<typeof InventorySlot>;
Inventory: typeof Inventory;
PlayerInventory: ExportedClass<typeof PlayerInventory>;
Player: ExportedClass<typeof Player>;
PlayerPed: ExportedClass<typeof PlayerPed>;
ClothedPed: ExportedClass<typeof ClothedPed>;
game: {
CModel: ExportedClass<typeof CModel>;
CEntity: ExportedClass<typeof CEntity>;
CNetEntity: ExportedClass<typeof CNetEntity>;
CObject: ExportedClass<typeof CObject>;
CPed: ExportedClass<typeof CPed>;
CVehicle: ExportedClass<typeof CVehicle>;
CDoor: ExportedClass<typeof CDoor>;
Texture: ExportedClass<typeof Texture>;
TextureDictionary: ExportedClass<typeof TextureDictionary>;
};
};
controllers: {
RPCController: typeof RPCController;
};
utils: {
Logger: ExportedClass<typeof Logger>;
EnvManager: typeof EnvManager;
XML: typeof XML;
};
shared: ByteSharedExport;
};
export class ExportedClass<T extends Class> {
private prototype: any;
constructor(prototype: T);
/**
* Returns a new instance of the wrapped class
*/
construct(...args: ConstructorParameters<T>): InstanceType<T>;
/**
* Used for accessing static methods of the wrapped class
* @returns The object prototype of the wrapped class
*/
getClass(): T;
}
export class InventorySlot implements IObjectifiable<SlotData> {
private item: any;
private amount: any;
private info: any;
constructor(item: Item | undefined, amount: number, info: SlotInfo | undefined);
getItem(): Item | undefined;
getAmount(): number;
getInfo(): SlotInfo | undefined;
setItem(item: Item, amount?: number): void;
setAmount(amount: number): void;
setInfo(info: SlotInfo): void;
getWeight(): number;
toObject(): {
item: string | undefined;
amount: number;
info: SlotInfo | undefined;
};
}
export class Inventory implements IObjectifiable<InventoryData> {
protected slots: Array<InventorySlot>;
protected maxWeight: number;
constructor(data: Array<InventorySlot>, maxWeight: number);
getMaxWeight(): number;
getSlots(): Array<InventorySlot>;
getSlot(slot: number): InventorySlot;
getSlotWithItem(item: Item): number;
getItemAmount(item: Item): number;
getEmptySlot(): number;
getTotalWeight(): number;
toObject(): Array<{
item: string | undefined;
amount: number;
info: SlotInfo | undefined;
}>;
}
export class PlayerInventory extends Inventory {
constructor(data: Array<InventorySlot>, maxWeight: number);
/**
* @noSelf *
*/
static fromObject(data: InventoryData, maxWeight: number): PlayerInventory;
}
export class Player extends PlayerPed {
/**
* @noSelf *
*/
private static instance: any;
private uuid: any;
private data: any;
private jobs: any;
private gangs: any;
private inventory: any;
private ped: any;
constructor(uuid: UUID, playerData: PlayerData, inventory: PlayerInventory, jobs: Array<PlayerJob>, gangs: Array<PlayerGang>, pedData: PedData, position: Vector4);
getUuid(): string;
getData(): PlayerData;
getInventory(): PlayerInventory;
getJobs(): Array<PlayerJob>;
getGangs(): Array<PlayerGang>;
hasJob(job: PlayerJob): boolean;
hasGang(gang: PlayerGang): boolean;
getJob(job: PlayerJob): PlayerJob | undefined;
getGang(gang: PlayerGang): PlayerGang | undefined;
getJobIndex(job: PlayerJob): number;
getGangIndex(gang: PlayerGang): number;
/**
* @noSelf *
*/
static getInstance(): Optional<Player>;
/**
* Static method called by the server to set the instance of the player with the initial player data
* **Never call this function manually**
* @param instance Instance of the player
* @noSelf
*/
static setInstance(instance: Player): void;
/**
* @noSelf *
*/
static onPlayerReady(cb: (player: Player) => void): void;
/**
* @noSelf *
*/
static onPlayerReadySync(): Player;
}
export class PlayerPed extends ClothedPed {
private source: any;
constructor(source?: number | undefined);
getPed(): number;
getSource(): number;
setSource(source: number): number;
setPlayerModel(model_: string | number): void;
resurrect(): void;
}
export class ClothedPed extends CPed implements IObjectifiable<PedData> {
private maxValuesMemo: any;
constructor(pedId: number);
getPed(): number;
getPedGender(): PlayerGender;
getPedHeadBlendData(): PedHeadBlendData;
setPedHeadBlendData({ shapeFirst, shapeSecond, shapeThird, skinFirst, skinSecond, skinThird, shapeMix, skinMix, thirdMix }: PedHeadBlendData): void;
refreshPedHeadBlendData(): void;
getPedHeadBlendsHeadsByGender(gender: PlayerGender): Array<number>;
getPedHeadBlendHeads(): {
male: Array<number>;
female: Array<number>;
};
getPedComponents(): Record<keyof typeof PedComponent, {
drawable: number;
texture: number;
}>;
getPedFaceFeatures(): Record<keyof typeof FaceFeature, number>;
getPedProps(): Record<keyof typeof PedProps, {
drawable: number;
texture: number;
}>;
getPedHeadOverlays(): Record<keyof typeof PedHeadOverlay, PedHeadOverlayData>;
getCurrentDrawableVariation(component: PedComponent): number;
getCurrentTextureVariation(component: PedComponent): number;
setCurrentDrawableVariation(component: PedComponent, drawable: number, texture: number): void;
getHairColor(): Result<number>;
getHairHightlightColor(): Result<number>;
setHairColor(color: number, highlight: number): void;
getPedFaceFeature(feature: FaceFeature): number;
setPedFaceFeature(feature: FaceFeature, value: number): void;
getPedHeadOverlay(overlay: PedHeadOverlay): PedHeadOverlayData;
getCurrentPropDrawableVariation(component: PedProps): number;
getCurrentPropTextureVariation(component: PedProps): number;
setPropDrawableVariation(component: PedProps, drawable: number, texture: number): void;
getPedHeadOverlayColorType(overlay: number): 0 | 1 | 2;
setPedHeadOverlay(overlay: PedHeadOverlay, index: number, opacity: number): void;
setPedHeadOverlayColor(overlay: PedHeadOverlay, firstColor: number, secondColor: number): void;
getMaxComponents(): Record<keyof typeof PedComponent, Record<number, number>>;
getMaxProps(): Record<keyof typeof PedProps, Record<number, number>>;
getMaxOverlays(): Record<keyof typeof PedHeadOverlay, number>;
getMaxFaceFeatures(): Record<keyof typeof FaceFeature, {
min: number;
max: number;
}>;
getMaxValues(): PedMaxValues;
toObject(): PedData;
/**
* Sets the ped data from a PedData object.
* **Does not set the ped model to the one from `PedData.pedModel`**,
* it assumes the ped given to the constructor already has that model.
*/
setPedData(data: PedData): void;
asString(): string;
}
export class CModel extends ByteGameObject {
protected modelHash: number;
protected modelName: Optional<string>;
constructor(init: number | string);
protected setModel(model: number | string): void;
/**
* Loads the model into the game
* @param wait Time to wait for the model to load
*/
load(wait?: number): Result;
/**
* Unloads the model from the game
*/
unload(): void;
/**
* Getter for the model hash
* @returns The model hash
*/
getHash(): number;
/**
* Getter for the model name
* @returns The model name (can be nil as the model name can't be retrieved from the hash)
*/
getName(): Optional<string>;
/**
* Gets the dimensions of the model
* @returns The minimum and maximum dimensions of the model
* @see https://docs.fivem.net/natives/?_0x03E8D3D5F549087A
*/
getDimensions(): [min: Vector3, max: Vector3];
/**
* Gets the size of the model
* @returns A vector3 representing the size of the model in the x, y, and z dimensions
*/
getSize(): Vector3;
/**
* @returns Whether the model is loaded
*/
getIsLoaded(): boolean;
/**
* @returns Whether the model is valid
*/
getIsModelValid(): boolean;
/**
* @returns Whether the model is in the game's CD image
*/
getIsInCdImage(): boolean;
hash(): number;
/**
* Checks if the object is equal to another object.
* @param other The object to compare to.
* @returns `true` if the objects are equal, `false` otherwise.
*/
equals(other: CModel): boolean;
/**
* @returns A string representation of the object.
*/
asString(): string;
}
export class CEntity extends CModel implements INetworkeable {
protected entityId: number;
constructor(entityId: number);
getEntity(): number;
protected setEntity(entityId: number): void;
/**
* Getter for the model hash
*/
getHash(): number;
getPosition(): Vector3;
setPosition(position: Vector3): void;
getHeading(): IntRange<0, 361>;
setHeading(heading: IntRange<0, 361>): void;
getRotation(): Vector3;
setRotation(rotation: Vector3): void;
getVelocity(): Vector3;
setVelocity(velocity: Vector3): void;
getAlpha(): IntRange<0, 256>;
setAlpha(alpha: IntRange<0, 256>): void;
getModel(): CModel;
getExists(): boolean;
getEntityType(): CEntityType;
getIsMissionEntity(): boolean;
setIsMissionEntity(value: boolean): void;
getVisible(): boolean;
setVisible(value: boolean): void;
freeze(value: boolean): void;
isFrozen(): boolean;
getClosestEntityOfType(model: CModel | number, radius?: number): Optional<CEntity>;
getNetworkId(): number;
delete(): void;
/**
* Converts the entity to a network entity
* @returns An instance to a CNetEntity
*/
toNet(): CNetEntity;
/**
* Checks if the object is equal to another object.
*/
equals(other: CEntity): boolean;
asString(): string;
/**
* @noSelf *
*/
static fromNet(netId: number): Result<CEntity>;
}
export class CNetEntity extends ByteGameObject {
private networkId: any;
constructor(networkId: number);
getNetId(): number;
getOwner(): number;
getFirstOwner(): number;
getAs<T extends NetworkeableClass<T>>(transformer: T): Result<InstanceType<T>>;
/**
* Checks if the object is equal to another object.
* @param other The object to compare to.
* @returns `true` if the objects are equal, `false` otherwise.
*/
equals(other: this): boolean;
/**
* @returns A string representation of the object.
*/
asString(): string;
}
export class CObject extends CEntity {
constructor(objectId: number);
isADoor(): boolean;
delete(): void;
getNetworkId(): number;
asString(): string;
/**
* @noSelf *
*/
static create(model: CModel, coords: Vector3, isNetwork: boolean, netMissionEntity: boolean, doorFlag: boolean): Result<CObject>;
/**
* @noSelf *
*/
static fromNet(netId: number): Result<CObject>;
}
export class CPed extends CEntity {
constructor(pedId: number);
setAccuracy(accuracy: IntRange<0, 101>): void;
getAccuracy(): IntRange<0, 101>;
setConfigFlag(flag: CPedConfigFlags, value: boolean): void;
getConfigFlag(flag: CPedConfigFlags): boolean;
getMaxHealth(): number;
resurrect(): void;
delete(): void;
getNetworkId(): number;
asString(): string;
/**
* @noSelf *
*/
static create(model: CModel, coords: Vector3, isNetwork: boolean, netMissionEntity: boolean): Result<CPed>;
/**
* @noSelf *
*/
static playerPed(): CPed;
/**
* @noSelf *
*/
static fromNet(netId: number): Result<CPed>;
}
export class CVehicle extends CEntity {
constructor(vehicleId: number);
delete(): void;
getNetworkId(): number;
asString(): string;
setPrimaryColor(color: RGB): void;
/**
* @noSelf *
*/
static create(model: CModel, coords: Vector3, heading: IntRange<0, 361>, isNetwork: boolean, netMissionEntity: boolean): Result<CVehicle>;
/**
* @noSelf *
*/
static fromNet(netId: number): Result<CVehicle>;
}
export class CDoor extends ByteGameObject {
private systemHash: any;
private doors: any;
private config: any;
constructor(doors: Array<DoorInitializer>, customSystemHash?: string, config?: DoorSystemConfig);
protected addDoor(data: DoorInitializer): void;
private configure: any;
getSystemHash(): string;
getDoors(): Array<DoorInitializer>;
getConfig(): DoorSystemConfig | undefined;
setState(state: DoorState): void;
getState(): DoorState;
destroy(): void;
/**
* @returns A string representation of the object.
*/
asString(): string;
}
export class Texture extends ByteGameObject {
handle: number;
name: string;
dictionary: TextureDictionary;
constructor(handle: number, name: string, dict: TextureDictionary);
getHandle(): number;
getName(): string;
getDictionary(): TextureDictionary;
getHeight(): number;
getWidth(): number;
commit(): void;
/**
* Sets the color of a pixel on the texture.
* `Texture.commit()` must be called after this to apply the changes.
* @see https://docs.fivem.net/natives/?_0xAB65ACEE
*/
setPixel(pixel: Pixel, color: RGBA): void;
setFromImage(image: ImageFilePath | Base64Image): boolean;
/**
* @returns A hash code for the object instance.
*/
hash(): number;
/**
* @returns A string representation of the object.
*/
asString(): string;
}
export class TextureDictionary extends ByteGameObject {
private name: any;
private handle: any;
private textures: any;
constructor(name: string);
getHandle(): number;
getName(): string;
addRuntimeTexture(txn: string, width: number, height: number): TextureDictionaryTuple;
addRuntimeTextureFromDui(txn: string, dui: DuiHandle): TextureDictionaryTuple;
/**
* @returns A hash code for the object instance.
*/
hash(): number;
/**
* @returns A string representation of the object.
*/
asString(): string;
}
export class RPCController {
/**
* @noSelf *
*/
private static instance: any;
private promises: any;
private procedures: any;
private constructor();
/**
* Calls a procedure on the server.
* @template Args An array containing the types of the arguments to pass to the server.
* @param procedure The name of the procedure to call.
* @param args The arguments to pass to the server.
* @returns A promise that resolves when the server responds.
*/
call<T extends Array<any> = any>(procedure: string, ...args: Array<any>): LuaMultiReturn<T>;
/**
* Registers a procedure that can be called from the server.
* @template Args An array containing the types of the data returned by the procedure to the server.
* @param procedure The name of the procedure to register.
* @param callback The callback function to call when the procedure is called.
*/
registerProcedure<T extends Array<any> = any>(procedure: string, callback: RPCCallback<T>): void;
/**
* Deletes a procedure handler from the client.
* @param procedure The name of the procedure to delete.
*/
deleteProcedure(procedure: string): void;
/**
* @noSelf *
*/
static getInstance(): RPCController;
}
export class Logger {
private module: any;
constructor(module?: string);
private log: any;
info(...args: Array<any>): void;
warn(...args: Array<any>): void;
error(...args: Array<any>): void;
debug(...args: Array<any>): void;
}
export class EnvManager {
private constructor();
static getServerClosed(): boolean;
static getDebug(): boolean;
static getProduction(): boolean;
}
export type ByteSharedExport = {
interfaces: {};
utils: {
uuid(): string;
parseVector2(coords: Coords2): Vector2;
parseVector3(coords: Coords3): Vector3;
parseVector4(coords: Coords4): Vector4;
arrayGroupBy<T, K extends string | number | symbol>(arr: Array<T>, key: (i: T) => K): Record<K, Array<T>>;
};
consts: {
HEAD_BLEND_TEXTURE_AMOUNT: 45;
OVERLAY_TEXTURE_AMOUNT: 45;
MAX_TRACE_LENGTH: 7;
};
XML: typeof XML;
classes: {
ByteGameObject: typeof ByteGameObject;
ConfigController: typeof ConfigController;
Item: ExportedClass<typeof Item>;
Translator: ExportedClass<typeof Translator>;
XMLSearchNode: ExportedClass<typeof XMLSearchNode>;
EventNameController: ExportedClass<typeof EventNameController>;
Debugger: ExportedClass<typeof Debugger>;
TypeChecker: ExportedClass<typeof TypeChecker>;
Optional: typeof Optional;
ExportedClass: typeof ExportedClass;
Result: {
Ok<T, E>(value: T): any;
EmptyOk<E>(): any;
Err<E>(error?: E): any;
};
Timestamp: ExportedClass<typeof Timestamp>;
zones: {
BoxZone: ExportedClass<typeof BoxZone>;
CircleZone: ExportedClass<typeof CircleZone>;
PolygonZone: ExportedClass<typeof PolygonZone>;
};
};
};
/**
* @noSelfInFile
*/
export type Class = new (...args: any) => any;
/**
* @noSelfInFile
*/
export interface IObjectifiable<T> {
toObject(): T;
}
/**
* @noSelfInFile
*/
export type SlotData = {
item?: string;
amount: number;
info?: SlotInfo;
};
export class Item {
private name: any;
private label: any;
private description: any;
private weight: any;
private unique: any;
constructor(name: string, label: string, description: string, weight: number, unique: boolean);
getName(): string;
getLabel(): string;
getDescription(): string;
getWeight(): number;
getUnique(): boolean;
asString(): string;
}
export type SlotInfo = {
displayStrings?: Record<string, string>;
[key: string]: any;
};
export type InventoryData = Array<SlotData>;
/**
* @noSelfInFile
*/
export type UUID = string;
export type PlayerData = ExcludeKey<DBPlayerData, "birthdate"> & {
birthdate: Timestamp;
};
export type PlayerJob = {
name: string;
grade: number;
};
export type PlayerGang = {
name: string;
grade: number;
};
export type PedData = {
pedModel: number;
components: Record<keyof typeof PedComponent, {
drawable: number;
texture: number;
}>;
faceFeatures: Record<keyof typeof FaceFeature, number>;
props: Record<keyof typeof PedProps, {
drawable: number;
texture: number;
}>;
headOverlays: Record<keyof typeof PedHeadOverlay, PedHeadOverlayData>;
headBlend: PedHeadBlendData;
hairColor: number;
highlightColor: number;
};
export class Optional<T = any | undefined> {
private value: any;
private _isSome: any;
private constructor();
/**
* Returns the value as the not nullable type.
* @returns The original value
*/
unwrap(): T;
/**
* @returns Where the wrapped value is null
*/
isSome(): boolean;
/**
* @noSelf *
*/
static Some<T_1>(value: T_1): Optional<T_1>;
/**
* @noSelf *
*/
static None<T_1>(): Optional<T_1>;
}
export enum PlayerGender {
MALE = 0,
FEMALE = 1,
UNKNOWN = 2,
}
export type PedHeadBlendData = {
shapeFirst: number;
shapeSecond: number;
shapeThird: number;
skinFirst: number;
skinSecond: number;
skinThird: number;
shapeMix: number;
skinMix: number;
thirdMix: number;
};
export enum PedComponent {
/**
* HEAD
*/
COMP_HEAD = 0,
/**
* MASKS
*/
COMP_BERD = 1,
/**
* HAIR
*/
COMP_HAIR = 2,
/**
* GLOVES
*/
COMP_UPPR = 3,
/**
* PANTS
*/
COMP_LOWR = 4,
/**
* BAGS & PARACHUTES
*/
COMP_HAND = 5,
/**
* SHOES
*/
COMP_FEET = 6,
/**
* ACCESSORIES
*/
COMP_TEEF = 7,
/**
* T-SHIRTS
*/
COMP_ACCS = 8,
/**
* BODY ARMOR
*/
COMP_TASK = 9,
/**
* DECALS
*/
COMP_DECL = 10,
/**
* JACKETS
*/
COMP_JBIB = 11,
}
export enum FaceFeature {
NOSE_WIDTH = 0,
NOSE_PEAK = 1,
NOSE_LENGTH = 2,
NOSE_BONE_CURVE = 3,
NOSE_TIP = 4,
NOSE_BONE_TWIST = 5,
EYEBROW_HEIGHT = 6,
EYEBROW_DEPTH = 7,
CHEEK_HEIGHT = 8,
CHEEK_DEPTH = 9,
CHEEK_WIDTH = 10,
EYE_OPENING = 11,
LIP_THICKNESS = 12,
JAW_WIDTH = 13,
JAW_ROUNDNESS = 14,
CHIN_HEIGHT = 15,
CHIN_LENGTH = 16,
CHIN_ROUNDNESS = 17,
CHIN_HOLE = 18,
NECK_THICKNESS = 19,
}
export enum PedProps {
/**
* "p_head"
*/
ANCHOR_HEAD = 0,
/**
* "p_eyes"
*/
ANCHOR_EYES = 1,
/**
* "p_ears"
*/
ANCHOR_EARS = 2,
/**
* "p_mouth"
*/
ANCHOR_MOUTH = 3,
/**
* "p_lhand"
*/
ANCHOR_LEFT_HAND = 4,
/**
* "p_rhand"
*/
ANCHOR_RIGHT_HAND = 5,
/**
* "p_lwrist"
*/
ANCHOR_LEFT_WRIST = 6,
/**
* "p_rwrist"
*/
ANCHOR_RIGHT_WRIST = 7,
/**
* "p_lhip"
*/
ANCHOR_HIP = 8,
/**
* "p_lfoot"
*/
ANCHOR_LEFT_FOOT = 9,
/**
* "p_rfoot"
*/
ANCHOR_RIGHT_FOOT = 10,
/**
* "ph_lhand"
*/
ANCHOR_PH_L_HAND = 11,
/**
* "ph_rhand"
*/
ANCHOR_PH_R_HAND = 12,
}
export enum PedHeadOverlay {
BLEMISHES = 0,
FACIAL_HAIR = 1,
EYEBROWS = 2,
AGEING = 3,
MAKEUP = 4,
BLUSH = 5,
COMPLEXION = 6,
SUN_DAMAGE = 7,
LIPSTICK = 8,
MOLES = 9,
CHEST_HAIR = 10,
BODY_BLEMISHES = 11,
ADD_BODY_BLEMISHES = 12,
}
export type PedHeadOverlayData = {
overlayValue: number;
firstColour: number;
secondColour: number;
overlayOpacity: number;
};
/**
* A result type that can be either an error or a value.
* Tries to take the best of Go's and Rust's error handling.
*/
export type Result<T = Null, E = Null> = LuaMultiReturn<[error: true, value: E]> | LuaMultiReturn<[error: false, value: T]>;
export type PedMaxValues = {
components: Record<keyof typeof PedComponent, Record<number, number>>;
props: Record<keyof typeof PedProps, Record<number, number>>;
headBlendHeads: {
male: Array<number>;
female: Array<number>;
};
headBlendHeadsTextures: 45;
overlays: Record<keyof typeof PedHeadOverlay, number>;
overlaysTextures: 45;
faceFeatures: Record<keyof typeof FaceFeature, {
min: number;
max: number;
}>;
};
export class ByteGameObject {
constructor();
/**
* Clones the object.
*/
clone(): this;
/**
* Checks if the object is equal to another object.
* @param other The object to compare to.
* @returns `true` if the objects are equal, `false` otherwise.
*/
equals(other: this): boolean;
/**
* @returns A hash code for the object instance.
*/
hash(): number;
/**
* @returns `-1` if `this` is less than `other`, `0` if they are equal, `1` if `this` is greater than `other`.
*/
compare(other: this): -1 | 0 | 1;
/**
* @returns A string representation of the object.
*/
asString(): string;
/**
* @returns A JSON string representation of the object.
*/
asJSON(): string;
}
export interface INetworkeable {
toNet(): CNetEntity;
}
/**
* Returns a range of numbers from F to T, excluding T (`[F, T)`).
*/
export type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
export enum CEntityType {
Invalid = 0,
Ped = 1,
Vehicle = 2,
Object = 3,
}
/**
* This type represents a class that can be constructed from a network id.
* For this to work the **class prototype** must have a static method called `fromNet` that receives a network id and returns an instance of the class.
*/
export type NetworkeableClass<T extends Class___1> = Class___1 & NetMethods<T>;
/**
* @noSelfInFile
*/
export const enum CPedConfigFlags {
CreatedByFactory = 0,
CanBeShotInVehicle = 1,
NoCriticalHits = 2,
DrownsInWater = 3,
DrownsInSinkingVehicle = 4,
DiesInstantlyWhenSwimming = 5,
HasBulletProofVest = 6,
UpperBodyDamageAnimsOnly = 7,
NeverFallOffSkis = 8,
NeverEverTargetThisPed = 9,
ThisPedIsATargetPriority = 10,
TargettableWithNoLos = 11,
DoesntListenToPlayerGroupCommands = 12,
NeverLeavesGroup = 13,
DoesntDropWeaponsWhenDead = 14,
SetDelayedWeaponAsCurrent = 15,
KeepTasksAfterCleanUp = 16,
BlockNonTemporaryEvents = 17,
HasAScriptBrain = 18,
WaitingForScriptBrainToLoad = 19,
AllowMedicsToReviveMe = 20,
MoneyHasBeenGivenByScript = 21,
NotAllowedToCrouch = 22,
DeathPickupsPersist = 23,
IgnoreSeenMelee = 24,
ForceDieIfInjured = 25,
DontDragMeOutCar = 26,
StayInCarOnJack = 27,
ForceDieInCar = 28,
GetOutUndriveableVehicle = 29,
WillRemainOnBoatAfterMissionEnds = 30,
DontStoreAsPersistent = 31,
WillFlyThroughWindscreen = 32,
DieWhenRagdoll = 33,
HasHelmet = 34,
UseHelmet = 35,
DontTakeOffHelmet = 36,
HideInCutscene = 37,
PedIsEnemyToPlayer = 38,
DisableEvasiveDives = 39,
PedGeneratesDeadBodyEvents = 40,
DontAttackPlayerWithoutWantedLevel = 41,
DontInfluenceWantedLevel = 42,
DisablePlayerLockon = 43,
DisableLockonToRandomPeds = 44,
AllowLockonToFriendlyPlayers = 45,
_0xDB115BFA = 46,
PedBeingDeleted = 47,
BlockWeaponSwitching = 48,
BlockGroupPedAimedAtResponse = 49,
WillFollowLeaderAnyMeans = 50,
BlippedByScript = 51,
DrawRadarVisualField = 52,
StopWeaponFiringOnImpact = 53,
DissableAutoFallOffTests = 54,
SteerAroundDeadBodies = 55,
ConstrainToNavMesh = 56,
SyncingAnimatedProps = 57,
IsFiring = 58,
WasFiring = 59,
IsStanding = 60,
WasStanding = 61,
InVehicle = 62,
OnMount = 63,
AttachedToVehicle = 64,
IsSwimming = 65,
WasSwimming = 66,
IsSkiing = 67,
IsSitting = 68,
KilledByStealth = 69,
KilledByTakedown = 70,
Knockedout = 71,
ClearRadarBlipOnDeath = 72,
JustGotOffTrain = 73,
JustGotOnTrain = 74,
UsingCoverPoint = 75,
IsInTheAir = 76,
KnockedUpIntoAir = 77,
IsAimingGun = 78,
HasJustLeftCar = 79,
TargetWhenInjuredAllowed = 80,
CurrLeftFootCollNM = 81,
PrevLeftFootCollNM = 82,
CurrRightFootCollNM = 83,
PrevRightFootCollNM = 84,
HasBeenBumpedInCar = 85,
InWaterTaskQuitToClimbLadder = 86,
NMTwoHandedWeaponBothHandsConstrained = 87,
CreatedBloodPoolTimer = 88,
DontActivateRagdollFromAnyPedImpact = 89,
GroupPedFailedToEnterCover = 90,
AlreadyChattedOnPhone = 91,
AlreadyReactedToPedOnRoof = 92,
ForcePedLoadCover = 93,
BlockCoweringInCover = 94,
BlockPeekingInCover = 95,
JustLeftCarNotCheckedForDoors = 96,
VaultFromCover = 97,
AutoConversationLookAts = 98,
UsingCrouchedPedCapsule = 99,
HasDeadPedBeenReported = 100,
ForcedAim = 101,
SteersAroundPeds = 102,
SteersAroundObjects = 103,
OpenDoorArmIK = 104,
ForceReload = 105,
DontActivateRagdollFromVehicleImpact = 106,
DontActivateRagdollFromBulletImpact = 107,
DontActivateRagdollFromExplosions = 108,
DontActivateRagdollFromFire = 109,
DontActivateRagdollFromElectrocution = 110,
IsBeingDraggedToSafety = 111,
HasBeenDraggedToSafety = 112,
KeepWeaponHolsteredUnlessFired = 113,
ForceScriptControlledKnockout = 114,
FallOutOfVehicleWhenKilled = 115,
GetOutBurningVehicle = 116,
BumpedByPlayer = 117,
RunFromFiresAndExplosions = 118,
TreatAsPlayerDuringTargeting = 119,
IsHandCuffed = 120,
IsAnkleCuffed = 121,
DisableMelee = 122,
DisableUnarmedDrivebys = 123,
JustGetsPulledOutWhenElectrocuted = 124,
UNUSED_REPLACE_ME = 125,
WillNotHotwireLawEnforcementVehicle = 126,
WillCommandeerRatherThanJack = 127,
CanBeAgitated = 128,
ForcePedToFaceLeftInCover = 129,
ForcePedToFaceRightInCover = 130,
BlockPedFromTurningInCover = 131,
KeepRelationshipGroupAfterCleanUp = 132,
ForcePedToBeDragged = 133,
PreventPedFromReactingToBeingJacked = 134,
IsScuba = 135,
WillArrestRatherThanJack = 136,
RemoveDeadExtraFarAway = 137,
RidingTrain = 138,
ArrestResult = 139,
CanAttackFriendly = 140,
WillJackAnyPlayer = 141,
BumpedByPlayerVehicle = 142,
DodgedPlayerVehicle = 143,
WillJackWantedPlayersRatherThanStealCar = 144,
NoCopWantedAggro = 145,
DisableLadderClimbing = 146,
StairsDetected = 147,
SlopeDetected = 148,
HelmetHasBeenShot = 149,
CowerInsteadOfFlee = 150,
CanActivateRagdollWhenVehicleUpsideDown = 151,
AlwaysRespondToCriesForHelp = 152,
DisableBloodPoolCreation = 153,
ShouldFixIfNoCollision = 154,
CanPerformArrest = 155,
CanPerformUncuff = 156,
CanBeArrested = 157,
MoverConstrictedByOpposingCollisions = 158,
PlayerPreferFrontSeatMP = 159,
DontActivateRagdollFromImpactObject = 160,
DontActivateRagdollFromMelee = 161,
DontActivateRagdollFromWaterJet = 162,
DontActivateRagdollFromDrowning = 163,
DontActivateRagdollFromFalling = 164,
DontActivateRagdollFromRubberBullet = 165,
IsInjured = 166,
DontEnterVehiclesInPlayersGroup = 167,
SwimmingTasksRunning = 168,
PreventAllMeleeTaunts = 169,
ForceDirectEntry = 170,
AlwaysSeeApproachingVehicles = 171,
CanDiveAwayFromApproachingVehicles = 172,
AllowPlayerToInterruptVehicleEntryExit = 173,
OnlyAttackLawIfPlayerIsWanted = 174,
PlayerInContactWithKinematicPed = 175,
PlayerInContactWithSomethingOtherThanKinematicPed = 176,
PedsJackingMeDontGetIn = 177,
AdditionalRappellingPed = 178,
PedIgnoresAnimInterruptEvents = 179,
IsInCustody = 180,
ForceStandardBumpReactionThresholds = 181,
LawWillOnlyAttackIfPlayerIsWanted = 182,
IsAgitated = 183,
PreventAutoShuffleToDriversSeat = 184,
UseKinematicModeWhenStationary = 185,
EnableWeaponBlocking = 186,
HasHurtStarted = 187,
DisableHurt = 188,
PlayerIsWeird = 189,
PedHadPhoneConversation = 190,
BeganCrossingRoad = 191,
WarpIntoLeadersVehicle = 192,
DoNothingWhenOnFootByDefault = 193,
UsingScenario = 194,
VisibleOnScreen = 195,
DontCollideWithKinematic = 196,
ActivateOnSwitchFromLowPhysicsLod = 197,
DontActivateRagdollOnPedCollisionWhenDead = 198,
DontActivateRagdollOnVehicleCollisionWhenDead = 199,
HasBeenInArmedCombat = 200,
UseDiminishingAmmoRate = 201,
Avoidance_Ignore_All = 202,
Avoidance_Ignored_by_All = 203,
Avoidance_Ignore_Group1 = 204,
Avoidance_Member_of_Group1 = 205,
ForcedToUseSpecificGroupSeatIndex = 206,
LowPhysicsLodMayPlaceOnNavMesh = 207,
DisableExplosionReactions = 208,
DodgedPlayer = 209,
WaitingForPlayerControlInterrupt = 210,
ForcedToStayInCover = 211,
GeneratesSoundEvents = 212,
ListensToSoundEvents = 213,
AllowToBeTargetedInAVehicle = 214,
WaitForDirectEntryPointToBeFreeWhenExiting = 215,
OnlyRequireOnePressToExitVehicle = 216,
ForceExitToSkyDive = 217,
SteersAroundVehicles = 218,
AllowPedInVehiclesOverrideTaskFlags = 219,
DontEnterLeadersVehicle = 220,
DisableExitToSkyDive = 221,
ScriptHasDisabledCollision = 222,
UseAmbientModelScaling = 223,
DontWatchFirstOnNextHurryAway = 224,
DisablePotentialToBeWalkedIntoResponse = 225,
DisablePedAvoidance = 226,
ForceRagdollUponDeath = 227,
CanLosePropsOnDamage = 228,
DisablePanicInVehicle = 229,
AllowedToDetachTrailer = 230,
HasShotBeenReactedToFromFront = 231,
HasShotBeenReactedToFromBack = 232,
HasShotBeenReactedToFromLeft = 233,
HasShotBeenReactedToFromRight = 234,
AllowBlockDeadPedRagdollActivation = 235,
IsHoldingProp = 236,
BlocksPathingWhenDead = 237,
ForcePlayNormalScenarioExitOnNextScriptCommand = 238,
ForcePlayImmediateScenarioExitOnNextScriptCommand = 239,
ForceSkinCharacterCloth = 240,
LeaveEngineOnWhenExitingVehicles = 241,
PhoneDisableTextingAnimations = 242,
PhoneDisableTalkingAnimations = 243,
PhoneDisableCameraAnimations = 244,
DisableBlindFiringInShotReactions = 245,
AllowNearbyCoverUsage = 246,
InStrafeTransition = 247,
CanPlayInCarIdles = 248,
CanAttackNonWantedPlayerAsLaw = 249,
WillTakeDamageWhenVehicleCrashes = 250,
AICanDrivePlayerAsRearPassenger = 251,
PlayerCanJackFriendlyPlayers = 252,
OnStairs = 253,
SimulatingAiming = 254,
AIDriverAllowFriendlyPassengerSeatEntry = 255,
ParentCarIsBeingRemoved = 256,
AllowMissionPedToUseInjuredMovement = 257,
CanLoseHelmetOnDamage = 258,
NeverDoScenarioExitProbeChecks = 259,
SuppressLowLODRagdollSwitchWhenCorpseSettles = 260,
PreventUsingLowerPrioritySeats = 261,
JustLeftVehicleNeedsReset = 262,
TeleportIfCantReachPlayer = 263,
PedsInVehiclePositionNeedsReset = 264,
PedsFullyInSeat = 265,
AllowPlayerLockOnIfFriendly = 266,
UseCameraHeadingForDesiredDirectionLockOnTest = 267,
TeleportToLeaderVehicle = 268,
Avoidance_Ignore_WeirdPedBuffer = 269,
OnStairSlope = 270,
HasPlayedNMGetup = 271,
DontBlipCop = 272,
SpawnedAtExtendedRangeScenario = 273,
WalkAlongsideLeaderWhenClose = 274,
KillWhenTrapped = 275,
EdgeDetected = 276,
AlwaysWakeUpPhysicsOfIntersectedPeds = 277,
EquippedAmbientLoadOutWeapon = 278,
AvoidTearGas = 279,
StoppedSpeechUponFreezing = 280,
DisableGoToWritheWhenInjured = 281,
OnlyUseForcedSeatWhenEnteringHeliInGroup = 282,
ThrownFromVehicleDueToExhaustion = 283,
UpdateEnclosedSearchRegion = 284,
DisableWeirdPedEvents = 285,
ShouldChargeNow = 286,
RagdollingOnBoat = 287,
HasBrandishedWeapon = 288,
AllowMinorReactionsAsMissionPed = 289,
BlockDeadBodyShockingEventsWhenDead = 290,
PedHasBeenSeen = 291,
PedIsInReusePool = 292,
PedWasReused = 293,
DisableShockingEvents = 294,
MovedUsingLowLodPhysicsSinceLastActive = 295,
NeverReactToPedOnRoof = 296,
ForcePlayFleeScenarioExitOnNextScriptCommand = 297,
JustBumpedIntoVehicle = 298,
DisableShockingDrivingOnPavementEvents = 299,
ShouldThrowSmokeNow = 300,
DisablePedConstraints = 301,
ForceInitialPeekInCover = 302,
CreatedByDispatch = 303,
PointGunLeftHandSupporting = 304,
DisableJumpingFromVehiclesAfterLeader = 305,
DontActivateRagdollFromPlayerPedImpact = 306,
DontActivateRagdollFromAiRagdollImpact = 307,
DontActivateRagdollFromPlayerRagdollImpact = 308,
DisableQuadrupedSpring = 309,
IsInCluster = 310,
ShoutToGroupOnPlayerMelee = 311,
IgnoredByAutoOpenDoors = 312,
PreferInjuredGetup = 313,
ForceIgnoreMeleeActiveCombatant = 314,
CheckLoSForSoundEvents = 315,
JackedAbandonedCar = 316,
CanSayFollowedByPlayerAudio = 317,
ActivateRagdollFromMinorPlayerContact = 318,
HasPortablePickupAttached = 319,
ForcePoseCharacterCloth = 320,
HasClothCollisionBounds = 321,
HasHighHeels = 322,
TreatAsAmbientPedForDriverLockOn = 323,
DontBehaveLikeLaw = 324,
SpawnedAtScenario = 325,
DisablePoliceInvestigatingBody = 326,
DisableWritheShootFromGround = 327,
LowerPriorityOfWarpSeats = 328,
DisableTalkTo = 329,
DontBlip = 330,
IsSwitchingWeapon = 331,
IgnoreLegIkRestrictions = 332,
ScriptForceNoTimesliceIntelligenceUpdate = 333,
JackedOutOfMyVehicle = 334,
WentIntoCombatAfterBeingJacked = 335,
DontActivateRagdollForVehicleGrab = 336,
ForcePackageCharacterCloth = 337,
DontRemoveWithValidOrder = 338,
AllowTaskDoNothingTimeslicing = 339,
ForcedToStayInCoverDueToPlayerSwitch = 340,
ForceProneCharacterCloth = 341,
NotAllowedToJackAnyPlayers = 342,
InToStrafeTransition = 343,
KilledByStandardMelee = 344,
AlwaysLeaveTrainUponArrival = 345,
ForcePlayDirectedNormalScenarioExitOnNextScriptCommand = 346,
OnlyWritheFromWeaponDamage = 347,
UseSloMoBloodVfx = 348,
EquipJetpack = 349,
PreventDraggedOutOfCarThreatResponse = 350,
ScriptHasCompletelyDisabledCollision = 351,
NeverDoScenarioNavChecks = 352,
ForceSynchronousScenarioExitChecking = 353,
ThrowingGrenadeWhileAiming = 354,
HeadbobToRadioEnabled = 355,
ForceDeepSurfaceCheck = 356,
DisableDeepSurfaceAnims = 357,
DontBlipNotSynced = 358,
IsDuckingInVehicle = 359,
PreventAutoShuffleToTurretSeat = 360,
DisableEventInteriorStatusCheck = 361,
HasReserveParachute = 362,
UseReserveParachute = 363,
TreatDislikeAsHateWhenInCombat = 364,
OnlyUpdateTargetWantedIfSeen = 365,
AllowAutoShuffleToDriversSeat = 366,
DontActivateRagdollFromSmokeGrenade = 367,
LinkMBRToOwnerOnChain = 368,
AmbientFriendBumpedByPlayer = 369,
AmbientFriendBumpedByPlayerVehicle = 370,
InFPSUnholsterTransition = 371,
PreventReactingToSilencedCloneBullets = 372,
DisableInjuredCryForHelpEvents = 373,
NeverLeaveTrain = 374,
DontDropJetpackOnDeath = 375,
UseFPSUnholsterTransitionDuringCombatRoll = 376,
ExitingFPSCombatRoll = 377,
ScriptHasControlOfPlayer = 378,
PlayFPSIdleFidgetsForProjectile = 379,
DisableAutoEquipHelmetsInBikes = 380,
DisableAutoEquipHelmetsInAircraft = 381,
WasPlayingFPSGetup = 382,
WasPlayingFPSMeleeActionResult = 383,
PreferNoPriorityRemoval = 384,
FPSFidgetsAbortedOnFire = 385,
ForceFPSIKWithUpperBodyAnim = 386,
SwitchingCharactersInFirstPerson = 387,
IsClimbingLadder = 388,
HasBareFeet = 389,
UNUSED_REPLACE_ME_2 = 390,
GoOnWithoutVehicleIfItIsUnableToGetBackToRoad = 391,
BlockDroppingHealthSnacksOnDeath = 392,
ResetLastVehicleOnVehicleExit = 393,
ForceThreatResponseToNonFriendToFriendMeleeActions = 394,
DontRespondToRandomPedsDamage = 395,
AllowContinuousThreatResponseWantedLevelUpdates = 396,
KeepTargetLossResponseOnCleanup = 397,
PlayersDontDragMeOutOfCar = 398,
BroadcastRepondedToThreatWhenGoingToPointShooting = 399,
IgnorePedTypeForIsFriendlyWith = 400,
TreatNonFriendlyAsHateWhenInCombat = 401,
DontLeaveVehicleIfLeaderNotInVehicle = 402,
ChangeFromPermanentToAmbientPopTypeOnMigration = 403,
AllowMeleeReactionIfMeleeProofIsOn = 404,
UsingLowriderLeans = 405,
UsingAlternateLowriderLeans = 406,
UseNormalExplosionDamageWhenBlownUpInVehicle = 407,
DisableHomingMissileLockForVehiclePedInside = 408,
DisableTakeOffScubaGear = 409,
IgnoreMeleeFistWeaponDamageMult = 410,
LawPedsCanFleeFromNonWantedPlayer = 411,
ForceBlipSecurityPedsIfPlayerIsWanted = 412,
IsHolsteringWeapon = 413,
UseGoToPointForScenarioNavigation = 414,
DontClearLocalPassengersWantedLevel = 415,
BlockAutoSwapOnWeaponPickups = 416,
ThisPedIsATargetPriorityForAI = 417,
IsSwitchingHelmetVisor = 418,
ForceHelmetVisorSwitch = 419,
IsPerformingVehicleMelee = 420,
UseOverrideFootstepPtFx = 421,
DisableVehicleCombat = 422,
TreatAsFriendlyForTargetingAndDamage = 423,
AllowBikeAlternateAnimations = 424,
TreatAsFriendlyForTargetingAndDamageNonSynced = 425,
UseLockpickVehicleEntryAnimations = 426,
IgnoreInteriorCheckForSprinting = 427,
SwatHeliSpawnWithinLastSpottedLocation = 428,
DisableStartEngine = 429,
IgnoreBeingOnFire = 430,
DisableTurretOrRearSeatPreference = 431,
DisableWantedHelicopterSpawning = 432,
UseTargetPerceptionForCreatingAimedAtEvents = 433,
DisableHomingMissileLockon = 434,
ForceIgnoreMaxMeleeActiveSupportCombatants = 435,
StayInDefensiveAreaWhenInVehicle = 436,
DontShoutTargetPosition = 437,
DisableHelmetArmor = 438,
CreatedByConcealedPlayer = 439,
PermanentlyDisablePotentialToBeWalkedIntoResponse = 440,
PreventVehExitDueToInvalidWeapon = 441,
IgnoreNetSessionFriendlyFireCheckForAllowDamage = 442,
DontLeaveCombatIfTargetPlayerIsAttackedByPolice = 443,
CheckLockedBeforeWarp = 444,
DontShuffleInVehicleToMakeRoom = 445,
GiveWeaponOnGetup = 446,
DontHitVehicleWithProjectiles = 447,
DisableForcedEntryForOpenVehiclesFromTryLockedDoor = 448,
FiresDummyRockets = 449,
PedIsArresting = 450,
IsDecoyPed = 451,
HasEstablishedDecoy = 452,
BlockDispatchedHelicoptersFromLanding = 453,
DontCryForHelpOnStun = 454,
HitByTranqWeapon = 455,
CanBeIncapacitated = 456,
ForcedAimFromArrest = 457,
DontChangeTargetFromMelee = 458,
_0x4376ABF2 = 459,
RagdollFloatsIndefinitely = 460,
BlockElectricWeaponDamage = 461,
_0x262A3B8E = 462,
_0x1AA79A25 = 463,
}
export type RGB = [red: IntRange<0, 256>, green: IntRange<0, 256>, blue: IntRange<0, 256>];
export type DoorInitializer = {
modelHash: number;
coords: Vector3;
local?: boolean;
};
export type DoorSystemConfig = {
/**
* Refered to as `ajar` in the [natives docs](https://docs.fivem.net/natives/?_0xB6E6FBA95C7324AC).
* Value goes from `-1.0` to `1.0`.
*/
openRatio?: number;
holdOpen?: boolean;
removeSpring?: boolean;
automatic?: {
distance: number;
rate?: number;
};
};
export enum DoorState {
UNLOCKED = 0,
LOCKED = 1,
DOORSTATE_FORCE_LOCKED_UNTIL_OUT_OF_AREA = 2,
DOORSTATE_FORCE_UNLOCKED_THIS_FRAME = 3,
DOORSTATE_FORCE_LOCKED_THIS_FRAME = 4,
DOORSTATE_FORCE_OPEN_THIS_FRAME = 5,
DOORSTATE_FORCE_CLOSED_THIS_FRAME = 6,
}
export type Pixel = [x: number, y: number];
export type RGBA = [red: IntRange<0, 256>, green: IntRange<0, 256>, blue: IntRange<0, 256>, alpha: IntRange<0, 256>];
export type ImageFilePath = string;
export type Base64Image = string;
export type TextureDictionaryTuple = [TextureIndex, Texture];
export type DuiHandle = string;
/**
* @noSelfInFile
*/
export type RPCCallback<T extends Array<any> = any> = (this: void, cb: (this: void, ...args: T) => void, ...args: Array<any>) => any;
/**
* @noSelfInFile
*/
export type Coords2 = {
x: number;
y: number;
};
export type Coords3 = {
x: number;
y: number;
z: number;
};
export type Coords4 = {
x: number;
y: number;
z: number;
w: number;
};
export class ConfigController {
/**
* @noSelf *
*/
private static instance: any;
private items: any;
private inventorySlots: any;
private maxPlayerWeight: any;
private locale: any;
private constructor();
getItems(): Record<string, Item>;
getInventorySlots(): number;
getMaxPlayerWeight(): number;
getLocale(): string;
/**
* @noSelf *
*/
static getInstance(): ConfigController;
}
export class Translator {
private translations: any;
private lang: any;
constructor(lang: string, xml: XMLNode);
get(key: string): string;
}
export class XMLSearchNode {
private node: any;
constructor(node: XMLChild);
/**
* Searches for all children nodes that match the search parameters
* @param params The search parameters
* @returns An array of `XMLSearchNode` objects that match the search parameters
*/
search(params: XMLSearchParams): Array<XMLSearchNode>;
/**
* Returns the node as a `XMLNode`. Useful for getting the attributes of the node.
* @returns The node as a `XMLNode`
*/
asNode(): XMLNode;
/**
* @returns The inner text of the node (e.g. `<entry>text</entry> => "text"`)
*/
asText(): string;
}
export class EventNameController {
private events: any;
private logger: any;
constructor(xmlNode: XMLSearchNode);
get(key: string): EventName;
}
export class Debugger {
private moduleName: any;
private canContinue: any;
constructor(moduleName: string);
/**
* Stops the execution of the code until the continue event is triggered.
* @param id Unique identifier for the breakpoint
* @param args Arguments to be displayed when the breakpoint is hit
*/
breakpoint(id: string, args?: any): void;
/**
* Similar to a breakpoint, but it doesn't stop the execution of the code, just logs the information.
* @param id Unique identifier for the watchpoint
* @param args Arguments to be displayed when the watchpoint is hit
*/
watchpoint(id: string, args?: any): void;
}
export class TypeChecker {
private prototype: any;
constructor(prototype: CheckedType);
check(object: any): boolean;
/**
* @noSelf *
*/
private static checkR: any;
/**
* @noSelf *
*/
private static isObjectAnArray: any;
}
export class Timestamp {
private timestamp: any;
constructor(timestamp: number);
private static secondsInAMinute: any;
/**
* @noSelf *
*/
private static secondsInAnHour: any;
/**
* @noSelf *
*/
private static secondsInADay: any;
/**
* @noSelf *
*/
private static daysPerMonth: any;
/**
* @noSelf *
*/
static isLeapYear(year: number): boolean;
getTimestamp(): number;
getSecond(): number;
getMinute(): number;
getHour(): number;
getYear(): number;
getMonth(): number;
getDay(): number;
}
export class BoxZone extends ByteGameObject implements IZone {
private id: any;
private center: any;
private width: any;
private height: any;
constructor(center: Vector2, width: number, height: number);
getId(): string;
getCenter(): Vector2;
isPointInside(point: Vector2): boolean;
/**
* @returns A string representation of the object.
*/
asString(): string;
}
export class CircleZone extends ByteGameObject implements IZone {
private id: any;
private center: any;
private radius: any;
constructor(center: Vector2, radius: number);
getId(): string;
getCenter(): Vector2;
isPointInside(point: Vector2): boolean;
/**
* @returns A string representation of the object.
*/
asString(): string;
}
export class PolygonZone extends ByteGameObject implements IZone {
private id: any;
private vertices: any;
private readonly center: any;
constructor(vertices: Array<Vector2>);
getId(): string;
getCenter(): Vector2;
isPointInside(point: Vector2): boolean;
/**
* @returns A string representation of the object.
*/
asString(): string;
}
export type ExcludeKey<T, K> = Pick<T, Exclude<keyof T, K>>;
export type DBPlayerData = {
firstname: string;
lastname: string;
/**
* Unix timestamp
*/
birthdate: number;
gender: PlayerGender;
nationality: string;
};
/**
* @noSelfInFile
*/
export type Null = null | undefined;
/**
* @noSelfInFile
*/
export type Enumerate<N extends number, Acc extends Array<number> = []> = Acc["length"] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc["length"]]>;
export type Class___1 = new (...args: any) => any;
export type NetMethods<T extends Class___1> = {
fromNet(netId: number): Result<InstanceType<T>>;
};
export type TextureIndex = number;
/**
* The search parameters for the XML search
* @param tag The tag to search for (e.g. "entry" => `<entry>...</entry>`)
* @param attrs The attributes to search for. If not provided, it will search for all tags with the given tag.
*/
export type XMLSearchParams = {
tag: string;
attrs?: {
key: string;
value: string;
};
};
export type EventName = string;
export type CheckedType = SimpleCheckedType | ComplexCheckedType;
export interface IZone {
getId(): UUID;
getCenter(): Vector2;
isPointInside(point: Vector2): boolean;
}
/**
* @noSelfInFile
*/
export type SimpleCheckedType = "string" | "string?" | "string[]" | "string[]?" | "number" | "number?" | "number[]" | "number[]?" | "boolean" | "boolean?" | "boolean[]" | "boolean[]?" | "null" | "null[]" | "null[]?" | "undefined" | "undefined[]" | "undefined[]?";
export interface ComplexCheckedType {
[key: string]: SimpleCheckedType | ComplexCheckedType;
}
}