06.06.2018, 15:18
(
Последний раз редактировалось andrejc999; 07.06.2018 в 06:11.
)
So I made a /setvip command a long time ago and today I added the 30 day package thing, but I have a problem with formatting the days and hours that are left.
Here is my code:
I checked the code few times but I can't figure out what I did wrong.
It says that there are 12 days and 59 hours left, so am I blind or what?
Here is my code:
Код:
// this is just a part of my /stats command
if(pInfo[playerid][pVip] > 0)
{
new vtime = pInfo[playerid][pVipTime] - gettime(), days, hours, str[64];
vtime /= 60;
vtime /= 60;
hours = vtime % 60;
vtime /= 24;
days = vtime % 24;
format(str, sizeof(str), "{FFFF40}Remaining time:{FFFFFF}%i days, %i hours\n", days, hours);
strcat(string, str);
}
// The /setvip command
pInfo[id][pVipTime] = gettime() + 30*24*60*60;
It says that there are 12 days and 59 hours left, so am I blind or what?

