net/Broadcast

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
 
Line 2: Line 2:
 
|Description=Sends the currently built net message to all connected players.
 
|Description=Sends the currently built net message to all connected players.
 
More information can be found in [[Net Library Usage]].
 
More information can be found in [[Net Library Usage]].
 
{{Bug|Issue=3412|Calling this with no players on the server can cause the game to infinitely hang. You should wait until after {{HookFunction|GM|InitPostEntity}} to send a net message.|Fixed=}}
 
 
|Realm=Server
 
|Realm=Server
 
|IsClass=No
 
|IsClass=No

Latest revision as of 08:11, 18 October 2018

 net.Broadcast( )

Description

Sends the currently built net message to all connected players. More information can be found in Net Library Usage.

Examples

Example

Sends a packet to all players.

net.Start("NETHOOK")
    net.WriteString("some text")
net.Broadcast()


Personal tools
Navigation