0 Members and 3 Guests are viewing this topic.
util.AddNetworkString("sMsgStandard")local str = "Hello"net.Start("sMsgStandard") net.WriteString(str)net.Send(ply) -- ply, is the player entity your targeting.
net.Receive("sMsgStandard", function() local str = net.ReadString() LocalPlayer():ChatPrint(str)end)
local str = "Hello"net.Start("HelloServer") net.WriteString(str)net.SendToServer()
util.AddNetworkString("HelloServer")net.Receive("HelloServer", function(_, ply) local str = net.ReadString() print(ply,str) -- Will return the entity of the player who sent the message, as well as the message it self.end)
util.AddNetworkString( "Debug2" )
util.AddNetworkString( string )placed in a serverside lua file has to match whatever string is being used in net.Start( string )
Hm, it doesn't seem to be registering.I used util.AddNetworkString( "Debug2" ), then called net.Receive( "Debug2" ), but it still seems to be failing.