MadMonsterMan
Member
- Mar 25, 2016
- 202
- 13
Okay so when I type in :hug %username%
Plus Emulator Habboon Edit
This comes up:
@Sledmore @JayCustom @Altercationz
Plus Emulator Habboon Edit
This comes up:
@Sledmore @JayCustom @Altercationz
Can you provide the code? I'm assuming you're parsing out the RoomUser rather than GetUsername().
using System;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;
namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun
{
class Hug : IChatCommand
{
public string PermissionRequired
{
get { return "command_hug"; }
}
public string Parameters
{
get { return "%username%"; }
}
public string Description
{
get { return "Hug another user"; }
}
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
{
if (Params.Length == 1)
{
Session.SendWhisper("You must enter a username!");
return;
}
GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
if (TargetClient == null)
{
Session.SendWhisper("That user cannot be found, maybe they're offline or not in the room.");
return;
}
RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
if (User == null)
{
Session.SendWhisper("The user cannot be found, maybe they're offline or not in the room.");
return;
}
RoomUser User2 = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Username);
if (User2 == null)
return;
if (!((Math.Abs(User.X - User2.X) >= 2 && (Math.Abs(User.Y - User2.Y) >= 2))))
{
Room.SendMessage(new ChatComposer(User.VirtualId, "Hugs " + User2 + "*", 0, User.LastBubble));
User.ApplyEffect(9);
}
else
{
Session.SendWhisper("That user is too far away, try getting closer.");
return;
}
}
}
}
Hug Command
using System;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;
namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun
{
class Hug : IChatCommand
{
public string PermissionRequired
{
get { return "command_hug"; }
}
public string Parameters
{
get { return "%username%"; }
}
public string Description
{
get { return "Hug another user"; }
}
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
{
if (Params.Length == 1)
{
Session.SendWhisper("You must enter a username!");
return;
}
GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
if (TargetClient == null)
{
Session.SendWhisper("That user cannot be found, maybe they're offline or not in the room.");
return;
}
RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(TargetClient.GetHabbo().Id);
if (User == null)
{
Session.SendWhisper("The user cannot be found, maybe they're offline or not in the room.");
return;
}
RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
if (ThisUser == null)
return;
if (!((Math.Abs(User.X - ThisUser.X) >= 2 && (Math.Abs(User.Y - ThisUser.Y) >= 2))))
{
Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*Hugs " + TargetClient.GetHabbo().Username + "*", 0, User.LastBubble));
User.ApplyEffect(9);
}
else
{
Session.SendWhisper("That user is too far away, try getting closer.");
return;
}
}
}
}
What error?I tried and gives error?
Got it working thanks alot bro.What error?
Well I saw you give some kid on another post the "cut command" it was something in the code saying "Cut users head off"What exactly does the cut command do, and i might release slapass.
Send it Via Mediafire maybe? Pm thoughI'll do the cut command soon, I'll let you know about the slapass one.