
04-06-2003, 09:34 PM
Example 1:
[code:ef483]// Let's say current yaw-speed is 600
// $VAR will be 600 now
set VAR "cl_yawspeed"
// F5 sets yaw-speed to 8000
bind F5 "set cl_yawspeed 8000"
// F6 puts it back to 600
bind F6 "set cl_yawspeed $VAR"[/code:ef483]
Example 2:
[code:ef483]// Let's say current yaw-speed is 600
// $VAR will be 600 now
set VAR "cl_yawspeed"
// wazaa1 sets yaw-speed to 8000 and spins to right
alias wazaa1 "set cl_yawspeed 8000; +right"
// wazaa1 stops spinning and puts the yaw-speed back to 600
alias wazaa2 "-right; set cl_yawspeed $VAR"
// starts spinning and binds F5 to off (to stop spinning)
alias on "wazaa1; bind F5 off"
// stops spinning and binds F5 to on (to start spinning again)
alias off "wazaa2; bind F5 on"
// F5 will run the "on" commands
bind F5 "on"[/code:ef483]
Hope this helps evil:
|