[PLUS] Achievement

Linxon

IzyHosting.com
Mar 28, 2015
104
8
Hello,
I have a problem with the 5% Real Habbo I achievement
I dont know how to fix it.
Can anyone tell me?
 

Damien

Don't need glasses if you can C#
Feb 26, 2012
434
647
Take a look in the file "ProcessComponent.cs", and take a look at how respects our given to the users each day.

You'll want to create something similar to that system, or do what I did and recycle the code into one check. Progress the duration achievement every day, and for the login streak do a check to see if the user was last logged in yesterday otherwise reset it.

I'm not going to spoon feed you but he's some information that'll help you achieve your goal.


Used to get the previous date to string:
Code:
DateTime.Today.AddDays(-1).ToString("dd/MM/yyyy")


Used to get the date between two DateTimes (use this for the duration achievement to calculate when the user was last on):
Code:
DateTime dt1 = DateTime.Today;
DateTime dt2 = DateTime.ParseExact("10/01/2017", "dd/MM/yyyy", CultureInfo.InvariantCulture);
int daysToAdd = (int)dt1.Subtract(dt2).TotalDays;

Peace!
 

Linxon

IzyHosting.com
Mar 28, 2015
104
8
Take a look in the file "ProcessComponent.cs", and take a look at how respects our given to the users each day.

You'll want to create something similar to that system, or do what I did and recycle the code into one check. Progress the duration achievement every day, and for the login streak do a check to see if the user was last logged in yesterday otherwise reset it.

I'm not going to spoon feed you but he's some information that'll help you achieve your goal.


Used to get the previous date to string:
Code:
DateTime.Today.AddDays(-1).ToString("dd/MM/yyyy")


Used to get the date between two DateTimes (use this for the duration achievement to calculate when the user was last on):
Code:
DateTime dt1 = DateTime.Today;
DateTime dt2 = DateTime.ParseExact("10/01/2017", "dd/MM/yyyy", CultureInfo.InvariantCulture);
int daysToAdd = (int)dt1.Subtract(dt2).TotalDays;

Peace!
Hey,
Thanks for helping me on the way, Damiens!
 

Users who are viewing this thread

Top