CRecipientFilter/AddPlayer

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

Contents

Description

Adds a player to the recipient filter

Arguments

Player Player

Player to add to the recipient filter.

Examples

Example

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

function SendMessage()
 local filter = RecipientFilter()
 filter:AddPlayer(Entity(1))
 umsg.Start("message",filter)
 umsg.End()
end

Output:

Sends a usermessage to the first player object, if it exists.
Personal tools
Navigation