How would i tell the server i have clicked a button?

hello, i am making my own lobby gamemode with money and stuff but i need to know how to tell the server i have clicked on a derma button so i can deduct money from that person, cause buying stuff is cool but not paying is lame if you know what i mean

Button.DoClick = function() RunConsoleCommand(“hiserver”, “i_clicked_a_button”) end

but i can’t do that otherwise people could exploit the way i am calling functions, is there something more like usermessages but going to the server from the client?

concommands are the only way. Anyone that rates me box and says datastream doesn’t know the datastream uses concommands.

ok, can someone post an example of how it would do it because i have no idea on how to do it, sorry

its just i only worked with concommands that effect clients, not the server

[editline]03:01PM[/editline]

nvm, got it

Add serverside checking then? <_<

Exactly, if you wanted to stop people sending the console command arbitrarily then on the event which creates the button tell the server to expect data and only accept one.