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
Help command :dice plus emulator
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="CricketHotel18" data-source="post: 450373" data-attributes="member: 86659"><p>Could someone help me solve the command :dice at the moment of putting the number does not work, random numbers come out.</p><p></p><p>[SPOILER="The code that I have is"]</p><p>using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Collections.Generic;</p><p>using Slopt.HabboHotel.GameClients;</p><p></p><p>namespace Slopt.HabboHotel.Rooms.Chat.Commands.Administrator</p><p>{</p><p> class ForceDiceCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "user_16"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return "%number%"; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Allows you to carry a hand item"; }</p><p> }</p><p></p><p> public void Execute(GameClient Session, Room Room, string[] Params)</p><p> {</p><p> if (Params.Length == 1)</p><p> {</p><p> Session.SendWhisper("Debes colocar una cifra para que salga en el dado de 1 a 6.");</p><p> return;</p><p> }</p><p></p><p> GameClient Target = SloptEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);</p><p> if (Target == null)</p><p> {</p><p> Session.SendWhisper("¡Oops, no se ha conseguido este usuario!");</p><p> return;</p><p> }</p><p></p><p> int Number;</p><p> if (!int.TryParse(Params[2], out Number))</p><p> {</p><p> Session.SendWhisper("Porfavor introduce un número válido.");</p><p> return;</p><p> }</p><p></p><p> if(Number > 6 || Number < 1)</p><p> {</p><p> Session.SendWhisper("La cifra debe estar entre 1 y 6.");</p><p> return;</p><p> }</p><p></p><p> Target.GetHabbo().RigDice = true;</p><p> Target.GetHabbo().DiceNumber = Number;</p><p> Session.SendWhisper("Acabas de activar el número " + Number + " para que salga en los dados de " + Target.GetHabbo().Username + ".");</p><p> }</p><p> }</p><p>}</p><p></p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="CricketHotel18, post: 450373, member: 86659"] Could someone help me solve the command :dice at the moment of putting the number does not work, random numbers come out. [SPOILER="The code that I have is"] using System; using System.Linq; using System.Text; using System.Collections.Generic; using Slopt.HabboHotel.GameClients; namespace Slopt.HabboHotel.Rooms.Chat.Commands.Administrator { class ForceDiceCommand : IChatCommand { public string PermissionRequired { get { return "user_16"; } } public string Parameters { get { return "%number%"; } } public string Description { get { return "Allows you to carry a hand item"; } } public void Execute(GameClient Session, Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Debes colocar una cifra para que salga en el dado de 1 a 6."); return; } GameClient Target = SloptEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (Target == null) { Session.SendWhisper("¡Oops, no se ha conseguido este usuario!"); return; } int Number; if (!int.TryParse(Params[2], out Number)) { Session.SendWhisper("Porfavor introduce un número válido."); return; } if(Number > 6 || Number < 1) { Session.SendWhisper("La cifra debe estar entre 1 y 6."); return; } Target.GetHabbo().RigDice = true; Target.GetHabbo().DiceNumber = Number; Session.SendWhisper("Acabas de activar el número " + Number + " para que salga en los dados de " + Target.GetHabbo().Username + "."); } } } [/SPOILER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Help command :dice plus emulator
Top