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 Releases
Server Releases
[PLUSEMU] VIP Teleport
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="MasterJiq" data-source="post: 400754" data-attributes="member: 69646"><p>Hello,</p><p></p><p>I am willing to release my first command (make by my own without requesting any help). This teleport function only can be used in your rooms or rooms that you have rights even the owner is not you.</p><p></p><p>VipTeleCommand.cs:</p><p>[CODE]using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Collections.Generic;</p><p></p><p>using Plus.HabboHotel.Rooms;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun</p><p>{</p><p> class VipTeleCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_viptele"; }</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 "The ability to teleport anywhere only in your room/if you have rights."; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);</p><p> if (User == null)</p><p> return;</p><p></p><p> if (Session.GetHabbo().Rank < 2)</p><p> {</p><p> Session.SendWhisper("Seems like you're not VIP. Please buy VIP before using special commands.");</p><p> return;</p><p> }</p><p></p><p> bool HasRights = false;</p><p> if (Room.CheckRights(Session, false, true))</p><p> HasRights = true;</p><p></p><p> if (!HasRights)</p><p> {</p><p> Session.SendWhisper("Seems like you're not owner of this room. Please request for right to teleport.");</p><p> return;</p><p> }</p><p></p><p> User.TeleportEnabled = !User.TeleportEnabled;</p><p> Room.GetGameMap().GenerateMaps();</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p></p><p>and then go to CommandManager.cs search for this:</p><p>[CODE]private void RegisterVIP() {[/CODE]</p><p>below that add this:</p><p>[CODE]this.Register("viptele", VipTeleCommand());[/CODE]</p><p></p><p>Done. Add this sql if you wan't to make it better (I think)</p><p>[CODE]INSERT INTO `permissions_commands` VALUES ('command_viptele', '2', '0');[/CODE]</p><p></p><p>Thanks.</p></blockquote><p></p>
[QUOTE="MasterJiq, post: 400754, member: 69646"] Hello, I am willing to release my first command (make by my own without requesting any help). This teleport function only can be used in your rooms or rooms that you have rights even the owner is not you. VipTeleCommand.cs: [CODE]using System; using System.Linq; using System.Text; using System.Collections.Generic; using Plus.HabboHotel.Rooms; using Plus.Communication.Packets.Outgoing.Rooms.Notifications; namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun { class VipTeleCommand : IChatCommand { public string PermissionRequired { get { return "command_viptele"; } } public string Parameters { get { return ""; } } public string Description { get { return "The ability to teleport anywhere only in your room/if you have rights."; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id); if (User == null) return; if (Session.GetHabbo().Rank < 2) { Session.SendWhisper("Seems like you're not VIP. Please buy VIP before using special commands."); return; } bool HasRights = false; if (Room.CheckRights(Session, false, true)) HasRights = true; if (!HasRights) { Session.SendWhisper("Seems like you're not owner of this room. Please request for right to teleport."); return; } User.TeleportEnabled = !User.TeleportEnabled; Room.GetGameMap().GenerateMaps(); } } } [/CODE] and then go to CommandManager.cs search for this: [CODE]private void RegisterVIP() {[/CODE] below that add this: [CODE]this.Register("viptele", VipTeleCommand());[/CODE] Done. Add this sql if you wan't to make it better (I think) [CODE]INSERT INTO `permissions_commands` VALUES ('command_viptele', '2', '0');[/CODE] Thanks. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[PLUSEMU] VIP Teleport
Top