Content

Post new topic Reply to topic

Is it possible to bind a key to a console command?

Author Message
Nemix View user's profile Send private message

Reply with quote Thursday, May 31, 2012

For example bind a key to do "cg_draw2d 1" and another key to do "cg_draw2d 0"

?

Zeth The Admin View user's profile Send private message

Reply with quote Thursday, May 31, 2012

Try this.

bind p toggle cg_draw2d


Syntax is :

bind <key> toggle <cvar>

Nemix View user's profile Send private message

Reply with quote Thursday, May 31, 2012

Thank you, I will try it out and report back if it works.

It works perfectly, thank you, it would be a lot of help to all those who make addons and take screenshots just paste this in the console

/bind p toggle cg_draw2d

and when you press P the hud disappears and when you press it again it appears back

Post new topic Reply to topic

Actions

Online [ 0 / 6125]