Aller au contenu
  • Veuillez ne pas poster de message pour but d'insulter, incitation à la haine, propos sexuels et tout autre qui ne respecte pas nos conditions générales !

PARTAGE - Commande Invisible


Runyard

Messages recommandés

Hey la communauté inshare, aujourd'hui, je vous partage la commande :invisible qui permet d'être invisible dans le prochain appart.

 

*Petit rappel

Ce sujet n'est pas un support.

Merci de créer un sujet pour les problèmes rencontrés.

 

CODE dans InvisibleCommand.cs (il faut créé le fichier) 

Merci de mettre le fichier dans HabboHotel > Rooms > Commands > Moderator

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.Moderator
{
    class InvisibleCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_invisible"; }
        }

        public string Parameters
        {
            get { return ""; }
        }

        public string Description
        {
            get { return "Permet d'être invisible !"; }
        }

        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("Mode invisible désactivé", 4);
            }
            else
            {
                Session.GetHabbo().blnInv = true;
                Session.SendWhisper("Mode invisible activé - Validation dans le prochain appart", 4);
            }
        }
    }
}

 

Dans GetRoomEntryDataEvent.cs:

 

Remplace ce code:

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

Par celui-ci: 

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;
            }

Insère ce code dans Habbo.cs: 

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

Insère ce code dans CommandManager.cs:

this.Register("invisible", new InvisibleCommand());

 

Voilà voilà ! Bonne utilisation !

D'autres commandes arriveront sous peu (c'est que le début) !

Sky, un bot discord français multifonctions avec un RPG hors du commun.

Site web : https://skybot.fr

Serveur communautaire https://skybot.fr/discord

Lien à poster
Partager sur d’autres sites

il y a 1 minute, Runyard a dit :

Hey la communauté inshare, aujourd'hui, je vous partage la commande :invisible qui permet d'être invisible dans le prochain appart.

 

*Petit rappel

Ce sujet n'est pas un support.

Merci de créer un sujet pour les problèmes rencontrés.

 

CODE dans InvisibleCommand.cs (il faut créé le fichier) 

Merci de mettre le fichier dans HabboHotel > Rooms > Commands > Moderator


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.Moderator
{
    class InvisibleCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_invisible"; }
        }

        public string Parameters
        {
            get { return ""; }
        }

        public string Description
        {
            get { return "Permet d'être invisible !"; }
        }

        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("Mode invisible désactivé", 4);
            }
            else
            {
                Session.GetHabbo().blnInv = true;
                Session.SendWhisper("Mode invisible activé - Validation dans le prochain appart", 4);
            }
        }
    }
}

 

Dans GetRoomEntryDataEvent.cs:

 

Remplace ce code:


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

Par celui-ci: 


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;
            }

Insère ce code dans Habbo.cs: 


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

Insère ce code dans CommandManager.cs:


this.Register("invisible", new InvisibleCommand());

 

Voilà voilà ! Bonne utilisation !

D'autres commandes arriveront sous peu (c'est que le début) !

Merci beaucoup,j'allais faire un sujet pour cette commande (je le fais pour tester les nouveaux staffs)

BESOIN D'AIDE CONTACTE-MOI

MP moi pour question ou projet

 

Lien à poster
Partager sur d’autres sites

il y a 10 minutes, ???äç a dit :

Merci beaucoup,j'allais faire un sujet pour cette commande (je le fais pour tester les nouveaux staffs)

Eh bah voilà :hihi: 

Sky, un bot discord français multifonctions avec un RPG hors du commun.

Site web : https://skybot.fr

Serveur communautaire https://skybot.fr/discord

Lien à poster
Partager sur d’autres sites

il y a 22 minutes, Runyard a dit :

Hey la communauté inshare, aujourd'hui, je vous partage la commande :invisible qui permet d'être invisible dans le prochain appart.

 

*Petit rappel

Ce sujet n'est pas un support.

Merci de créer un sujet pour les problèmes rencontrés.

 

CODE dans InvisibleCommand.cs (il faut créé le fichier) 

Merci de mettre le fichier dans HabboHotel > Rooms > Commands > Moderator


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.Moderator
{
    class InvisibleCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_invisible"; }
        }

        public string Parameters
        {
            get { return ""; }
        }

        public string Description
        {
            get { return "Permet d'être invisible !"; }
        }

        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("Mode invisible désactivé", 4);
            }
            else
            {
                Session.GetHabbo().blnInv = true;
                Session.SendWhisper("Mode invisible activé - Validation dans le prochain appart", 4);
            }
        }
    }
}

 

Dans GetRoomEntryDataEvent.cs:

 

Remplace ce code:


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

Par celui-ci: 


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;
            }

Insère ce code dans Habbo.cs: 


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

Insère ce code dans CommandManager.cs:


this.Register("invisible", new InvisibleCommand());

 

Voilà voilà ! Bonne utilisation !

D'autres commandes arriveront sous peu (c'est que le début) !

 

Cette commande n'est pas parfaite une fois le :invisible taper si tu entre une commande tu crash directement ;)

Lien à poster
Partager sur d’autres sites

il y a 48 minutes, Akushi a dit :

 

Cette commande n'est pas parfaite une fois le :invisible taper si tu entre une commande tu crash directement ;)

Ah, peut-être j'ai mais essayé sa

Sky, un bot discord français multifonctions avec un RPG hors du commun.

Site web : https://skybot.fr

Serveur communautaire https://skybot.fr/discord

Lien à poster
Partager sur d’autres sites

  • 4 semaines plus tard...
public bool blnInv
        {
            get { return this.boolInv; }
            set { this.boolInv = value; }
        }

meh.. pas trop ça le mot "propre" ahah, remplace par ça public bool blnInv => this.boolInv;

meeeeeh

Lien à poster
Partager sur d’autres sites

Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant
×
×
  • Créer...