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
EventAlent Command Anyone help me to coding this command
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="mattiagenova" data-source="post: 382825" data-attributes="member: 69220"><p>[USER=67932]@iaezzz[/USER] try this <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></p><p></p><p>[CODE]</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p>using Plus.HabboHotel.GameClients;</p><p></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 "Send alert for Events - Game";</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("Write a message pls.");</p><p> return;</p><p> }</p><p> else</p><p> {</p><p> string Message = CommandManager.MergeParams(Params, 1);</p><p></p><p></p><p> PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Messaggio dallo Staff!",</p><p> "Il membro dello STAFF <b>" + Session.GetHabbo().Username +</p><p> "</b> ti invita all'evento - game che si chiama <b>" + Message +</p><p> "</b> <br><br> Clicca il seguente bottone per partecipare:",</p><p> "events", "Partecipa!", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));</p><p> }</p><p> }</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("Invalid command! :eventalert", 0);</p><p> }</p><p> else if (!PlusEnvironment.Event)</p><p> {</p><p> PlusEnvironment.GetGame().GetClientManager().SendMessage(new BroadcastMessageAlertComposer(":follow " + Session.GetHabbo().Username + " for events! win prizes!\r\n- " + Session.GetHabbo().Username, ""), "");</p><p> PlusEnvironment.lastEvent = DateTime.Now;</p><p> PlusEnvironment.Event = true;</p><p> }</p><p> else</p><p> {</p><p> TimeSpan timeSpan = DateTime.Now - PlusEnvironment.lastEvent;</p><p> if (timeSpan.Hours >= 1)</p><p> {</p><p> PlusEnvironment.GetGame().GetClientManager().SendMessage(new BroadcastMessageAlertComposer(":follow " + Session.GetHabbo().Username + " for events! win prizes!\r\n- " + Session.GetHabbo().Username, ""), "");</p><p> PlusEnvironment.lastEvent = DateTime.Now;</p><p> }</p><p> else</p><p> {</p><p> int num = checked(60 - timeSpan.Minutes);</p><p> Session.SendWhisper("Event Cooldown! " + num + " minutes left until another event can be hosted.", 0);</p><p> }</p><p> }</p><p> }</p><p> }</p><p> }*/</p><p> }</p><p>}</p><p>[/CODE]</p><p></p><p>Small Giude:</p><p>1. Open EventAlertCommand.cs and replace the code whit my</p><p>2. Save and start whit debug mode</p><p></p><p>Done, now the command :eventalert or :eha is fix</p><p></p><p>Edit this in your lenguage [CODE]PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Messaggio dallo Staff!",</p><p> "Il membro dello STAFF <b>" + Session.GetHabbo().Username +</p><p> "</b> ti invita all'evento - game che si chiama <b>" + Message +</p><p> "</b> <br><br> Clicca il seguente bottone per partecipare:",</p><p> "events", "Partecipa!", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));</p><p> }</p><p> }</p><p> }</p><p> }[/CODE]</p><p></p><p>Sorry for my bad english but i'm italian <img src="/styles/default/xenforo/smilies/emojione/tongue.png" class="smilie" loading="lazy" alt=":p" title="Stick Out Tongue :p" data-shortname=":p" /></p><p></p><p>Inviato dal mio iPhone 6s Plus utilizzando Tapatalk.</p></blockquote><p></p>
[QUOTE="mattiagenova, post: 382825, member: 69220"] [USER=67932]@iaezzz[/USER] try this :) [CODE] using Plus.Communication.Packets.Outgoing.Rooms.Notifications; using Plus.HabboHotel.GameClients; 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 "Send alert for Events - Game"; } } public void Execute(GameClient Session, Room Room, string[] Params) { if (Session != null) { if (Room != null) { if (Params.Length == 1) { Session.SendWhisper("Write a message pls."); return; } else { string Message = CommandManager.MergeParams(Params, 1); PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Messaggio dallo Staff!", "Il membro dello STAFF <b>" + Session.GetHabbo().Username + "</b> ti invita all'evento - game che si chiama <b>" + Message + "</b> <br><br> Clicca il seguente bottone per partecipare:", "events", "Partecipa!", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId)); } } } } /*public void Execute(GameClient Session, Room Room, string[] Params) { if (Session != null) { if (Room != null) { if (Params.Length != 1) { Session.SendWhisper("Invalid command! :eventalert", 0); } else if (!PlusEnvironment.Event) { PlusEnvironment.GetGame().GetClientManager().SendMessage(new BroadcastMessageAlertComposer(":follow " + Session.GetHabbo().Username + " for events! win prizes!\r\n- " + Session.GetHabbo().Username, ""), ""); PlusEnvironment.lastEvent = DateTime.Now; PlusEnvironment.Event = true; } else { TimeSpan timeSpan = DateTime.Now - PlusEnvironment.lastEvent; if (timeSpan.Hours >= 1) { PlusEnvironment.GetGame().GetClientManager().SendMessage(new BroadcastMessageAlertComposer(":follow " + Session.GetHabbo().Username + " for events! win prizes!\r\n- " + Session.GetHabbo().Username, ""), ""); PlusEnvironment.lastEvent = DateTime.Now; } else { int num = checked(60 - timeSpan.Minutes); Session.SendWhisper("Event Cooldown! " + num + " minutes left until another event can be hosted.", 0); } } } } }*/ } } [/CODE] Small Giude: 1. Open EventAlertCommand.cs and replace the code whit my 2. Save and start whit debug mode Done, now the command :eventalert or :eha is fix Edit this in your lenguage [CODE]PlusEnvironment.GetGame().GetClientManager().SendMessage(new RoomNotificationComposer("Messaggio dallo Staff!", "Il membro dello STAFF <b>" + Session.GetHabbo().Username + "</b> ti invita all'evento - game che si chiama <b>" + Message + "</b> <br><br> Clicca il seguente bottone per partecipare:", "events", "Partecipa!", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId)); } } } }[/CODE] Sorry for my bad english but i'm italian :P Inviato dal mio iPhone 6s Plus utilizzando Tapatalk. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
EventAlent Command Anyone help me to coding this command
Top