Avduf
Member
- Dec 24, 2012
- 153
- 5
Hello so i've been trying to make like a :AFK command, but there's a issue. When i type it, it goes like * (User) IS AFK! * But then this does not come on?
Here's the source:
Sorry for bad English, i'm from Sweden.
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Pathfinding;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Users;
using Plus.Communication.Packets.Outgoing.Notifications;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;
namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun
{
class AfkCommand : IChatCommand
{
public string PermissionRequired
{
get { return "command_afk"; }
}
public string Parameters
{
get { return ""; }
}
public string Description
{
get { return "Använd detta kommandot för att gå AFK."; }
}
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
{
RoomUser ThisUser = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
if (ThisUser == null)
return;
Room.SendMessage(new ChatComposer(ThisUser.VirtualId, "*" + ThisUser.GetUsername() + " is now AFK*", 0, ThisUser.LastBubble));
ThisUser.IsAsleep = true;
}
}
}
Sorry for bad English, i'm from Sweden.