[CODE]datastream.StreamToServer(DS_CHATMSG_SERVER, data, function()
self.datastream_locked = false
if ( self.datastream_locked_queue ) then
local data = self.datastream_locked_queue
self.datastream_locked_queue = false
ChatUpdate( data.msg )
end
end)[/CODE]
how do convert this?
CallBack is so bad
[code]
-- CLIENT
net.Start("ChatUpdate")
net.WriteString(strMsg)
net.SendToServer()
-- SERVER
util.AddNetworkString("ChatUpdate")
local function chatHandler(iLen, plySender)
local strMsg = net.ReadString()
-- Do what you want here
end
net.Receive("ChatUpdate", chatHandler)
[/code]
sorry:)
And Thanks
Sorry, you need to Log In to post a reply to this thread.