31.01.2014, 03:41
Quote:
Hi, I am trying to make a VIP System which automatically removes the player's VIP Subscription after specific period of time. The command which sets the player a VIP Member will take two parameters, playerid, and vip level. On each level there will be specific month VIP Subscription and player will stop availing once it's past the time period, without any admin physically removing it.
I hope my question explained well enough. |
getdate() returns the amount of days since the start of the current year, store that variable in wherever the player stats are saved.
You can do for example getdate()+30 (current day + 30 days) whenever the player is set to a vip, and then when the player logins, check if the current day is higher or equal than the stored days. That would mean that the expiration date of thirthy days has been reached and then proceed to remove the VIP level.
This would, however, expire all accounts after the 31st of december of every year unless you go into making some maths. In such case you can use timestamps ...