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 Alert
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: 400756" data-attributes="member: 69646"><p>Hello,</p><p></p><p>this is my second command that I make it by my own, so who have rank same to '2' or above '2' will receive this message as Hotel Alert. This is easy to code but I am not gonna wasting my time by doing the things that will make nothing to me.</p><p></p><p>VipAlertCommand.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.Communication.Packets.Outgoing.Moderation;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun</p><p>{</p><p> class VipAlertCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_vipalert"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return "%message%"; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Send a message to all users who has VIP."; }</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 a message to send.");</p><p> return;</p><p> }</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> if (Session.GetHabbo().Rank >= 2)</p><p> {</p><p> string Message = CommandManager.MergeParams(Params, 1);</p><p> PlusEnvironment.GetGame().GetClientManager().SendMessage(new BroadcastMessageAlertComposer(Message + "\r\n" + "- " + Session.GetHabbo().Username));</p><p></p><p> return;</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p></p><p>Then go to CommandManager.cs and search for:</p><p>[CODE]private void RegisterVIP() {[/CODE]</p><p>and below that add this:</p><p>[CODE]this.Register("vipalert", VipAlertCommand());[/CODE]</p><p></p><p>After that run this SQL:</p><p>[CODE]INSERT INTO `permissions_commands` VALUES ('command_vipalert', '2', '0');[/CODE]</p><p></p><p>Thanks.</p><p>[doublepost=1487685119,1487685024][/doublepost]I think in the last return would be '<strong>return true;</strong>' ?</p></blockquote><p></p>
[QUOTE="MasterJiq, post: 400756, member: 69646"] Hello, this is my second command that I make it by my own, so who have rank same to '2' or above '2' will receive this message as Hotel Alert. This is easy to code but I am not gonna wasting my time by doing the things that will make nothing to me. VipAlertCommand.cs: [CODE]using System; using System.Linq; using System.Text; using System.Collections.Generic; using Plus.Communication.Packets.Outgoing.Moderation; namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun { class VipAlertCommand : IChatCommand { public string PermissionRequired { get { return "command_vipalert"; } } public string Parameters { get { return "%message%"; } } public string Description { get { return "Send a message to all users who has VIP."; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Please enter a message to send."); return; } if (Session.GetHabbo().Rank < 2) { Session.SendWhisper("Seems like you're not VIP. Please buy VIP before using special commands."); return; } if (Session.GetHabbo().Rank >= 2) { string Message = CommandManager.MergeParams(Params, 1); PlusEnvironment.GetGame().GetClientManager().SendMessage(new BroadcastMessageAlertComposer(Message + "\r\n" + "- " + Session.GetHabbo().Username)); return; } } } } [/CODE] Then go to CommandManager.cs and search for: [CODE]private void RegisterVIP() {[/CODE] and below that add this: [CODE]this.Register("vipalert", VipAlertCommand());[/CODE] After that run this SQL: [CODE]INSERT INTO `permissions_commands` VALUES ('command_vipalert', '2', '0');[/CODE] Thanks. [doublepost=1487685119,1487685024][/doublepost]I think in the last return would be '[B]return true;[/B]' ? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[PLUSEMU] VIP Alert
Top