Garry's Mod Wiki

Revision Difference

CRecipientFilter:GetPlayers#514180

<function name="GetPlayers" parent="CRecipientFilter" type="classfunc">⤶ <description>Returns a table of all valid players currently in the recipient filter.</description>⤶ <realm>Server</realm>⤶ <rets>⤶ <ret name="" type="table">A table of all valid players currently in the recipient filter.</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>Example usage of the function</description>⤶ <code>⤶ local rf = RecipientFilter()⤶ rf:AddAllPlayers()⤶ print( rf:GetCount() )⤶ PrintTable( rf:GetPlayers() )⤶ </code>⤶ <output>⤶ ⤶ ```⤶ 2⤶ 1 = Player [1][Player #1]⤶ 2 = Player [2][Player #2]⤶ ```⤶ ⤶ </output>⤶ ⤶ </example>