Garry's Mod Wiki

Revision Difference

Player:GetWeapons#527126

<function name="GetWeapons" parent="Player" type="classfunc"> <description>Returns a table of the player's weapons.</description> <realm>Shared</realm> <rets> <ret name="" type="table">All the weapons the player currently has.</ret> </rets> </function> <example> <description>Prints how many weapons the player has.</description> <code>print( #Entity(1):GetWeapons() )</code> <code>print( #Entity( 1 ):GetWeapons() )</code> <output>The number of weapons the player has (e.g. 5).</output> </example>