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
Reset Scoreboard - Command
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="Altercationz" data-source="post: 450106" data-attributes="member: 59038"><p>You're only updating the score within the database which is why it's not updating until you reset the emulator.</p><p>Assuming you're using a version of plus emulator, go into the InteractorScoreboard.cs it resets the score if it is pending a reset.</p><p>You can add a method within there and call it up in your command and also delete it from the database at the same time.</p><p></p><p>I made this for you but I don't have time to test it, but fiddle around with it and make it work for your emulator.</p><p></p><p>The method should look something like this,</p><p></p><p>[CODE]</p><p>public void ResetScoreboard(Item Item, bool HasRights)</p><p> {</p><p> if (!HasRights)</p><p> {</p><p> return;</p><p> }</p><p></p><p> int ResetValue = 0;</p><p> if (!int.TryParse(Item.ExtraData, out ResetValue))</p><p> {</p><p> }</p><p> if (Item.pendingReset)</p><p> {</p><p> Item.ExtraData = ResetValue.ToString();</p><p> Item.UpdateState();</p><p> }</p><p> else</p><p> {</p><p> return;</p><p> }</p><p> }[/CODE]</p><p></p><p>Goodluck and that's a good idea for a command.</p></blockquote><p></p>
[QUOTE="Altercationz, post: 450106, member: 59038"] You're only updating the score within the database which is why it's not updating until you reset the emulator. Assuming you're using a version of plus emulator, go into the InteractorScoreboard.cs it resets the score if it is pending a reset. You can add a method within there and call it up in your command and also delete it from the database at the same time. I made this for you but I don't have time to test it, but fiddle around with it and make it work for your emulator. The method should look something like this, [CODE] public void ResetScoreboard(Item Item, bool HasRights) { if (!HasRights) { return; } int ResetValue = 0; if (!int.TryParse(Item.ExtraData, out ResetValue)) { } if (Item.pendingReset) { Item.ExtraData = ResetValue.ToString(); Item.UpdateState(); } else { return; } }[/CODE] Goodluck and that's a good idea for a command. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Reset Scoreboard - Command
Top