This tutorial will show you how you can make any button preform an action, and how to add a keybind option for it in a menu. After this tutorial it will only print a line on the screen, you have to work from there on.. ( i'm not 100% sure if there's a better way to get this working, menu-scripting is still kinda new to me. This was pretty much the only thing i got working so far though )
-I'll start with the menu, in this example we'll add the line to the main menu so it's easy to find, but you can put it in any menu in the same way ( controlls-options, pause menu etc ).
Go to your root\raw\ui\ folder and find the file main.menu copy that file and rename it to anything you like, i'll use:
CHOICE_BIND( 11, "Print text on screen:", "openScriptMenu print_text print_text" , ; ) CHOICE_KEYBINDHELP
Note: The number 11 determine's at wich position the tekst will appear in the menu, the lower the number the higher it will appear to the top of your screen.
Open launcher and add this line to your mod.csv fastfile:
Code Snippet
Plaintext
menufile,ui/main_new.menu
Now we need to make a script to make something happen. Create a new .gsc in your mods\mapname\maps\ folder and give it any name, i'll use:
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time