Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents the game rules.

Hierarchy

Index

Constructors

constructor

Properties

Protected _demo

_demo: DemoFile

classId

classId: number

Server class ID.

deleting

deleting: boolean = false

Entity is scheduled for removal this tick.

index

index: number

Entity index.

props

serialNum

serialNum: number

Serial number.

Accessors

handle

  • get handle(): number

isWarmup

  • get isWarmup(): boolean

phase

  • get phase(): string

roundNumber

  • get roundNumber(): number

roundsPlayed

  • get roundsPlayed(): number
  • This value is incremented when the scores are updated at round end. If you need to keep track of the current round number, store this value at each round_start.

    Returns number

    Total number of rounds played.

serverClass

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 CCSGameRulesProxy

    • 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 CCSGameRulesProxy

    • 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

updateProp

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

    Type parameters

    • Table: keyof CCSGameRulesProxy

    • 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