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
[PLUS EMU] 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="Velaski" data-source="post: 401068" data-attributes="member: 61835"><p>Some guy on here coded it terribly wrong, and it made me sad so:</p><p></p><p>Add this in GameClientManager.cs</p><p>[PHP]</p><p> public void VIPAlert(string Message)</p><p> {</p><p> foreach (GameClient client in this.GetClients.ToList())</p><p> {</p><p> if (client == null || client.GetHabbo() == null)</p><p> continue;</p><p></p><p> if (client.GetHabbo().Rank < 1)</p><p> continue;</p><p></p><p> client.SendWhisper(Message);</p><p> }</p><p> }[/PHP]</p><p></p><p></p><p>VIP Alert command:</p><p>[PHP]class VIPACommand : IChatCommand</p><p> {</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 ".."; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "..."; }</p><p> }</p><p></p><p> public void Execute(HabboHotel.GameClients.GameClient Session, 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>if(Session.GetHabbo().Rank < 2)</p><p>{ Session.SendWhisper("You are not vip lalalla add ur own message cba"); return;</p><p>}</p><p></p><p> string Message = CommandManager.MergeParams(Params, 1);</p><p> PlusEnvironment.GetGame().GetClientManager().VIPAlert($"[VIP ALERT][{Session.GetHabbo().Username}] {Message}");</p><p> return;</p><p> }</p><p> }[/PHP]</p><p>And obviously register the command and add the permissions.</p><p>Can someone test this for me because I'm not sure if it works. (Coding criticisms please, benefits us all)</p><p></p><p>- Added a if statement to determine whether the player is above rank two.</p></blockquote><p></p>
[QUOTE="Velaski, post: 401068, member: 61835"] Some guy on here coded it terribly wrong, and it made me sad so: Add this in GameClientManager.cs [PHP] public void VIPAlert(string Message) { foreach (GameClient client in this.GetClients.ToList()) { if (client == null || client.GetHabbo() == null) continue; if (client.GetHabbo().Rank < 1) continue; client.SendWhisper(Message); } }[/PHP] VIP Alert command: [PHP]class VIPACommand : IChatCommand { public string PermissionRequired { get { return "command_vipalert"; } } public string Parameters { get { return ".."; } } public string Description { get { return "..."; } } public void Execute(HabboHotel.GameClients.GameClient Session, Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Please enter a message to send."); return; } if(Session.GetHabbo().Rank < 2) { Session.SendWhisper("You are not vip lalalla add ur own message cba"); return; } string Message = CommandManager.MergeParams(Params, 1); PlusEnvironment.GetGame().GetClientManager().VIPAlert($"[VIP ALERT][{Session.GetHabbo().Username}] {Message}"); return; } }[/PHP] And obviously register the command and add the permissions. Can someone test this for me because I'm not sure if it works. (Coding criticisms please, benefits us all) - Added a if statement to determine whether the player is above rank two. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[PLUS EMU] VIP Alert
Top