CRecipientFilter.AddPVS

From GMod Wiki

Jump to: navigation, search
Function
Syntax CRecipientFilter:AddPVS( Vector Position )
Description:
Adds all players that can potentially be seen from this PVS
Returns: nil
In Object: CRecipientFilter
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=CRecipientFilter.AddPVS]CRecipientFilter.AddPVS [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionAdds everyone who can see a spawnpoint to the recipientfilter
Used onNewerShared.png
Code
 
local RS = RecipientFilter()
local spawns = ents.FindByClass("info_player_spawn")
for _, spawn in ipairs(spawns) do
	RS:AddPVS(spawn:GetPos())
end
 
OutputA recipientfilter


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox