PDA

View Full Version : Binding RCON cmds to keys...


Jasper
07-18-2003, 07:52 AM
Is there a way to do this? I would love to bind the more common cmds to say my F1-F11 keys.

elgaucho
07-18-2003, 03:18 PM
I found a neat script on a site somewhere to bind commands to a kick. It would be quite easy to readapt to other commands, i'm certain!

Have a look at this:

unbind *
say .
bind * "exec unkick.cfg"
rconPassword "yourpassword"
bind kp_slash "rcon status; wait; wait; wait; toggleconsole"

//clientkick commands
bind kp_ins "rcon clientkick 0" //zero
bind kp_end "rcon clientkick 1" //one
bind kp_downarrow "rcon clientkick 2" //two
bind kp_pgdn "rcon clientkick 3" //three
bind kp_leftarrow "rcon clientkick 4" //four
bind kp_5 "rcon clientkick 5" //five
bind kp_rightarrow "rcon clientkick 6" //six
bind kp_home "rcon clientkick 7" //seven
bind kp_uparrow "rcon clientkick 8" //eight
bind kp_pgup "rcon clientkick 9" //nine
bind kp_del "rcon clientkick 10" //ten
bind F1 "rcon clientkick 11" //eleven
bind F2 "rcon clientkick 12" //twelve
bind F3 "rcon clientkick 13" //thirteen
bind F4 "rcon clientkick 14" //fourteen
bind F5 "rcon clientkick 15" //fifteen
bind F6 "rcon clientkick 16" //sixteen
bind F7 "rcon clientkick 17" //seventeen
bind F8 "rcon clientkick 18" //eighteen
bind F9 "rcon clientkick 19" //nineteen
bind F10 "rcon clientkick 20" //twenty

rconPassword "your password"

rcon status
toggleconsole

Thus, binding * to "exec kick.cfg" will automatically initiate a kick mode.
The following resets the default commands:

unbind *
unbind /
unbind kp_ins //zero
unbind kp_end //one
unbind kp_downarrow //two
unbind kp_pgdn //three
unbind kp_leftarrow //four
unbind kp_5 //five
unbind kp_rightarrow //six
unbind kp_home //seven
unbind kp_uparrow //eight
unbind kp_pgup //nine
unbind kp_del //ten
bind F1 "vote y" //eleven
bind F2 "vote n" //twelve
bind F3 "pushmenu Controls" //thirteen
bind F4 "pushmenu_sp LoadSave" //fourteen
bind F5 "savegame quick" //fifteen
bind F6 "messagemode" //sixteen
unbind F7 //seventeen
unbind F8 //eighteen
bind F9 "loadgame quick" //nineteen
unbind F10 //twenty

bind * "exec kick.cfg"
say ..

The say is just an indicator to yourself to know if you have the mode on or off, really.

This should be easy to adapt for use with any command, i'm certain! ;)

(alternatively, you could always just use an app like easyrcon?)

GaSplat
07-18-2003, 06:41 PM
That's a pretty cool find! :D