Mini Help
#1

Please do anyone know how to count 1 Month From Today's Date (getdate(blabla,blabla,blabla)) and after that month something ............. will expire or happen for the player when he connect (OnPlayerConnect) please help
Reply
#2

60 seconds = 1 minute
60 minutes = 1 hour
24 hours = 1 day

60 * 60 * 24 = 86400 seconds a day
86400 * 30 (days) = 2592000 seconds
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
60 seconds = 1 minute
60 minutes = 1 hour
24 hours = 1 day

60 * 60 * 24 = 86400 seconds a day
86400 * 30 (days) = 2592000 seconds
please example code i tried to make code but i still don't understand how to detect if today will expire his warning
Reply
#4

pawn Код:
new expire_at = gettime() + 2592000;
Save it and when a player connects, read the value and compare:
pawn Код:
if (gettime() >= expire_date)
{
    // it has been expired
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)