Basic Command Menu Difficulty: Beginner |
| Category: CS > Scripting | Author(s): ResidentEvil91 |

Hello!
I am going to help you understand and create Command Menu for GoldSource (Half-Life engine games)
This menu will popup in game when H button is pressed. (default)
Please, check the screenshots too. I hope you understand how it works by those two screenshots.
Continue reading!
And first, you need to find your commandmenu.txt file and its located in:
C:\Program Files\Steam\steamapps\**YOUR ACCOUNT**\counter-strike\cstrike
When you open it, youll see small tutorial and long list of code.
First you want to know how does this work.
So first we do thiskind of line there
"1" "Scripts" This is the first line. You can deside will it be menu or button.
Menu will be expanded with { symbol. Button execs the command had added to the end. Now ill explain what this line do.
"1" This will rule the order.
"Scripts" This is the name for the menu or button.
Now you have made your first line and you want add some other buttons for the Scripts button
So we press Enter and do next line, wich looklike this:
{ This will create/open your menu to more options
Ok So now, you menu will openup and show us more buttons =)
The next thing we are going to do is add more buttons and lines.
You can use tab (long space) to make the script easier to read.
"1" "BHop (space)" "exec cfg/bhop.cfg"
"2" "Silent Def (e)" "exec cfg/SilentDef.cfg"
"3" "Silent Run (v)" "exec cfg/Silentrun.cfg"
"4" "HostTeaser (v)" "exec cfg/HosterTeaser.cfg"
(bracket) stuff are only reminding me what button is for the script action
This is like the first line, but there has been added something.
"exec cfg/SilentDef.cfg"
This line will execute any console command you want to be executed.
Because i use command menu to execute my scipts, i have made cfg named folder into my cstrike folder like source has and added my scipts there.
Now you have done buttons for your first menu called as Scripts.
And you might want to make more menus so we keep reading.
} This command is the end the last menu, and you can now create new menu.
You can use Tab make the script look better and easier to read.
Your menu should looklike this:
"1" "Scripts"
{
"1" "BHop (space)" "exec cfg/bhop.cfg"
"2" "Silent Def (e)" "exec cfg/SilentDef.cfg"
"3" "Silent Run (v)" "exec cfg/Silentrun.cfg"
"4" "HostTeaser (v)" "exec cfg/HosterTeaser.cfg"
}
Congratulations! You have completed your first menu with buttons.
Next we are going to start over making more menus and buttons.
Now you make your next menu..
"2" "Server"
{
"1" "Server Online" "sv_lan 0"
"2" "Public surf"
{
"1" "Limits off" "mp_autoteambalance 0; mp_autoteambalance 0"
"2" "Accelerates 100" "sv_airaccelerate 100; sv_wateraccelerate 100; sv_accerate 100"
}
"3" "Gravity"
{
"1" "-800" "sv_gravity -800"
"2" "0" "sv_gravity 0"
"3" "100" "sv_gravity 100"
"4" "200" "sv_gravity 200"
"5" "300" "sv_gravity 300"
"6" "400" "sv_gravity 400"
"7" "800" "sv_gravity 800"
"8" "1200" "sv_gravity 1200"
"9" "3000" "sv_gravity 3000"
}
}
Theese are the buttons/menus for the second menu.
You can do 1-10 buttons/menus/menubuttons (1, 2, 3, 4, 5, 6, 7, 8, 9, 0)
If you are interested of Downloading this Command Menu, Click here!
See the screenshot to view complete script:
 |
| Added: 2 months ago | Tags: basic, command, menu, tutorial, cs, 1.6, script |
 Add Feedback Feedback Instructions: If tutorial is missing something or you do not understand something, please let me know. You cannot post yet!Get involved on FPSB by posting your thoughts. Give authors your feedback to help them develop. To post in this submission register or login. |
 You cannot assess yet!Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure. To vote on this submission register or login. This Tutorial in a nutshell... No stamps recordedYou cannot stamp yet!Stamps let you apply characteristics to submissions to help others understand them. To stamp this submission register or login.
 |
noobs!ncorporated We work it up, like a noob |
| Membership: On Request |
| Primary Skills: Coding/Scripting, Graphic Design, Mapping, Modelling, Texturing |
| Inception: 1 year ago |
Want more? Find related tuts. |