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
PlusEMU :removebadge
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="AlexstyleRetro" data-source="post: 448687" data-attributes="member: 78825"><p>Hi Devbest, I have a problem with the :removebadge of my emulator (base Plus)</p><p></p><p>This is code of TakeBadgeCommand.cs</p><p>[PHP]</p><p>using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Collections.Generic;</p><p>using Quasar.Communication.Packets.Outgoing.Rooms.Notifications;</p><p></p><p>using Quasar.HabboHotel.GameClients;</p><p></p><p>namespace Quasar.HabboHotel.Rooms.Chat.Commands.Personeel</p><p>{</p><p> class TakeBadgeCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_removebadge"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return "+ username + codice"; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Rimuovi un badge ad un utente"; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> if (Params.Length != 3)</p><p> {</p><p> Session.SendWhisper("Inserisci il nome dell'utente a cui vuoi rimuovere l'username e il codice del badge!");</p><p> return;</p><p> }</p><p></p><p> GameClient TargetClient = QuasarEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);</p><p> if (TargetClient != null)</p><p> {</p><p> if (!TargetClient.GetHabbo().GetBadgeComponent().HasBadge(Params[2]))</p><p> {</p><p> TargetClient.GetHabbo().GetBadgeComponent().RemoveBadge(Params[2]);</p><p> if (TargetClient.GetHabbo().Id != Session.GetHabbo().Id)</p><p> TargetClient.SendWhisper("Ti è stato rimosso il badge " + Params[2] + "!");</p><p> else</p><p> Session.SendWhisper("Hai rimosso correttamente il badge " + Params[2] + " a " + Params[1] + "!");</p><p> }</p><p> else</p><p> Session.SendWhisper("Questo utente non ha il distintivo " + Params[2] +"");</p><p> return;</p><p> }</p><p> else</p><p> {</p><p> Session.SendWhisper("Utente non trovato!");</p><p> return;</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/PHP]</p><p></p><p>the problem is that when I try to remove a badge it says "This user does not have this badge" but this is not true.</p><p>Where is a problem? Thanks! <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="AlexstyleRetro, post: 448687, member: 78825"] Hi Devbest, I have a problem with the :removebadge of my emulator (base Plus) This is code of TakeBadgeCommand.cs [PHP] using System; using System.Linq; using System.Text; using System.Collections.Generic; using Quasar.Communication.Packets.Outgoing.Rooms.Notifications; using Quasar.HabboHotel.GameClients; namespace Quasar.HabboHotel.Rooms.Chat.Commands.Personeel { class TakeBadgeCommand : IChatCommand { public string PermissionRequired { get { return "command_removebadge"; } } public string Parameters { get { return "+ username + codice"; } } public string Description { get { return "Rimuovi un badge ad un utente"; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length != 3) { Session.SendWhisper("Inserisci il nome dell'utente a cui vuoi rimuovere l'username e il codice del badge!"); return; } GameClient TargetClient = QuasarEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient != null) { if (!TargetClient.GetHabbo().GetBadgeComponent().HasBadge(Params[2])) { TargetClient.GetHabbo().GetBadgeComponent().RemoveBadge(Params[2]); if (TargetClient.GetHabbo().Id != Session.GetHabbo().Id) TargetClient.SendWhisper("Ti è stato rimosso il badge " + Params[2] + "!"); else Session.SendWhisper("Hai rimosso correttamente il badge " + Params[2] + " a " + Params[1] + "!"); } else Session.SendWhisper("Questo utente non ha il distintivo " + Params[2] +""); return; } else { Session.SendWhisper("Utente non trovato!"); return; } } } } [/PHP] the problem is that when I try to remove a badge it says "This user does not have this badge" but this is not true. Where is a problem? Thanks! :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
PlusEMU :removebadge
Top