Posts: 366
Threads: 113
Joined: Feb 2014
30.12.2014, 02:41
(
Последний раз редактировалось Arxalan; 30.12.2014 в 03:02.
Причина: Solved , Next question
)
Hello , i need help with the following command . Will somebody tell me what is 60*60*24*7?
PHP код:
User[playerid][ExpirationVIP] = gettime() + 60*60*24*7;
Posts: 303
Threads: 27
Joined: Aug 2013
Reputation:
0
7-days
24-hours
60-minutes
60-seconds
It's converting a week's time to seconds
Posts: 366
Threads: 113
Joined: Feb 2014
Following is my Command for Buying VIP
PHP код:
if(pp >= 50)
{
if(User[playerid][accountVIP] == 1) return SendClientMessage(playerid, -1, ""red"[PREMIUM] "white"You already have VIP.");
User[playerid][accountPP] -= 50;
User[playerid][accountVIP] = 1;
User[playerid][ExpirationVIP] = gettime() + 60*60*24*7;
SendClientMessage(playerid, -1, ""red"[PREMIUM] "white"You have bought the VIP, Now you have access to VIP stuffs, It will expire in the 7th day.");
format(string3, sizeof(string3), ""red"[PREMIUM] "white"You have spent "grey"50 PP "white"for this item, You have "grey"%d "white"remaining PP.", User[playerid][accountPP]);
SendClientMessage(playerid, -1, string3);
format(string3, 128, "%s has bought the Very Important Person Item from the Premium Shop, Expiration date is 7 days.", GetName(playerid));
Log("premium.txt", string3);
}
else
{
cmd_premiumshop(playerid, "");
SendClientMessage(playerid, -1, ""red"[PREMIUM] "white"You do not have 50 PP to buy this item.");
}
as it have 7 days to expire but it expires after relogging 2 or 3 times and also OnPlayerDisconnect don't have command to save it . Please give me the code to save it after disconnection.