View Full Version : Mysql saving accounts.

08/03/2013, 12:28 PM
I'm changing my gamemode to mysql and i was wondering how to do the save of accounts ...

1.Keep the OnPlayerUpdateEx that saves ALL player data when player disconnects ...


2.When a value it's changed i update the DB ... this will take me a lot more time .

I want to know which solution is better , i mean which is faster and will not make lag or any things like this.

08/03/2013, 01:06 PM
That depends on how your script works. If you only have really small updates (like once in 10 minutes you update a value that is saved in the DB) then go with option 2.

If your script alters all the values on a regular basis then use option 1

08/03/2013, 01:18 PM
My GameMode is RolePlay ... and if i would have to update db every time i change a playerdata variable i should do this in like 200-300+ places ... And i want to know id i do the save on player disconnect of all the variables(~ 150 player variables) i was wondering if that would not create lag ... and like how much time will that OnPlayerUpdate take (ms/s)