this.Register("invisible", new invisibleCommand());
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Rooms.Chat.Styles;
namespace Plus.HabboHotel.Rooms.Chat.Commands.Staff
{
class invisibleCommand : IChatCommand
{
public string PermissionRequired
{
get { return "command_invisible"; }
}
public string Parameters
{
get { return ""; }
}
public string Description
{
get { return "Use this command to turn on/off invisible mode"; }
}
public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
{
if (Session == null)
return;
if (Session.GetHabbo().blnInv)
{
Session.GetHabbo().blnInv = false;
Session.SendWhisper("Invisible Mode OFF", 4);
}
else
{
Session.GetHabbo().blnInv = true;
Session.SendWhisper("Invisible Mode ON -- Only Activated for Next Room Visit", 4);
}
}
}
}
private bool boolInv;
public bool blnInv
{
get { return this.boolInv; }
set { this.boolInv = value; }
}
if (!Session.GetHabbo().blnInv)
{
if (!Room.GetRoomUserManager().AddAvatarToRoom(Session))
{
Room.GetRoomUserManager().RemoveUserFromRoom(Session, false, false);
return;//TODO: Remove?
}
}
else
{
Session.GetHabbo().blnInv = !Session.GetHabbo().blnInv;
}
Room.SendObjects(Session);
Habbo.csOmg ! Thank you verymuch !
this code, I put it or?
private bool boolInv;
public bool blnInv
{
get { return this.boolInv; }
set { this.boolInv = value; }
}
I have a problem in CommandManager.cs:Habbo.cs
This works for me perfectly.The problem of commandmanager.cs is fixed but now, the command does not work, in the next apartment he does not want to put me invisible
Help me ?
if (!Session.GetHabbo().blnInv)
{
if (!Room.GetRoomUserManager().AddAvatarToRoom(Session))
{
Room.GetRoomUserManager().RemoveUserFromRoom(Session, false, false);
return;//TODO: Remove?
}
}
else
{
Session.GetHabbo().blnInv = !Session.GetHabbo().blnInv;
}
Room.SendObjects(Session);
replace:just add
if (!Room.GetRoomUserManager().AddAvatarToRoom(Session))
{
Room.GetRoomUserManager().RemoveUserFromRoom(Session, false, false);
return;//TODO: Remove?
}
Le code doit-il être remplacé par celui-ci?
if (! Session.GetHabbo (). blnInv)
{
if (! Room.GetRoomUserManager (). AddAvatarToRoom (Session))
{
Room.GetRoomUserManager (). RemoveUserFromRoom (Session, false, false);
return; // TODO: Supprimer?
}
}
autre
{
Session.GetHabbo (). BlnInv =! Session.GetHabbo (). BlnInv;
}
Room.SendObjects (Session);
if (!Room.GetRoomUserManager().AddAvatarToRoom(Session))
{
Room.GetRoomUserManager().RemoveUserFromRoom(Session, false, false);
return;//TODO: Remove?
}
if (!Session.GetHabbo().blnInv)
{
if (!Room.GetRoomUserManager().AddAvatarToRoom(Session))
{
Room.GetRoomUserManager().RemoveUserFromRoom(Session, false, false);
return;//TODO: Remove?
}
}
else
{
Session.GetHabbo().blnInv = !Session.GetHabbo().blnInv;
}