Which should be quite clear by the function name.
Let dissect that one for a bit, shall we?
precacheMenu() consists of 2 parts, namely:
and
The goal of function names is to be descriptive.
Following said convention, this function should do something with a Menu, whereas the action might be closely related to the word precache.
As to return to your original question:
hello i make new menu , how precache ?
You obviously are trying to do something with menus, which might be fulfilled by the above function. As your question is on "how to precache a menu", it might be quite clear which function you need to use, not in the least because the code you quoted is indeed the stock cod2 code to precache the menus from a stock cod2 installation. The correct syntaxis is thus
Code:
precacheMenu(menuname_goes_here);
Now, to return to your question about exactly how to precache menus, this is quite simple. As you know, .menu files have a filename and a title (defined within the file). These two should match (although it might be allowed to use different filenames, which could work, but make your mod much harder to debug should something fail). By then, you should have a name for that .menu file, lets call it
Code:
typing_this_is_actually_quite_boring
So, by then you could recall the syntax for the precacheMenu function. To re-iterate:
Code:
precacheMenu(menuname_goes_here);
As you now know the menu-name, you can call the function as follows:
Code:
precacheMenu("typing_this_is_actually_quite_boring");
This should precache your menu.
I hope this answers your question, if not, feel free not to post about it.