SA-MP Forums Archive
Time Account Delete - 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: Time Account Delete (/showthread.php?tid=585888)



Time Account Delete - sampkinq - 17.08.2015

Hello, I want to delete the account is not entered within 15 days of their registration to the server. How can I do.

Sorry. My English bad.


Re: Time Account Delete - [KHK]Khalid - 17.08.2015

Use getdate(), store last login date (day, month and year) for each player, do some little math and compare it to the current date when you want to delete accounts.


Re: Time Account Delete - sampkinq - 17.08.2015

Quote:
Originally Posted by [KHK]Khalid
Посмотреть сообщение
Use getdate(), store last login date (day, month and year) for each player, do some little math and compare it to the current date when you want to delete accounts.
How do I make cleanup


Re: Time Account Delete - arad55 - 17.08.2015

Quote:
Originally Posted by sampkinq
Посмотреть сообщение
How do I make cleanup
Khalid just told you. Save their last login date with getdate() (or gettime() for easier calculations) when they log in, and make some function that calculates the current unix timestamp (https://sampforum.blast.hk/showthread.php?tid=254915) goes through all accounts and calculates if difference between the current timestamp and the last login timestamp is 1,296,000 (15 days). Then, do whatever you want with it.


Re: Time Account Delete - prineside - 17.08.2015

You can make it in many ways.
How do you keep account info? Is it a database or a simple line in file?


Re: Time Account Delete - sampkinq - 17.08.2015

Quote:
Originally Posted by prineside
Посмотреть сообщение
You can make it in many ways.
How do you keep account info? Is it a database or a simple line in file?
As a recording system <SII> I'm using.