Home » CS1.6 ARTICLE » Scripting in CS 1.6 Guide
Scripting in CS 1.6 Guide
What is the Script?
Cycle scripts
This type of script is most often used to change settings. With one key you will be able to cycle through, and at the end will return to the starting position.
alias loop loop1 // Initial Name Of The Cycle Alias
alias loop1 “command1; command2; command #; alias loop loop2” // For each setting, assign commands and change the alias for the next loop
alias loop2 “command1; command2; command #; alias loop loop3” // Repeat several times
alias loop3 “command1; command2; command #; alias loop loop #”
alias loop # “command1; command2; command #; alias loop loop1” // Return to the original setting
bind “?” cycle // Call key
Meta scripts
Executes a group of commands when a key is pressed and a group of commands when a key is released.
alias command1 “action1; wait; action2” // Alias for the first command
alias command2 “action3; wait; action4” // Alias for the second
alias +meta1 command1 // Call when the meta key is pressed
alias -meta1 command2 // Call when released
bind “h” +meta1 // Call key
Switch scripts
Switches operate on/off principle
alias anyname1 “command1; bind h anyname2” // action1
alias anyname2 “command2; bind h anyname1” // action2
bind “h” anyname1 // Toggle
Press&Relise scripts
The mechanism of these scripts is as follows: when you press a key, some commands are executed, and as soon as you release this key, others.
alias “+press” “command1; command2”
alias “-press” “command3; command4”
Pay particular attention to the “+” and “-“. They must be placed before the alias name, otherwise it is impossible to make a “press-release” script. The second alias is optional if no action is required when the key is released.
bind “?” “+press”
A simple radar example:
alias “+radar” “drawradar”
alias “-radar” “hideradar”
bind “q” “+radar”
When you press the “q” button, the radar will appear and disappear if you release the button