VIP days, looking for code check & explanation
#7

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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)