Back to TPG

TPG.Objectives.OnCapture

S🏷️ Objectives

Part of TPG namespace

TPG.Objectives.OnCapture(obj, teamId)
View on GitHub|gamemode/objectives/sv_objectives.lua:264-281
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Credit a capture to everyone who was standing on the point. Called by tpg_controlpoint when a point finishes flipping. Pays the round-local capture stat (for commendations) and the lifetime one via tpg.stats.OnCapture, to every player of the capturing team within TPG.Config.capDistanceMeters of the point -- so a contested cap rewards everyone who held it, not just whoever arrived first.

Parameters

NameTypeDescription
objEntityThe control point.
teamIdnumberThe team that captured it.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.