IGameRules
interface in cs_script/point_script — the type of GameRules.
An API provided to scripts for the state of the match: warmup, rounds, and team money.
Access these functions by importing GameRules from "cs_script/point_script".
CS2 build 27045800 · Steam date 2026-11-30 · platform windows-x86_64 · schema format 2.2
Members
IsWarmupPeriod
IsWarmupPeriod(): booleanGet if the game is currently in a Warmup period.
StartWarmup
StartWarmup(): voidStart the warmup period, restarting the round.
EndWarmup
EndWarmup(): voidEnd the warmup period as if its timer had run out. The game mode then ends it the usual way, starting on the next tick.
IsFreezePeriod
IsFreezePeriod(): booleanGet if the game is currently in a Freeze period.
IsTeamIntroPeriod
IsTeamIntroPeriod(): booleanGet if the game is currently in a Team Intro period.
GetRoundsPlayed
GetRoundsPlayed(): numberGet the number of rounds played in the current game.
GetRoundRemainingTime
GetRoundRemainingTime(): numberGet the time remaining in the current round in seconds.
SetRoundRemainingTime
SetRoundRemainingTime(time: number): voidSet the time remaining in the current round in seconds.
GetTeamScore
GetTeamScore(team: number): numberGet the team's score.
AddTeamScore
AddTeamScore(team: number, score: number): voidAdd to the team's score. Call before TerminateRound so the round end sees the new score.
TerminateRound
TerminateRound(reason: CSRoundEndReason, delay?: number): voidTerminate the current round. Counts as a round played unless it is a draw. Will not add to team scores. Does nothing if the round has already ended.
AddTeamMoney
AddTeamMoney(team: number, reason: CSTeamMoneyReason, amount?: number): voidAdds the money to all player controllers on the team, following all classic rules.
If players are not eligible to receive end-of-round money, then that restriction is honored.
Disconnected players will get their account balance incremented, and will have correct
amount of money after they reconnect to the server.
If the amount parameter is 0 or undefined, then the amount will be determined using server convar
setting corresponding to the reason parameter.