GangsterAngel Posted November 3, 2005 Share Posted November 3, 2005 is there no way to load a file thats not in a PK3 ? because ive just gone through quite abit of code, and coded a saving feature and then realsied it dosent load the files its saved unless they are PK3d Link to comment Share on other sites More sharing options...
Jufa Posted November 3, 2005 Share Posted November 3, 2005 its possible to load txt-files. some mods already do that. also you could integrate SQL-database to your mod if you meant that saving thingie to accounts Link to comment Share on other sites More sharing options...
GangsterAngel Posted November 3, 2005 Author Share Posted November 3, 2005 i couldent intergrate SQL cuz i dont know how , and i dont REALY want someone to tell me its 'posible' i want them to tell me how lol. i know how to save the files , and how to load files that are in PK3s . but i dont know how to load a file thats not in a PK3. Link to comment Share on other sites More sharing options...
Jufa Posted November 3, 2005 Share Posted November 3, 2005 there was a tutorial about it (quake 3) somewhere... i'll try to find it for u Link to comment Share on other sites More sharing options...
GangsterAngel Posted November 3, 2005 Author Share Posted November 3, 2005 dosent matter, i got the file loading working, but it only loads files outside of PK3s if the server is not pure.. http://img45.imageshack.us/img45/1673/mpconsole7mr.jpg Link to comment Share on other sites More sharing options...
Vruki Salet Posted December 13, 2005 Share Posted December 13, 2005 Isn't there a way to read a non-pk3'd file on a non-pure server? I mean it reads config files so why can't it read another? ...uh, or are you talking about reading files from the client machine, or something else? Link to comment Share on other sites More sharing options...
stubert Posted December 13, 2005 Share Posted December 13, 2005 you can either a) look through the released quake 3 renderer source and find the function prototype that you need and hope you can call it in raven's jka'd version b) call /reconnect and it will re-read all the pk3s and add new ones Link to comment Share on other sites More sharing options...
ensiform Posted December 13, 2005 Share Posted December 13, 2005 or use one of the following file extensions: .game .dat .cfg .menu i think thats all thats available for reading on pure servers meaning .txt is not afaik it doesnt, so if ur gonna use a txt file just name it dat or smth. Link to comment Share on other sites More sharing options...
robo85045 Posted December 19, 2005 Share Posted December 19, 2005 Here is the code Im using in my mod to save the player data files (slightly modified so it is a stand alone function, real one relies on some global vars) qboolean SaveFile(char FileName[MAX_STRING_CHARS], char FileSaveData[MAX_STRING_CHARS]){ FILE *TheFile; if(strlen(FileSaveData) <= 0) return qfalse; if(!FileName || !FileName[0]) return qfalse; TheFile = fopen(FileName, "w"); if(!TheFile) return qfalse; fwrite(FileSaveData, sizeof( char ), strlen(FileSaveData) , TheFile); fclose( TheFile ); return qtrue; } Im not shure if it will work with any platform besides windows though... try taking a look at the trap_FS stuff. and im fairly shure the game can read any file, regardless of its extention Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.