A little help please.
#1

Hello there, I made a /buypackage command which players can buy VIP packages with it. So i wanted to know how can i make the package last for only 30 days. I mean when the player buys the package, they lose it in 30 days. Just dunno how to make a timer for 30 days, can someone help me please?
Reply
#2

Use TimeStamp to store the time like 30 and then make a timer and check like:

pawn Код:
if(PlayerInfo[playerid][pVipEndsAt] == gettime())
{
    //Do something here
}
And if you get something wrong ask here.

And there is some few tutorials for that.
Reply
#3

Use gettime(); (with no params) to return seconds passed from 1970 and store it to a var1. Then use the same function but do like this: gettime()+2592000 (2592000 seconds are 30 days) and store it to var2. Then if gettime() >= var2, take away package.
Reply
#4

Do you have a link of the tutorial?
Reply
#5

Quote:
Originally Posted by kamiliuxliuxliux
Посмотреть сообщение
Use gettime(); (with no params) to return seconds passed from 1970 and store it to a var1. Then use the same function but do like this: gettime()+2592000 (2592000 seconds are 30 days) and store it to var2. Then if gettime() >= var2, take away package.
That one helped, thanks dude really helped me, +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)