Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[PLUS] Achievement
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Damien" data-source="post: 395005" data-attributes="member: 72299"><p>Take a look in the file "ProcessComponent.cs", and take a look at how respects our given to the users each day.</p><p></p><p>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.</p><p></p><p>I'm not going to spoon feed you but he's some information that'll help you achieve your goal.</p><p></p><p></p><p>Used to get the previous date to string:</p><p>[CODE]</p><p>DateTime.Today.AddDays(-1).ToString("dd/MM/yyyy")</p><p>[/CODE]</p><p></p><p></p><p>Used to get the date between two DateTimes (use this for the duration achievement to calculate when the user was last on):</p><p>[CODE]</p><p>DateTime dt1 = DateTime.Today;</p><p>DateTime dt2 = DateTime.ParseExact("10/01/2017", "dd/MM/yyyy", CultureInfo.InvariantCulture);</p><p>int daysToAdd = (int)dt1.Subtract(dt2).TotalDays;</p><p>[/CODE]</p><p></p><p>Peace!</p></blockquote><p></p>
[QUOTE="Damien, post: 395005, member: 72299"] 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") [/CODE] 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; [/CODE] Peace! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[PLUS] Achievement
Top