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
EventAlert Command doesn't work
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="Pollak" data-source="post: 435198" data-attributes="member: 77990"><p>Try this:</p><p>[CODE]using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p>using Plus.HabboHotel.Rooms;</p><p>using Plus.HabboHotel.GameClients;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Engine;</p><p>using System.Linq;</p><p>using Plus.Communication.Packets.Outgoing.Inventory.Purse;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.Events</p><p>{</p><p> internal class EventAlertCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get</p><p> {</p><p> return "command_event_alert";</p><p> }</p><p> }</p><p> public string Parameters</p><p> {</p><p> get</p><p> {</p><p> return "%message%";</p><p> }</p><p> }</p><p> public string Description</p><p> {</p><p> get</p><p> {</p><p> return "Envoyer une alerte d'événement";</p><p> }</p><p> }</p><p> public void Execute(GameClient Session, Room Room, string[] Params)</p><p> {</p><p> if (Session != null)</p><p> {</p><p> if (Room != null)</p><p> {</p><p> if (Params.Length == 1)</p><p> {</p><p> Session.SendWhisper("S'il vous plaît entrer un message à envoyer.");</p><p> return;</p><p> }</p><p> foreach (GameClient client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList())</p><p> if (client.GetHabbo().AllowEvents == true)</p><p> {</p><p> string Message = CommandManager.MergeParams(Params, 1);</p><p></p><p> client.SendMessage(new RoomNotificationComposer("Un événement se produit!",</p><p> "Il y a un nouveau jeu joué par le personnel! <br><br>Ceci est destiné à fournir plus de divertissement pour les utilisateurs!<br><br>Événement:<b> " + Message +</p><p> "</b><br>Par:<b> " + Session.GetHabbo().Username +</p><p> "</b> <br><br>Si vous voulez participer, cliquez sur le bouton ci-dessous! <br><br>Si vous ne souhaitez pas être averti des événements, entrez cette commande<b> :alertes</b> !",</p><p> "events", "Participar do Evento", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));</p><p> }</p><p> else</p><p> client.SendWhisper("On dirait qu'il y a un nouvel événement dans notre hôtel. Pour réactiver les messages d'événement, tapez ;alertes", 1);</p><p></p><p> }</p><p> }</p><p> }</p><p> }</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="Pollak, post: 435198, member: 77990"] Try this: [CODE]using Plus.Communication.Packets.Outgoing.Rooms.Notifications; using Plus.HabboHotel.Rooms; using Plus.HabboHotel.GameClients; using Plus.Communication.Packets.Outgoing.Rooms.Engine; using System.Linq; using Plus.Communication.Packets.Outgoing.Inventory.Purse; namespace Plus.HabboHotel.Rooms.Chat.Commands.Events { internal class EventAlertCommand : IChatCommand { public string PermissionRequired { get { return "command_event_alert"; } } public string Parameters { get { return "%message%"; } } public string Description { get { return "Envoyer une alerte d'événement"; } } public void Execute(GameClient Session, Room Room, string[] Params) { if (Session != null) { if (Room != null) { if (Params.Length == 1) { Session.SendWhisper("S'il vous plaît entrer un message à envoyer."); return; } foreach (GameClient client in PlusEnvironment.GetGame().GetClientManager().GetClients.ToList()) if (client.GetHabbo().AllowEvents == true) { string Message = CommandManager.MergeParams(Params, 1); client.SendMessage(new RoomNotificationComposer("Un événement se produit!", "Il y a un nouveau jeu joué par le personnel! <br><br>Ceci est destiné à fournir plus de divertissement pour les utilisateurs!<br><br>Événement:<b> " + Message + "</b><br>Par:<b> " + Session.GetHabbo().Username + "</b> <br><br>Si vous voulez participer, cliquez sur le bouton ci-dessous! <br><br>Si vous ne souhaitez pas être averti des événements, entrez cette commande<b> :alertes</b> !", "events", "Participar do Evento", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId)); } else client.SendWhisper("On dirait qu'il y a un nouvel événement dans notre hôtel. Pour réactiver les messages d'événement, tapez ;alertes", 1); } } } } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
EventAlert Command doesn't work
Top