SA-MP Forums Archive
User Saving Data - 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: User Saving Data (/showthread.php?tid=506234)



User Saving Data - andyandyy8 - 12.04.2014

Good morning!
I have a little question about user saving data.How is more efficient?
Updating database every 30 miuntes or updating when player is using command(/givemoney,updates money) ?


Re: User Saving Data - Ada32 - 12.04.2014

onplayerdisconnect.


Re: User Saving Data - gtakillerIV - 12.04.2014

I'd say updating it each 30 minutes. You could use OnPlayerDisconnect, though.. Way better. Imagine a busy server where alot of people are buying weapons each time, that'd be so inefficient. And saving each 30 minutes is not preferred either. What happens if a player gains money and then leaves before the 30 minute save timer? He'll lose status and then come complaining at your forum.


Re: User Saving Data - andyandyy8 - 12.04.2014

What happen if the server crash ?
OnPlayerDisconnect isn't called...