SA-MP Forums Archive
Accounts Count [ Help ] - 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: Accounts Count [ Help ] (/showthread.php?tid=391669)



Accounts Count [ Help ] - RaZzZzoR - 11.11.2012

I use Y_INI to save my players accounts and i wanna make something like:
Sa-mp.Com has registered and now are x accounts registered
how to make that red thing ?


Re: Accounts Count [ Help ] - SKAzini - 11.11.2012

Make a file in which has a variable, named eg. RegisteredPlayerAmount and add one to that value every register.
Example:

pawn Код:
GlobalInfo[RegisteredPlayAmount]++;
//Or
GlobalInfo[RegisteredPlayAmount] += 1;



Re: Accounts Count [ Help ] - Johnson_boy - 12.11.2012

The solution above works (you should add the number of currently registered accounts
there manually though), but if you want to use your data effectively, you should consider
changing to MySQL.

With MySQL you could use just "SELECT COUNT(*) FROM `table`" and that's it. Also if you
are planning on ever accessing the data for instance from a website, MySQL is significantly
better option.