Binding text to keys

Grizzam

Active Member
Joined
May 26, 2009
Messages
375
Forgot how to do it, need to know how!

For example, want to bind my F8 key to say "Hello", what would I insert in console
 
bind f8 "say Hello"

I believe.

Yep. One note is that it has to be in quotes. You can do either:
bind f8 kill
bind f8 "kill"

But with multiple word commands (say etc), you need the quotes so that it doesn't return a syntax error.
 
now if you want really fancy you can add semi colons so you can do many commands at once!

bind f8 say "Winner Winner"; say "chicken dinner!"
 
now if you want really fancy you can add semi colons so you can do many commands at once!

bind f8 say "Winner Winner"; say "chicken dinner!"


That will actually return a syntax error. The quotes need to be around the entire command, which would include the say. Also, It will only bind f8 to say winner winner, and "say chicken dinner" will be executed the moment the bind command is executed.
 
That will actually return a syntax error. The quotes need to be around the entire command, which would include the say. Also, It will only bind f8 to say winner winner, and "say chicken dinner" will be executed the moment the bind command is executed.

He speaks the trufax.
 
I always thought you had to had "'s around the F8... hmm learned something new.
 
Thank you very much for the help guys.

I will pack you all cookies for lunch tomorrow. Enjoi!
 

Latest posts

Back
Top