31.10.2013, 12:12
Hello I need a help with saving get time..
I'm using y_ini saving system.
Write in like this:
Or how.. so basically that's my question.
Oh and another question I want to set gettime to 2 days how can I do it...
I have made something like this:
I'm using y_ini saving system.
Write in like this:
pawn Код:
PlayerInfo[playerid][VET] = Gettime();
Oh and another question I want to set gettime to 2 days how can I do it...
I have made something like this:
pawn Код:
YCMD:vipstats(playerid, params[],help)
{
new TVT, Days, Hours, Minutes, Msg[200];
TVT = PlayerInfo[playerid][VET] - gettime();//here it will get the time stamp saved in the player variable
if (TVT>= 86400)
{
Days = TotalVipTime / 86400;
TVT= TVT- (Days * 86400);//here it calculates the days
}
if (TVT>= 3600)
{
Hours = TotalVipTime / 3600;
TVT = TVT- (Hours * 3600);//calculates the seconds
}
if (TVT >= 60)
{
Minutes = TVT / 60;
TVT = TVT - (Minutes * 60);//calculates the minutes
}
format(Msg, 200, "{00CED1}Remaining Vip: {FFFFFF}Days: {00A400}%i{FFFFFF}, Hours: {00A400}%i{FFFFFF}, Minutes: {00A400}%i{FFFFFF}\n", Days, Hours, Minutes);
SendClientMessage(playerid,-1,Msg);
return 1;
)

