Some questions about usermessages...

I use usermessages in my gamemode to sync variables between the server and the clients (when the variable changes, of course). And, when a new player joins, all existing variables are sent to him to sync him.

I have read that usermessages are quite expensive, but I don’t really know their effect…
Who do they lag? The client or the server? How do they lag? Do they take long to send (delaying the running code), do they queue themselves to be sent slowly or (worst case scenario) do they fail to send too often?
And finally, are they worse or better than networked variables?

The simply rule that you should follow is only network what absolutely needs to be networked and nothing else, the only difference you need to know about between user-messages and networked variables is that you can control who user-messages are sent to where as networked variables are sent to everyone.

If you can wait a while your best shot is to use the net library.

Why would he need that when he is going from server to client?

the net library is used for client to server and server to client.

Science, I will definitely replace my current networking system with that library, when Gmod 13 becomes public. (I do not have a beta key :C)

Dame Flawless, who said I am only going from server to client?
I actually use console commands to send a lot of data to the server…

I used to avoid data streams, as they are going to be removed.
But I see the net library is very similar to them… So I will use data streams for now.

You talk about using user-messages and network variables why do you think I was talking about networking from server to client?

Of-course you are most likely sending data from the client but you did not ask for help in the area so why would I offer such a thing

Ah, a little confusion.
I meant that, whenever a new client joins, he gets all the existing variables sent to him in usermessages, and I asked how does that affect performance.

I actually do send a lot of data to the server, such as VGUI input data.

You should need to use data-stream for that since it actually uses console console commands you are better off using them you’re self since it will be more efficient

You guys saved me hours of work!

If you want me to test it out for you, add me on steam: modegg

I added you.