CRecipientFilter.AddPVS

From GMod Wiki

Revision as of 06:48, 11 February 2011 by Unrealomega (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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