Looking for a function

So, on my derma panel I have a button. And I want it to where whenever a player clicks that button the player says a command in chat automatically. So if they were to click the button in chat they would say: !kill. So the button would kill them if clicked.( Just an example ). What’s the function that makes the player talk in chat?


You’d want to run a console command on the client. So something like this:

RunConsoleCommand( "say", "!kill" )

Wouldn’t it be better just to run whatever function after the command.
For example !kill, instead of printing that to chat, couldn’t you just make it run the suicide command directly?

And this function is what you want
Or this for client side