SA-MP Forums Archive
mysql save - 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: mysql save (/showthread.php?tid=571401)



mysql save - iBots - 18.04.2015

which is better for saving in mysql,to save the item after editing anything in it,or saving them all when the servers restarts and one per 5 minutes?which is faster and better?


Re: mysql save - Sledgehammer - 18.04.2015

I'd say saving after a user has finished a process maybe less hass and more efficient. Though, I suggest saving a users posistion, or anything related to that under OnPlayerDisconnect (or/ and every 5 minutes just incase your server crashes for what-ever reason!).


Re: mysql save - Jimmy0wns - 18.04.2015

I save all player's stats every minute in case the server crashes for whatever reason. But if you're changing the player's stats, you should save the them straight after the task was finished.