Back to TPG

TPG.Maps.AddPoint

S🏷️ Custompoints

Part of TPG namespace

TPG.Maps.AddPoint(ptype, teamId, pos, name)
View on GitHub|gamemode/maps/sv_custom_points.lua:90-94
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Append a point to the running map's list and save immediately. No de-duplication: placing the same type/position twice yields two records, which for "ctf" matters because TPG.Maps.GetCustomFlagPoint always returns the first one in list order (the first ever placed), silently ignoring any later ones.

Parameters

NameTypeDescription
ptypestringOne of `"cp"`, `"koth"`, `"ctf"`, `"spawn"`.
teamId?numberOnly meaningful for `"spawn"`; nil otherwise.
posVectorWorld position.
name?stringOptional label; falls back to a generated one when read.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.