Hello.
I'm currently trying to fix trading notifications like when a user starts to trade with someone it says outloud [Username] has started a trade with [Targetusername]
This is my code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Rooms.Trading;
namespace Plus.Communication.Packets.Incoming.Inventory.Trading
{
class TradingAcceptEvent : IPacketEvent
{
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
{
if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom)
return;
Room Room;
if (!PlusEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
Session.SendWhisper("Du har accepterat ditt byte.");
return;
if (!Room.CanTradeInRoom)
return;
Trade Trade = Room.GetUserTrade(Session.GetHabbo().Id);
if (Trade == null)
return;
Trade.Accept(Session.GetHabbo().Id);
}
}
}
What file should I be looking at to edit this in?
I'm currently trying to fix trading notifications like when a user starts to trade with someone it says outloud [Username] has started a trade with [Targetusername]
This is my code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Rooms.Trading;
namespace Plus.Communication.Packets.Incoming.Inventory.Trading
{
class TradingAcceptEvent : IPacketEvent
{
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
{
if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom)
return;
Room Room;
if (!PlusEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
Session.SendWhisper("Du har accepterat ditt byte.");
return;
if (!Room.CanTradeInRoom)
return;
Trade Trade = Room.GetUserTrade(Session.GetHabbo().Id);
if (Trade == null)
return;
Trade.Accept(Session.GetHabbo().Id);
}
}
}
Hello.
I'm currently trying to fix trading notifications like when a user starts to trade with someone it says outloud [Username] has started a trade with [Targetusername]
This is my code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Rooms.Trading;
namespace Plus.Communication.Packets.Incoming.Inventory.Trading
{
class TradingAcceptEvent : IPacketEvent
{
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
{
if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom)
return;
Room Room;
if (!PlusEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
Session.SendWhisper("Du har accepterat ditt byte.");
return;
if (!Room.CanTradeInRoom)
return;
Trade Trade = Room.GetUserTrade(Session.GetHabbo().Id);
if (Trade == null)
return;
Trade.Accept(Session.GetHabbo().Id);
}
}
}
What file should I be looking at to edit this in?