Garry's Mod Wiki

Revision Difference

CRecipientFilter:AddPVS#552430

<function name="AddPVS" parent="CRecipientFilter" type="classfunc"> <description>Adds all players that are in the same [PVS(Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community") as this position.</description> <description>Adds all players that are in the same [PVS (Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community") as this position.</description> <realm>Server</realm> <args> <arg name="Position" type="Vector">PVS position that players may be able to see.</arg> </args> </function> <example> <description>Adds players that are visible from the origin of the map to a recipient filter, then sends them a message.</description> <code> function SendMessage() local filter = RecipientFilter() filter:AddPVS( Vector( 0, 0, 0 ) ) net.Start( "message" ) net.Send( filter ) end </code> <output>Sends a net message to every player visible from 0,0,0</output> </example>