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
Problem :flaguser
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="cammy" data-source="post: 447211" data-attributes="member: 46853"><p>This is mine, try using this.</p><p></p><p>[SPOILER="FlagUserCommand.cs"]</p><p>using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Collections.Generic;</p><p></p><p>using Emulator.HabboHotel.GameClients;</p><p>using Emulator.Communication.Packets.Outgoing.Handshake;</p><p></p><p>namespace Emulator.HabboHotel.Rooms.Chat.Commands.Moderator</p><p>{</p><p> class FlagUserCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_flaguser"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return "%username%"; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Forces the specified user to change their name."; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> if (Params.Length == 1)</p><p> {</p><p> Session.SendWhisper("Please enter the username you wish to flag.");</p><p> return;</p><p> }</p><p></p><p> GameClient TargetClient = HabboEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);</p><p> if (TargetClient == null)</p><p> {</p><p> Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online.");</p><p> return;</p><p> }</p><p></p><p> if (TargetClient.GetHabbo().GetPermissions().HasRight("mod_tool"))</p><p> {</p><p> Session.SendWhisper("You are not allowed to flag that user.");</p><p> return;</p><p> }</p><p> else</p><p> {</p><p> TargetClient.GetHabbo().LastNameChange = 0;</p><p> TargetClient.GetHabbo().ChangingName = true;</p><p> TargetClient.SendNotification("Please be aware that if your username is deemed as inappropriate, you will be banned without question.\r\rAlso note that Staff will NOT allow you to change your username again should you have an issue with what you have chosen.\r\rClose this window and click yourself to begin choosing a new username!");</p><p> TargetClient.SendMessage(new UserObjectComposer(TargetClient.GetHabbo()));</p><p> }</p><p></p><p> }</p><p> }</p><p>}</p><p></p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="cammy, post: 447211, member: 46853"] This is mine, try using this. [SPOILER="FlagUserCommand.cs"] using System; using System.Linq; using System.Text; using System.Collections.Generic; using Emulator.HabboHotel.GameClients; using Emulator.Communication.Packets.Outgoing.Handshake; namespace Emulator.HabboHotel.Rooms.Chat.Commands.Moderator { class FlagUserCommand : IChatCommand { public string PermissionRequired { get { return "command_flaguser"; } } public string Parameters { get { return "%username%"; } } public string Description { get { return "Forces the specified user to change their name."; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Please enter the username you wish to flag."); return; } GameClient TargetClient = HabboEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); if (TargetClient == null) { Session.SendWhisper("An error occoured whilst finding that user, maybe they're not online."); return; } if (TargetClient.GetHabbo().GetPermissions().HasRight("mod_tool")) { Session.SendWhisper("You are not allowed to flag that user."); return; } else { TargetClient.GetHabbo().LastNameChange = 0; TargetClient.GetHabbo().ChangingName = true; TargetClient.SendNotification("Please be aware that if your username is deemed as inappropriate, you will be banned without question.\r\rAlso note that Staff will NOT allow you to change your username again should you have an issue with what you have chosen.\r\rClose this window and click yourself to begin choosing a new username!"); TargetClient.SendMessage(new UserObjectComposer(TargetClient.GetHabbo())); } } } } [/SPOILER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Problem :flaguser
Top