Back to TPG

TPG.State.AddScore

S🏷️ State

Part of TPG namespace

TPG.State.AddScore(teamId, amount)
View on GitHub|gamemode/core/sv_gamestate.lua:153-159
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Add to (or drain from) a team's ticket pool, clamped at zero. Scoring drains the losing side rather than adding to the winner, so in practice amount is negative. The pool never goes below zero, so a large overshoot is not carried into the next round. Does not itself end the round; tpg.rounds.CheckWinCondition notices.

Parameters

NameTypeDescription
teamIdnumberTEAM_GREEN or TEAM_RED.
amountnumberSigned.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.