Premium account for a while - 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: Premium account for a while (
/showthread.php?tid=606982)
Premium account for a while -
Hazliu - 12.05.2016
How I can set the premium account for a limited time?
I want to set it up for 15 days for example...
Re: Premium account for a while -
MBilal - 12.05.2016
easy
use gettime()
new expiry=gettime()+(60*60*24*days);
when he login check days and expiry varaible compare with new time gettime()
Re: Premium account for a while -
biker122 - 13.05.2016
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.
}