Event Alert Picture

Status
Not open for further replies.

Bran

habcrush.pw
Mar 13, 2017
1,789
1,608
so i have the event alert command all done, but I wanted to know how I put a picture next to it? like can someone give me the line of code, or edit my line of code for me aha
nbM56WD.png

i want it like this (picture at the left side)
jFfk4IU.png

code for my event alert
Code:
using Plus.Communication.Packets.Outgoing.Moderation;
using Plus.Communication.Packets.Outgoing.Rooms.Notifications;
using Plus.HabboHotel.GameClients;
using System;
namespace Plus.HabboHotel.Rooms.Chat.Commands.Events
{
    class EventAlertCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get
            {
                return "command_event_alert";
            }
        }
        public string Parameters
        {
            get
            {
                return "%message%";
            }
        }
        public string Description
        {
            get
            {
                return "Send a hotel alert for your event!";
            }
        }
        public void Execute(GameClient Session, Room Room, string[] Params)
        {
            if (Session != null)
            {
                if (Room != null)
                {
                    if (Params.Length == 1)
                    {
                        Session.SendWhisper("Please enter a message to send.");
                        return;
                    }
                    else
                    {
                        string Message = CommandManager.MergeParams(Params, 1);

                        PlusEnvironment.GetGame().GetClientManager().SendPacket(new RoomNotificationComposer("Crush Event Alert",
                           "<b>" + Session.GetHabbo().Username + "</b> is hosting some events. Prizes and GOTW points will be handed out to the winners." +
                           "<br><br><i>User Message:  <i>" + Message +
                           "<br><br><b>- " + Session.GetHabbo().Username + "</b>" +
                           "<br><br><i>This event is moderated by Crush Staff!</i>", $"fig/{Session.GetHabbo().Look}"
                         , "Click here to go to " + Room.Name + "", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));
                    }

                }
            }
        }
    }
}

@Sledmore
 

CXS7OM

New Member
Aug 12, 2017
23
12
You need to put the name of the image (/c_images/notifications/ FORMAT .png)
Code:
                       PlusEnvironment.GetGame().GetClientManager().SendPacket(new RoomNotificationComposer("Crush Event Alert",
                          "<b>" + Session.GetHabbo().Username + "</b> is hosting some events. Prizes and GOTW points will be handed out to the winners." +
                          "<br><br><i>User Message:  <i>" + Message +
                          "<br><br><b>- " + Session.GetHabbo().Username + "</b>" +
                          "<br><br><i>This event is moderated by Crush Staff!</i>, "NAMEOFTHEIMAGE", "Click here to go to " + Room.Name + "", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));
 
Last edited:

Bran

habcrush.pw
Mar 13, 2017
1,789
1,608
You need to put the name of the image (/c_images/notifications/ FORMAT .png)
Code:
                       PlusEnvironment.GetGame().GetClientManager().SendPacket(new RoomNotificationComposer("Crush Event Alert",
                          "<b>" + Session.GetHabbo().Username + "</b> is hosting some events. Prizes and GOTW points will be handed out to the winners." +
                          "<br><br><i>User Message:  <i>" + Message +
                          "<br><br><b>- " + Session.GetHabbo().Username + "</b>" +
                          "<br><br><i>This event is moderated by Crush Staff!</i>, "NAMEOFTHEIMAGE", "Click here to go to " + Room.Name + "", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));
so where it says "NAMEOFIMAGE" i put the file name? :D
 

Queso

echo 'Web Developer';
Nov 29, 2016
232
72
Replace and change file image
Code:
using Plus.Communication.Packets.Outgoing.Moderation;
using Plus.Communication.Packets.Outgoing.Rooms.Notifications;
using Plus.HabboHotel.GameClients;
using System;
namespace Plus.HabboHotel.Rooms.Chat.Commands.Events
{
    class EventAlertCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get
            {
                return "command_event_alert";
            }
        }
        public string Parameters
        {
            get
            {
                return "%message%";
            }
        }
        public string Description
        {
            get
            {
                return "Send a hotel alert for your event!";
            }
        }
        public void Execute(GameClient Session, Room Room, string[] Params)
        {
            if (Session != null)
            {
                if (Room != null)
                {
                    if (Params.Length == 1)
                    {
                        Session.SendWhisper("Please enter a message to send.");
                        return;
                    }
                    else
                    {
                        string Message = CommandManager.MergeParams(Params, 1);

                        PlusEnvironment.GetGame().GetClientManager().SendPacket(new RoomNotificationComposer("Crush Event Alert",
                           "<b>" + Session.GetHabbo().Username + "</b> is hosting some events. Prizes and GOTW points will be handed out to the winners." +
                           "<br><br><i>User Message:  <i>" + Message +
                           "<br><br><b>- " + Session.GetHabbo().Username + "</b>" +
                           "<br><br><i>This event is moderated by Crush Staff!</i>", "NAMEOFTHEIMAGEDONOTADDEXTENSIONONLYILENAME"
                         , "Click here to go to " + Room.Name + "", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));
                    }

                }
            }
        }
    }
}
Add .png image to swfs/c_images/notifications
Done.
 

Bran

habcrush.pw
Mar 13, 2017
1,789
1,608
Replace and change file image
Code:
using Plus.Communication.Packets.Outgoing.Moderation;
using Plus.Communication.Packets.Outgoing.Rooms.Notifications;
using Plus.HabboHotel.GameClients;
using System;
namespace Plus.HabboHotel.Rooms.Chat.Commands.Events
{
    class EventAlertCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get
            {
                return "command_event_alert";
            }
        }
        public string Parameters
        {
            get
            {
                return "%message%";
            }
        }
        public string Description
        {
            get
            {
                return "Send a hotel alert for your event!";
            }
        }
        public void Execute(GameClient Session, Room Room, string[] Params)
        {
            if (Session != null)
            {
                if (Room != null)
                {
                    if (Params.Length == 1)
                    {
                        Session.SendWhisper("Please enter a message to send.");
                        return;
                    }
                    else
                    {
                        string Message = CommandManager.MergeParams(Params, 1);

                        PlusEnvironment.GetGame().GetClientManager().SendPacket(new RoomNotificationComposer("Crush Event Alert",
                           "<b>" + Session.GetHabbo().Username + "</b> is hosting some events. Prizes and GOTW points will be handed out to the winners." +
                           "<br><br><i>User Message:  <i>" + Message +
                           "<br><br><b>- " + Session.GetHabbo().Username + "</b>" +
                           "<br><br><i>This event is moderated by Crush Staff!</i>", "NAMEOFTHEIMAGEDONOTADDEXTENSIONONLYILENAME"
                         , "Click here to go to " + Room.Name + "", "event:navigator/goto/" + Session.GetHabbo().CurrentRoomId));
                    }

                }
            }
        }
    }
}
Add .png image to swfs/c_images/notifications
Done.
1 more question, does the image you put in it need to be a certain size? because i'm making one
 
Status
Not open for further replies.

Users who are viewing this thread

Top