05.04.2013, 14:11
So I have two problems, both have to do with dates but not working correctly.
First part, This is what should show the day/month of the day/month.
code of line i use.
What i see
Now the second part.
This should get the date then add how many days of VIP they have.
Where this is being used.
[code] if(PlayerInfo[playerid][pVIP]) format(string, sizeof(string), "VIP Expiration: %d/%d/2013", PlayerInfo[playerid][pVIPMonth], PlayerInfo[playerid][pVIPDay]);
SendClientMessage(playerid, COLOR_VIP, string);[/calc]
What I see.
Please help me ASAP
First part, This is what should show the day/month of the day/month.
Код:
// Calculating new Month, Day; getdate(Month, Day); { new ActualDay; PlayerInfo[playerb][pIDay] = ActualDay; PlayerInfo[playerb][pIMonth] = Month; PlayerInfo[playerb][pIDay] = Day; PlayerInfo[playerb][pIMonth] = Month; }
Код:
format(string, sizeof(string), "%s's statistics on American Roleplay - [%d/%d/2013]", RPN(playerb), PlayerInfo[playerid][pIMonth], PlayerInfo[playerid][pIDay]); SendClientMessage(playerid, COLOR_ORANGE, string);
Now the second part.
This should get the date then add how many days of VIP they have.
Код:
// Calculating new Year, Month, Day; new Hour, Minute, Second; gettime(Hour, Minute, Second); getdate(Year, Month, Day); if(Day+viptime >= 30) { new ActualDay; Month ++; ActualDay = viptime - (30-Day); PlayerInfo[playerb][pVIPDay] = ActualDay; PlayerInfo[playerb][pVIPMonth] = Month; PlayerInfo[playerb][pVIPHour] = Hour; } else { PlayerInfo[playerb][pVIPDay] = Day+viptime; PlayerInfo[playerb][pVIPMonth] = Month; PlayerInfo[playerb][pVIPHour] = Hour; }
[code] if(PlayerInfo[playerid][pVIP]) format(string, sizeof(string), "VIP Expiration: %d/%d/2013", PlayerInfo[playerid][pVIPMonth], PlayerInfo[playerid][pVIPDay]);
SendClientMessage(playerid, COLOR_VIP, string);[/calc]
What I see.
Please help me ASAP