How can i get a value at server from clientside?

How can i get a value at server from clientside?

I want to create a cvar clientside and get the value from server, how can i doit?
I have no idia :frowning:

Thx you for your time :slight_smile:

**[Concommand.Add

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Concommand.Add)**
**[User_Messages

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=User_Messages)**

User Msg’s are useless here, so its either Con Commands or Data streams, which is basically the same thing.

He wants server->client
[lua]if SERVER then
function SendShit()
local something = 123;
umsg.Start(“hi”)
umsg.Float(something)
umsg.End()
end
elseif CLIENT then
function msgSomeShit(msg)
print(msg:ReadFloat())
end
usermessage.Hook(“hi”, msgSomeShit)
end[/lua]

Typed from browser. Probably some mistakes.

His question is really confusing, thought he was asking for client > server.

I think he wants “client < server” - which is “client > server > client”

He has a value on the server which he would like the clients to get when they want it.

Thx you all, i was trying to get client>server, i have do it making a new command to get the info.

**[Player.GetInfo

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.GetInfo)** anyone?

Thx you ralle105 i will rewrite the code tomorrow, im making a RP Gamemode with language selection :slight_smile: