net.Broadcast

From Garry's Mod
Revision as of 16:44, 12 September 2018 by Robotboy655 (Talk | contribs)
Jump to: navigation, search
 net.Broadcast( )

Description

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

BUG

Calling this with no players on the server can cause the game to infinitely hang. You should wait until after GM:InitPostEntity to send a net message.

Issue Tracker: #3412

This bug will be fixed in the next update.

Examples

Example

Sends a packet to all players.

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


Personal tools
Navigation