Posts: 87
Threads: 3
Joined: Aug 2008
Reputation:
0
move the data save function out of OnGameModeExit
Ive no idea what data your trying to save but here are some examples:
SavePlayerData should be ran on OnPlayerDisconnect
SaveHouseData should be saved when any variable is changed about the house ( On Command or Dialog Usually )
And on Down the list ...
Posts: 39
Threads: 7
Joined: Jan 2010
Reputation:
0
Eh the thing is that is not related with player , its with vehicles.....(the things about vehicles etc (lot of infrmations save))
Posts: 1,079
Threads: 64
Joined: Jan 2010
Quote:
Originally Posted by [ST
Ivex ]
Eh the thing is that is not related with player , its with vehicles.....(the things about vehicles etc (lot of infrmations save))
|
maybe you could post your code, so people can see and fix the mistakes/slow thingies =D?
Posts: 39
Threads: 7
Joined: Jan 2010
Reputation:
0
I solved it....Its a bit faster now xD...i make mistake because I used fremove on saving file so dini has to delete whole file and create it again what has slow down gmx...now I do dini_exists and if that not true only than will create file else will only update variables what is much faster....tnx all ...
Lock this...
Posts: 6,129
Threads: 36
Joined: Jan 2009
Another better method of saving data would be using the RAW system, or an alternate that caches data and then writes...
Dini uses a method of opening the file, getting/writing the result and then closing it. DJSON and SII (two other good file-writing structures/includes) open, write/read all results then close, when instructed to. Using raw is more complicated.
Just thought I'd add this in, so you'll be able to improve the speed, even though you have resolved the prime "lag issue."