1. All the file functions work in COD4, only you have to run your server in developer mode, and as such you can't run a dedicated server in that mode. However, I would suggest you tell us what it is you are trying to write to files, as COD4 has a built-in function that writes numerical data to client-side files (named "mpdata"). Modders throughout the COD4 community have been using numbers and then converting those numbers to other functions/data sets. You simply have to use your imagination to do it.
2. To open a menu at the end of the game, just use the endGame() function (maps\mp\gametypes\_globallogic.gsc). Just set the client dvar "g_scriptMainMenu" to the name of the popup you want to open, and that menu will open automatically (just as it does in stock COD4 when it opens the end-of-game menu).
3. Custom string tables - these work like ordinary string tables:
1. you must run your server in online/rankedmatch mode:
Code:
level.rankedMatch = ( level.onlineGame && getDvarInt( "sv_pure" ) );
/#
if ( getdvarint( "scr_forcerankedmatch" ) == 1 )
level.rankedMatch = true;
#/
If your mod is based on modwarfare, you need to change that line of code in modwarfare's version of _globallogic.gsc as it turns off the read/write status of the setStat/getStat functions.
2. Create your custom string table and compile it into fastfile - NB: COD4 will not read string tables in RAW format. They must be compiled into fastfile. So, add it to your mod.CSV file:
Code:
stringtable,mp/nameoftable.csv
3. The way the string table function works is like this:
Code:
TableLookup( <filename>, <search column num>, <search value>, <return value column num> )
1. <filename> - the first argument is the name of the file to search through
2. <search column num> - next is the column to search through (the column numbering starts at 0 )
3. <search value> - then is the thing that it is trying to find (in this case it is passed to the method as a parameter)
4. <return value column num> - finally is the column number of the thing to return on the same row as the thing you want to find is located
It is a very powerful and flexible system. You can read practically any data set as long as you are imaginative to do it. I have created string tables to spawn models and even weapons.
If you want to give me any concrete examples of what it is you want to write/read I'm pretty sure I can help you solve any problems for you.