Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents an in-game player.

Hierarchy

Index

Constructors

constructor

Properties

Protected _demo

_demo: DemoFile

classId

classId: number

Server class ID.

clientSlot

clientSlot: number

deleting

deleting: boolean = false

Entity is scheduled for removal this tick.

index

index: number

Entity index.

props

props: CCSPlayer

serialNum

serialNum: number

Serial number.

Accessors

account

  • get account(): number

allSpotted

allSpotters

armor

  • get armor(): number

assists

  • get assists(): number

cashSpendThisRound

  • get cashSpendThisRound(): number

cashSpendTotal

  • get cashSpendTotal(): number

clanTag

  • get clanTag(): string

currentEquipmentValue

  • get currentEquipmentValue(): number

deaths

  • get deaths(): number

eyeAngles

  • get eyeAngles(): object

flashDuration

  • get flashDuration(): number

freezeTimeEndEquipmentValue

  • get freezeTimeEndEquipmentValue(): number

handle

  • get handle(): number

hasC4

  • get hasC4(): boolean

hasDefuser

  • get hasDefuser(): boolean

hasHelmet

  • get hasHelmet(): boolean

health

  • get health(): number

isAlive

  • get isAlive(): boolean

isDefusing

  • get isDefusing(): boolean

isFakePlayer

  • get isFakePlayer(): boolean

isHltv

  • get isHltv(): boolean

isInBombZone

  • get isInBombZone(): boolean

isInBuyZone

  • get isInBuyZone(): boolean

isScoped

  • get isScoped(): boolean

isSpotted

  • get isSpotted(): boolean

isWalking

  • get isWalking(): boolean

kills

  • get kills(): number

lifeState

matchStats

modelName

  • get modelName(): string | null

moveParent

mvps

  • get mvps(): number

name

  • get name(): string

owner

placeName

  • get placeName(): string

position

roundStartEquipmentValue

  • get roundStartEquipmentValue(): number

score

  • get score(): number

serverClass

speed

  • get speed(): number

steam64Id

  • get steam64Id(): string

steamId

  • get steamId(): string

team

  • get team(): Team | null

teamNumber

  • get teamNumber(): number

userId

  • get userId(): number

userInfo

velocity

weapon

weapons

Methods

getIndexedProps

  • getIndexedProps<TableName, TableKeys, ArrayType>(tableName: TableName): ArrayType
  • Interpret an array-like data table (e.g., m_iAmmo) as an array

    Type parameters

    • TableName: keyof CCSPlayer

    • TableKeys: keyof Props[TableName]

    • ArrayType: "000" extends TableKeys ? Props[TableName][TableKeys][] : undefined

    Parameters

    • tableName: TableName

      Name of the data table

    Returns ArrayType

getProp

  • getProp<Table, VarName>(tableName: Table, varName: VarName): Props[Table][VarName]
  • Retrieves the value of a networked property

    Type parameters

    • Table: keyof CCSPlayer

    • VarName: keyof Props[Table]

    Parameters

    • tableName: Table

      Table name (e.g., DT_BaseEntity)

    • varName: VarName

      Network variable name (e.g., m_vecOrigin)

    Returns Props[Table][VarName]

    Property value, undefined if non-existent

hasSpotted

  • hasSpotted(other: Player): boolean
  • Checks if this player has spotted another. Can still return true even if this player is dead.

    Parameters

    • other: Player

      Other player entity

    Returns boolean

    Has this player spotted the other?

isFriendly

  • isFriendly(other: Player): boolean
  • Parameters

    • other: Player

      Other player entity

    Returns boolean

    Whether the two players are on the same team

isSpottedBy

  • isSpottedBy(other: Player): boolean
  • Checks if this player has been spotted by the other. Note that this still returns true if spotted by the other player even if the other player is dead.

    Parameters

    • other: Player

      Other player entity

    Returns boolean

    Is this player spotted by the other?

resourceProp

  • resourceProp<TableName, TableKeys, ElementType>(tableName: TableName): ElementType
  • Retrieves the value of an array property on the singleton entity DT_CSPlayerResource.

    Type parameters

    • TableName: keyof CCSPlayerResource

    • TableKeys: keyof CCSPlayerResource[TableName]

    • ElementType: "000" extends TableKeys ? CCSPlayerResource[TableName][TableKeys] : never

    Parameters

    • tableName: TableName

    Returns ElementType

    Property value

updateProp

  • updateProp<Table, VarName, PropType>(tableName: Table, varName: VarName, newValue: PropType): void
  • Update the value of a prop

    Type parameters

    • Table: keyof CCSPlayer

    • VarName: keyof Props[Table]

    • PropType: Props[Table][VarName]

    Parameters

    • tableName: Table

      Name of the data table

    • varName: VarName

      Name of the prop to update

    • newValue: PropType

      New prop value

    Returns void

Generated using TypeDoc