Back to TPG

TPG.Loadout.GiveWeapon

S🏷️ Loadout

Part of TPG namespace

TPG.Loadout.GiveWeapon(ply, category, weaponId)
View on GitHub|gamemode/player/sv_loadout.lua:426-464
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Give ply the weapon(s) behind weaponId in category, topping up ammo to the configured floor (or, for exactAmmo entries like the ACE mines, to an exact pool total rather than merely raising it). tell an empty/"none"/disabled pick from a real one, e.g. the bonus AT logic in tpg.loadout.Apply that only fires when this returns false.

Parameters

NameTypeDescription
plyPlayer
categorystring"Primary", "Secondary" or "Special".
weaponIdstringLooked up via `TPG.GetWeapon`.

Returns

TypeDescription
booleanTrue if it actually handed over a weapon, so callers can

Examples

No examples available.

Used In

No usages found in the codebase.