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 Tutorials
[NEW COMMANDS] - OPEN ROOM, CLOSE ROOM
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="GarettM" data-source="post: 433369" data-attributes="member: 839"><p><strong>Here is the engwish version for the lazy <3 Google Translater</strong></p><p><strong></strong></p><p><strong>OpenRoomCommand.cs</strong></p><p>[CODE]</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p>using Plus.HabboHotel.GameClients;</p><p>using Plus.Communication.Packets.Outgoing.Inventory.Purse;</p><p>using System.Text;</p><p>using Plus.Communication.Packets.Outgoing.Notifications;</p><p>using Plus.Core;</p><p>using System;</p><p>using Plus.Database.Interfaces;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator</p><p>{</p><p> class OpenRoomCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_openroom"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return ""; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Unlocks the current room"; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> var room = Session.GetHabbo().CurrentRoom;</p><p> room.Access = RoomAccess.OPEN;</p><p> room.RoomData.Access = RoomAccess.OPEN;</p><p> using (var queryReactor = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> queryReactor.runFastQuery(string.Format("UPDATE rooms SET state = 'open' WHERE id = {0}",</p><p> room.RoomId));</p><p></p><p> Session.SendMessage(new RoomAlertComposer("The room has been unlocked successfully!"));</p><p> Session.SendWhisper("The room has been unlocked");</p><p> }</p><p> }</p><p> }</p><p>}[/CODE]</p><p></p><p><strong>CloseRoomCommand.cs</strong></p><p>[CODE]using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p>using Plus.HabboHotel.GameClients;</p><p>using Plus.Communication.Packets.Outgoing.Inventory.Purse;</p><p>using System.Text;</p><p>using Plus.Communication.Packets.Outgoing.Notifications;</p><p>using Plus.Core;</p><p>using System;</p><p>using Plus.Database.Interfaces;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator</p><p>{</p><p> class CloseRoomCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_closeroom"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return ""; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Locks the current room"; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> var room = Session.GetHabbo().CurrentRoom;</p><p> room.Access = RoomAccess.DOORBELL;</p><p> room.RoomData.Access = RoomAccess.DOORBELL;</p><p> using (var queryReactor = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> queryReactor.runFastQuery(string.Format("UPDATE rooms SET state = 'locked' WHERE id = {0}",</p><p> room.RoomId));</p><p> </p><p> Session.SendMessage(new RoomAlertComposer("The room has been locked successfully!"));</p><p> Session.SendWhisper("The room has been locked");</p><p> }</p><p> }</p><p> }</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="GarettM, post: 433369, member: 839"] [B]Here is the engwish version for the lazy <3 Google Translater OpenRoomCommand.cs[/B] [CODE] using Plus.Communication.Packets.Outgoing.Rooms.Notifications; using Plus.HabboHotel.GameClients; using Plus.Communication.Packets.Outgoing.Inventory.Purse; using System.Text; using Plus.Communication.Packets.Outgoing.Notifications; using Plus.Core; using System; using Plus.Database.Interfaces; namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator { class OpenRoomCommand : IChatCommand { public string PermissionRequired { get { return "command_openroom"; } } public string Parameters { get { return ""; } } public string Description { get { return "Unlocks the current room"; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { var room = Session.GetHabbo().CurrentRoom; room.Access = RoomAccess.OPEN; room.RoomData.Access = RoomAccess.OPEN; using (var queryReactor = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) queryReactor.runFastQuery(string.Format("UPDATE rooms SET state = 'open' WHERE id = {0}", room.RoomId)); Session.SendMessage(new RoomAlertComposer("The room has been unlocked successfully!")); Session.SendWhisper("The room has been unlocked"); } } } }[/CODE] [B]CloseRoomCommand.cs[/B] [CODE]using Plus.Communication.Packets.Outgoing.Rooms.Notifications; using Plus.HabboHotel.GameClients; using Plus.Communication.Packets.Outgoing.Inventory.Purse; using System.Text; using Plus.Communication.Packets.Outgoing.Notifications; using Plus.Core; using System; using Plus.Database.Interfaces; namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator { class CloseRoomCommand : IChatCommand { public string PermissionRequired { get { return "command_closeroom"; } } public string Parameters { get { return ""; } } public string Description { get { return "Locks the current room"; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { var room = Session.GetHabbo().CurrentRoom; room.Access = RoomAccess.DOORBELL; room.RoomData.Access = RoomAccess.DOORBELL; using (var queryReactor = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) queryReactor.runFastQuery(string.Format("UPDATE rooms SET state = 'locked' WHERE id = {0}", room.RoomId)); Session.SendMessage(new RoomAlertComposer("The room has been locked successfully!")); Session.SendWhisper("The room has been locked"); } } } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Tutorials
[NEW COMMANDS] - OPEN ROOM, CLOSE ROOM
Top