Vehicle Ownership System: Converting from DINI multi-file to single-file or database? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle Ownership System: Converting from DINI multi-file to single-file or database? (
/showthread.php?tid=652165)
Vehicle Ownership System: Converting from DINI multi-file to single-file or database? -
JMCortinax - 04.04.2018
I've been using DINI since 2009 for my vehicle ownership system however I'm starting to get serious about my server now and I know I need to optimise my script.
Now my question is, what'd be easier (I say easier because time is not something I have alot of), converting to a single-file system (ie still using dini but splitting lines) or converting to a database (mysql, sqlite)?
Currently I have one file per car, and these load as the vehicleid's on server-startup. Each command a player uses will save whatever has been modified on that car (components, colors, parking position etc) to the file of that vehicleid straight away. This works perfectly, but again, it's alot of files, and alot of reading & writing.
What'd be the pro's and con's, and would it actually be possible to convert a system rather than re-writing the whole thing? TIA.
Re: Vehicle Ownership System: Converting from DINI multi-file to single-file or database? -
Gameluner - 04.04.2018
Код:
#include DOF2
#define DINI_CONVERT
And you can work with better system like when you worked with Dini. Good, or not? You have only to add
Код:
public OnGameModeInit()
{
DOF2_Exit();
}
That's all.
Re: Vehicle Ownership System: Converting from DINI multi-file to single-file or database? -
Mike861 - 04.04.2018
If your code is too big for converting, you may use Dini2.Its not a bad system works well for me now.