what im looking to do is have a client report back to the server the value of a local variable. depending on what that value is, i either want the server to do something or not do something. is there anything like this out there already?
...What?
There is a built in system to do this, using [url=http://wiki.garrysmod.com/?title=G.CreateClientConVar]CreateClientConVar[/url] with the 'userdata' set to true.
An alternative is to make the client send a [url=http://wiki.garrysmod.com/?title=G.RunConsoleCommand]concommand[/url] every time you want the value.
Be aware that a user could easily spoof anything coming out of a client, so don't ever trust things sent to you by them. Treat all input as malicious.
Sorry, you need to Log In to post a reply to this thread.