Command Vanish

Runyard

New Member
Feb 4, 2018
11
3
Hey community, I am looking for an order that is named "Vanish" it allows to be invisible in the next apartment. Do you have it for PlusEmu?

thank you so much :)
 

JayC

Always Learning
Aug 8, 2013
5,494
1,398
Code:
this.Register("invisible", new invisibleCommand());
Code:
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);
            }
        }
    }
}

Code:
private bool boolInv;
public bool blnInv
        {
            get { return this.boolInv; }
            set { this.boolInv = value; }
        }

GetRoomEntryDataEvent
Code:
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);
 

Runyard

New Member
Feb 4, 2018
11
3
Omg ! Thank you verymuch !

this code, I put it or?
private bool boolInv;
public bool blnInv
{
get { return this.boolInv; }
set { this.boolInv = value; }
}
 

Banana

New Member
Feb 21, 2018
11
0
I have a problem in CommandManager.cs:

The name or namespace name 'invisibleCommand' was not found (are you missing a using directive or an assembly reference?) Vanilla C: \ Users \ Administrator \ Desktop \ HabboWorld Emulator \ HabboHotel \ Rooms \ Chat \ Commands \ CommandManager.cs 202 Active

The rest works but not that
 

Banana

New Member
Feb 21, 2018
11
0
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 ?
 

AssLikeThat

Posting Freak
Jan 27, 2013
765
154
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 ?
This works for me perfectly.

Hf4mvAz.png


Did you replace the method for the below, or just add it in?

Code:
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);
 

Banana

New Member
Feb 21, 2018
11
0
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);
 

AssLikeThat

Posting Freak
Jan 27, 2013
765
154
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);

I'm not fluent in French but I think I get the gist of what you're trying to ask..

Replace:
Code:
if (!Room.GetRoomUserManager().AddAvatarToRoom(Session))
            {
                Room.GetRoomUserManager().RemoveUserFromRoom(Session, false, false);
                return;//TODO: Remove?
}

With:
Code:
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;
            }

Basically, before loading the Avatar in the room, you're checking if blnInv (bool used in the :invisible command) has been activated, if it has don't display the room avatar, if not ensure that it's not activated.

Hope this helps.
 

Users who are viewing this thread

Top