Premium account for a while
#1

How I can set the premium account for a limited time?
I want to set it up for 15 days for example...
Reply
#2

easy

use gettime()

new expiry=gettime()+(60*60*24*days);

when he login check days and expiry varaible compare with new time gettime()
Reply
#3

To set the expiry time by getting the present time (when setting VIP status):
pawn Код:
gettime () + (60*60*24*EXPIRES_IN_NO_OF_DAYS);
Once you do this, save this to the database or INI FILE (based on what system you're using)

To make it removed on the correct time:
[Pawn]
// On player Connect
pawn Код:
if (gettime () > THE_VAR_IN_WHICH_YOU_SAVED_THAT_TIMESTAMP)
{    
          // Remove those features now.
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)