CRecipientFilter/RemovePVS

From Garry's Mod
Jump to: navigation, search
 CRecipientFilter:RemovePVS( )

Contents

Description

Removes all players that can see this PVS from the recipient filter.

Arguments

Vector pos

Position that players may be able to see.

Examples

Example

Adds the first player object to the recipient filter, then sends him a message.

function SendMessage()
	local filter = RecipientFilter()
	filter:AddPVS( Vector( 0,0,0 ) )
	filter:RemovePVS( Vector( 0,10,0 ) )
	umsg.Start( "message", filter )
	umsg.End()
end

Output:

Adds all players that can see the map's origin to the recipient filter, then removes all players who can see 10 units to the left of the origin, and sends the rest a message.
Personal tools
Navigation