import { PlayerState, PlayerStateInput } from "./PlayerState"; import { PlayerMatchStats, PlayerMatchStatsInput } from "./PlayerMatchStats"; import { WeaponsCollection, WeaponsCollectionInput } from "../WeaponsCollection"; import { ModelBase } from "../ModelBase"; import { Weapon } from "../Weapon"; import { Vector3D } from "../helpers/Vector3D"; import { Activity, Team } from "../../constants/enums"; import { STEAMID64, UNKNOWN } from "../../constants/types"; export interface PlayerInput { steamid?: `${number}`; name?: string; xpoverload?: number; clan?: string; team?: string; observer_slot?: number; activity?: string; spectarget?: string; position?: string; forward?: string; state?: PlayerStateInput; match_stats?: PlayerMatchStatsInput; weapons?: WeaponsCollectionInput; } /** * Represents the current player. */ export declare class Player extends ModelBase { readonly steamid: STEAMID64 | UNKNOWN; readonly name: string; readonly clan: string; readonly xpOverloadLevel: number | null; readonly team: Team; /** * The player's observer slot. The keybind to spectate this player is observerSlot + 1. */ readonly observerSlot: number | null; /** * The player's spectated target. The steamid of the player being spectated. Can result in null if GSI is not subscribed to the correct data. */ readonly specTarget: string | null; readonly activity: Activity; readonly state: PlayerState; readonly matchStats: PlayerMatchStats; readonly weapons: WeaponsCollection; readonly activeWeapon: Weapon | null; readonly position: Vector3D; readonly forwardDirection: Vector3D; constructor(data?: PlayerInput); /** * Returns a specific weapon by name. */ getWeaponByName(name: string): Weapon; /** * Does the player have grenades? */ hasGrenades(): boolean; /** * Does the player have C4? */ hasC4(): boolean; toSerializableObject(): PlayerInput; }