Posts: 6,129
Threads: 36
Joined: Jan 2009
Quote:
Originally Posted by TwinkiDaBoss
Okay now I have those 2 milion seconds, and I compare it with getdate?
|
I have just shown you.
pawn Код:
pInfo[playerid][VIPDays] = (getdate() + (86400 * 31)); // This is how you give the player 31 days.
if(pInfo[playerid][VIPDays] < getdate()) { // This is how you check if the VIP timestamp was in the past, or is in the future
}
Remember, getdate() gives you the current timestamp. The value of
pInfo[playerid][VIPDays] will be behind getdate() in 31 days, the number in getdate() changes every second but
pInfo[playerid][VIPDays] will stay the same, eventually getdate() will be a larger number than
pInfo[playerid][VIPDays] so when you run a check using if(), it will tell you that getdate() is a larger number.
Quote:
Originally Posted by TwinkiDaBoss
Also how could I format it to tell player how many days he has left?
|
SickAttack has given you a good example, check how he's used the custom ConvertToTime function.