SA-MP Forums Archive
Ammount of players registered - 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: Ammount of players registered (/showthread.php?tid=315921)



Ammount of players registered - geerdinho8 - 04.02.2012

How can I get the ammount of players that registered, I mean like this:

Player121 has registered an account(Registered accounts: 145)

Do you get me, just give me an example if you can

Thank you, you'll be repped.


Re: Ammount of players registered - Face9000 - 04.02.2012

What registration system u use?So i can help you.


Re: Ammount of players registered - MP2 - 04.02.2012

If you're using mySQL, run this query, store the result then use mysql_num_rows:

SELECT * FROM [name of table which contains accounts]

If you're not using mySQL, you'll have to make a variable that increases when a player is registered, that gets saved to a file.


Re: Ammount of players registered - Chris White - 04.02.2012

You can make a file that holds a value, at which when a player registers, the value is read from the file, increased by one, then saved again to the file.


Re: Ammount of players registered - Babul - 04.02.2012

if the userdata gets saved into files (1 file per user in a directory), then its a piece of cake to count all files, using the Directory 2 plugin.