Class GameRules

Represents the game rules.




_demo: DemoFile
classId: number

Server class ID.

deleting: boolean = false

Entity is scheduled for removal this tick.

index: number

Entity index.

serialNum: number

Serial number.


  • get handle(): number
  • Returns

    Number uniquely identifying this entity. Should be unique throughout the entire demo.

    Returns number

  • get isDormant(): boolean
  • True if this entity is out of the PVS. Always false on GOTV demos as all entities are always in the PVS.

    Returns boolean

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


    Total number of rounds played.

    Returns number


  • Interpret an array-like data table (e.g., m_iAmmo) as an array

    Type Parameters


    • tableName: TableName

      Name of the data table

    Returns ArrayType

  • Retrieves the value of a networked property


    Property value, undefined if non-existent

    Type Parameters


    • tableName: Table

      Table name (e.g., DT_BaseEntity)

    • varName: VarName

      Network variable name (e.g., m_vecOrigin)

    Returns CCSGameRulesProxy[Table][VarName]

  • Update the value of a prop

    Type Parameters

    • Table extends keyof CCSGameRulesProxy

    • VarName extends string | number | symbol

    • PropType


    • 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