Quicktextes or chat macros

I’ve been wondering, is there a function to make a player say something? Like quicktexts, or macros?

Say, you know how gimps work? Well, I’m looking for a function that purposely sends a message in chat from a player as if he had typed it himself, but it would be called by the function.

The idea is to make a quick key that’ll emit a “Help!” sound from the player when he presses it, as well as displaying that in chat from that player to let everyone know he’s the one that needs help. Kind of like in TF2 when you press E to call medic.

I’m pretty sure there’s a way to do it with the console, but I’m not entirely sure about the specific commands

I know for a fact “bind” will be involved though

No, but you can either:
a) Make the player run the “say” command
b) Use the net or umsg library and send a message to the clients, which calls chat.AddText and makes it look as if it was typed.

Here we are, in console type this:

bind h “say help!”

every time you press h, you should say “help!”

of course, adjust as you see fit :slight_smile:

Sorry, no macros. Garry doesn’t think they’re funny. (dumbest rule ever)