1 key, 2 actions?

0nti

2007-08-05 17:08:34

Just wanted to know if there is a way to change my name when I press a key, and then change it back if I press the key again, cuz I'm the admin of a server in my country, but to change anything I need to take out my tag, since I'm not admin by steam id.
Imagine I want to change between "name1" and "name2", is there anyway to do it with a single key, or do I need to assign the different names to different keys?
thx in advance.

st00pidity

2007-08-05 18:00:46

i think it goes like this dude:

name "rL^ st0wn3d"; say "Isn't my name sexay?"; say "well who cares what you think"

edit: idk if theres a way to toggle between 2 commands with 1 key, but that puts 2 actions to 1 key.

0nti

2007-08-05 19:28:02

yeah, you are right, I wrote the wrong name to the thread.
What I want is to toogle between 2 actions, with one key.
Anyway, thx for the help stowned ^^

MeekMeekle

2007-08-05 23:21:17

maybe you can figure out how to do it from this?

http://support.steampowered.com/downloa ... 4/rate.cfg

0nti

2007-08-06 01:04:31

wow thx, this should do just fine ^^

badinfluence

2007-08-06 05:30:25

I just put it twice in my autoexec.

mwheel and space are both jump ^_^

{Rx}Crowbar Ninja DJ Z3R0

2008-04-08 18:39:56

I've been wondering if this is possible... and..

OMG

The last post on this thread as on my birthday! O:

0nti

2008-04-11 13:51:05

holy bump ! D:
thx grape :D !

keefy

2008-04-11 20:33:36

I supose you could use that script for changing models also.

Jelly Fox

2008-04-12 21:22:16

Sorry about going slightly off topic, but using the code above as a template I've tried to make a alias-type-bind-thingy to allow me to switch between the mouse wheel binds but for some reason it doesn't work.

This is what I've come up with...bare in mind I've never toyed with aliases before :oops:

Code: Select all

alias wheel_0 bind "MWHEELUP" "use weapon_shotgun"; bind "MWHEELDOWN" "use weapon_357"
alias wheel_1 bind "MWHEELUP" "use weapon_ar2"; bind "MWHEELDOWN" "+jump"

bind "3" "wheel_0"
bind "4" "wheel_1"
When I run my config it sets it to Wheel_1 and I get this in my consol when I try and change to to wheel_0

Code: Select all

bind <key> [command] : attach a command to a key
Any ideas on fixing this?

thanks

keefy

2008-04-13 02:32:31

I hink i see the problem, you have:

Code: Select all

alias wheel_1 bind "MWHEELUP" "use weapon_ar2"; bind "MWHEELDOWN" "+jump"
and i think it should be

Code: Select all

alias wheel_1 bind "MWHEELUP" "use weapon_ar2; bind MWHEELDOWN +jump"
You had too many " quotations they should only be at the start and the end of the command there is No need to add them in the middle as the engine knows it is a seperate command due to the ; semi colon.

Jelly Fox

2008-04-13 03:39:36

Yeah you're right too many quotations, there should only be 1 at the start and 1 at the end of the command, so in order for that to work you need to create alias for each weapon like so:
alias use_weapon_357 "use weapon_357"
alias use_weapon_ar2 "use weapon_ar2"
alias use_weapon_shotgun "use weapon_shotgun"

alias wheel_0 "bind MWHEELUP use_weapon_shotgun; bind MWHEELDOWN use_weapon_357"
alias wheel_1 "bind MWHEELUP use_weapon_ar2; bind MWHEELDOWN +jump"

bind 3 wheel_0
bind 4 wheel_1
Cheers Grape :D

keefy

2008-04-13 04:20:25

I get it now it HAS to be ...key action_nospaces