What's the best way to display a serverside variable in a clientside hudpaint hook?

Hello. In a deathmatch gamemode I’m creating I need to display the amount of kills a certain team has… problem is, the variable that shows these kills is serverside… would I create a shared variable that’s value is the serverside variable and use the shared variable in my cl_init script or would I send a net message from the client to the server, containing this variable or vice versa(that might not be a good idea to send a net message every frame, or would it be?), or would I just need to do something else I haven’t thought of yet?


SetGlobalVar results in more data being sent to the client, use the type specific versions.

[editline]30th May 2015[/editline]

There’s also this function for getting the amount of kills a team has,


Not necessarily every frame, you could make a net channel and make the server increment the clientside variable when a kill is made (hook).