jaakko
Member-
Content Count
15 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout jaakko
-
Rank
Private First Class
-
The western democracies didn't rise by thanks of some other countries intervening with their affairs. I say live and let live, eventually they (whatever countries we consider undemocratic) will grow up and maybe find a solution that surpasses our "democracy".
-
Trigger external program from within OFP..?http://
jaakko replied to DBR_ONIX's topic in OFP : MISSION EDITING & SCRIPTING
I have modified fwatch so that you can connect to a mysql database with it. I'm not sure if ill make a proper release of it but on behalf of the license that the code is based on im willing to share the sources if someone requests for it (ill just clean it up a bit in that case). -
Trigger external program from within OFP..?http://
jaakko replied to DBR_ONIX's topic in OFP : MISSION EDITING & SCRIPTING
I think that the FWatch is hooking to flashpointresistance.exe so you could try to rename the game executable... This is just a quick guess -
COC Command engine error
jaakko replied to sputnik monroe's topic in OFP : MISSION EDITING & SCRIPTING
I think its here: Is it that monroe is the name of your player? If so then try doing this: 1. remove the name from the player 2. in the init filed add <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">monroe = group this -
Trigger external program from within OFP..?http://
jaakko replied to DBR_ONIX's topic in OFP : MISSION EDITING & SCRIPTING
I just noticed a cheating possibilty that should probably be noted. What if i edit the fwatch\data\true.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player addweapon "G36"; true -
Trigger external program from within OFP..?http://
jaakko replied to DBR_ONIX's topic in OFP : MISSION EDITING & SCRIPTING
That is not exactly true. The server owner could easily create a private addon that he adds to his dedicated server, the addon containing the necessary logins and passwords, then he would do this when wishing to connect to the database: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?(server != local this) : exit [] exec "/dbaddon/connect.sqs" While at it the addon could also abstract the sql calls... The result set could then be accessed by many different ways: 1. From global space. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; calling script ["SELECT * FROM players"] exec "/dbaddon/query.sqs" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; dbaddon/query script SQL_Resultset = loadfile ":sql ""SELECT * FROM players"" ";// or something similar depending on how its implemented in the external program... 2. By passing the value straight on <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; calling script _resultset = ["SELECT * FROM players"] loadfile "/dbaddon/query.sqf";// dunno if functions can be called from addons but thats not the point to get arguing about... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; dbaddon/query function _resultset = loadfile ":sql ""SELECT * FROM players"" "; _resultset As far as i understand it would be really easy to add the mysql c api to fwatch, testdll or any other clone for someone even less genius than many on this board. Unfortunately im not that experienced with compiling c/c++ programs so i didnt manage to do it myself (also a proof of my geniousity)... -
Trigger external program from within OFP..?http://
jaakko replied to DBR_ONIX's topic in OFP : MISSION EDITING & SCRIPTING
I suggest you add SQL connection code to the program. That would be great Please do that... -
I would like to be able to connect to a database (f.ex. mysql) trough scripts. That kind of ability on a dedicated server would open huge new mission types.
-
Does hiddenselections or setobjtexture works on
jaakko replied to quakergamer's topic in OFP : CONFIGS & SCRIPTING
Has anyone solved this issue? Im getting that far that i get the selection to be hidden at start, but setObjectTexture doesent work.. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgPatches { class jj_addons { units[] = {jj_station}; weapons[] = {}; requiredVersion = 1.85; }; }; class CfgModels { class Default {}; class jj_station: Default { sections[]= {"hud_blastout", "hud_blastin"}; }; }; class CfgVehicles { class All {}; class AllVehicles: All {}; class Land: AllVehicles {}; class Static : Land {}; class Building : Static {}; class Strategic : Building {}; class Fortress1 : Strategic {}; class jj_station: Fortress1 { model="\jj_station\jj_station"; armor=2000; scope=2; vehicleClass="jj Objects"; displayName="jj Station"; animated=1; hiddenSelections[] = {"hud_blastout", "hud_blastin"}; EDIT: Sorry i was wrong, the texture IS visible. I just percieved it from an angle that didnt display it.. -
Well i solved it. It turned out that if i place the whole building at Z-axis on the positive side ( Z > 0 ), then it works..
-
I have a strange problem. My model (a large building) has a working gemoetry as long as i test it in Mission Editor but when i test it with a friend in MultiPlayer some walls become passable. Wierdest is that only parts of the model has a solid wall, and the area where the passing trough the wall starts is im the middle of a component (so the component is solid as one end ond passable at the other end). I have tried to solve this by reading previous posts here and these things i checked that i have done right: 1. Components are convex and all have a component name selection (Component1 etc..). 2. Geometry is not bigger than 64m x 64m, its something like 40m x 40m. 3. All components have a weight (total mass 20000). And i really need to point out that the model works perfectly in MissionEditor and the problem is only in MultiPlayer. The model has a door animation in that end where the problem occurs, just to mention if someone knows that this can cause problems...
-
I this really so? I tried putting that in the server.cfg but got a error message: } found before ;
-
Hehe, no i was just trying to figure it out and the notepad was my first view into it, hexedit after that. Well anyway thanks to the document at OFPEC i got it all clear and was able to make a PBO-tool in Java. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> public class PBOWizard { private File pbofile; private File sourcedir; private DataOutputStream dout; private DataInputStream din; public PBOWizard() { } public void makePbo(File f, File dir) { pbofile = f; sourcedir = dir; try { dout = new DataOutputStream(new FileOutputStream(f)); } catch (FileNotFoundException e) { e.printStackTrace(); } if (dout != null) { if (sourcedir.isDirectory()) { File[] files = sourcedir.listFiles(); try { for (int i = 0; i < files.length; i++) { din = new DataInputStream(new FileInputStream(files)); FDTEntry entry = new FDTEntry(); entry.fileName = (files.getName() + "\0").toCharArray(); entry.packMethod = 0x0; entry.originalSize = 0x0; entry.reservedForInternalUse = 0x0; entry.dataTimeStamp = (int)(System.currentTimeMillis() / 1000); entry.size = din.available(); din.close(); // write out to pbo for (int j = 0; j < entry.fileName.length; j++) dout.writeByte(entry.fileName[j]); dout.writeInt(entry.packMethod); dout.writeInt(entry.originalSize); dout.writeInt(entry.reservedForInternalUse); dout.writeInt(entry.dataTimeStamp); dout.writeInt(entry.size); } FDTEntry entry = new FDTEntry(); // write out to pbo for (int j = 0; j < entry.fileName.length; j++) dout.writeByte(entry.fileName[j]); dout.writeInt(entry.packMethod); dout.writeInt(entry.originalSize); dout.writeInt(entry.reservedForInternalUse); dout.writeInt(entry.dataTimeStamp); dout.writeInt(entry.size); /* * ------------------------------------ * proceed with writing the data itself * ------------------------------------ */ for (int i = 0; i < files.length; i++) { din = new DataInputStream(new FileInputStream(files)); byte[] b = new byte[din.available()]; din.readFully(b); dout.write(b, 0, b.length); din.close(); } } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } try { dout.close(); } catch (IOException e) { e.printStackTrace(); } } } } class FDTEntry { char[] fileName = {'\0'}; int packMethod = 0x0; int originalSize = 0x0; int reservedForInternalUse = 0x0; int dataTimeStamp = 0x0; int size = 0x0; }
-
Thank you!
-
Im sure someone can ansver this question since so many PBO-tools have been developed. If i open a pbo (in notepad or hexedit) containing a simple script file, i see that the pbo contains the name of the scriptfile and the contents of the script as well as a few hexadecimal characters. If i now edit it a bit extending the script for example with one line the script execution in OFP terminates too early. Is some of those hexes for telling the length of the file? Plz anybody who knows this thing tell me.