Back to TPG

TPG.Protection.GetSafezoneTeam

S🏷️ Protection

Part of TPG namespace

TPG.Protection.GetSafezoneTeam(pos)
View on GitHub|gamemode/player/sv_protection.lua:83-87
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Which team's safezone contains this position, if any? The position-based counterpart to IsInSafezone: that one asks about a player, this one about an arbitrary point, which is what the ACE damage permission mode needs when it is handed a prop rather than a person. Returns nil while no round has published spawns, which is the same "there is no outside yet" state IsInSafezone treats as safe -- callers that protect on a hit should read nil as "no safezone applies", not "unprotected".

Parameters

NameTypeDescription
posVector

Returns

TypeDescription
numberTEAM_GREEN, TEAM_RED, or nil.

Examples

No examples available.

Used In

No usages found in the codebase.