Back to TPG

TPG.GetWeapon

S🏷️ Weapons

Part of TPG namespace

TPG.GetWeapon(category, id)
View on GitHub|gamemode/config/sh_weapons.lua:364-368
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Look up one discovered weapon entry. TPG.GetArmor, this has no fallback entry, so callers must handle nil.

Parameters

NameTypeDescription
categorystring"Primary", "Secondary", or "Special".
idstringA weapon class, a virtual id, or `"none"`.

Returns

TypeDescription
tableThe entry, or nil for an unknown category or id -- unlike

Examples

No examples available.

Used In

No usages found in the codebase.