[PLUS EMU] VIP Alert

Velaski

winner
Aug 4, 2015
562
165
Some guy on here coded it terribly wrong, and it made me sad so:

Add this in GameClientManager.cs
PHP:
        public void VIPAlert(string Message)
        {
            foreach (GameClient client in this.GetClients.ToList())
            {
                if (client == null || client.GetHabbo() == null)
                    continue;

                if (client.GetHabbo().Rank < 1)
                    continue;

                client.SendWhisper(Message);
            }
        }


VIP Alert command:
PHP:
class VIPACommand : IChatCommand
    {

        public string PermissionRequired
        {
            get { return "command_vipalert"; }
        }

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

        public string Description
        {
            get { return "..."; }
        }

        public void Execute(HabboHotel.GameClients.GameClient Session, Room Room, string[] Params)
        {
            if (Params.Length == 1)
            {
                Session.SendWhisper("Please enter a message to send.");
                return;
            }
if(Session.GetHabbo().Rank < 2)
{ Session.SendWhisper("You are not vip lalalla add ur own message cba"); return;
}

            string Message = CommandManager.MergeParams(Params, 1);
            PlusEnvironment.GetGame().GetClientManager().VIPAlert($"[VIP ALERT][{Session.GetHabbo().Username}] {Message}");
            return;
        }
    }
And obviously register the command and add the permissions.
Can someone test this for me because I'm not sure if it works. (Coding criticisms please, benefits us all)

- Added a if statement to determine whether the player is above rank two.
 
Last edited:

Queso

echo 'Web Developer';
Nov 29, 2016
233
72
Well, like I said on his thread, nice release, but anyone that wanted this command could have just downloaded your Pure EMU edit of Plus, and got it.
 

Berk

berkibap#4233
Developer
Oct 17, 2015
863
190
Having issues with this, when I register the command at:
Code:
 this.Register("disablemimic", new DisableMimicCommand()); ;
            this.Register("vipalert", new VIPACommand());
It turns this error:
I dno what to do :S
 

SOUL

┼ ┼ ┼
Nov 10, 2015
224
45
Having issues with this, when I register the command at:
Code:
 this.Register("disablemimic", new DisableMimicCommand()); ;
            this.Register("vipalert", new VIPACommand());
It turns this error:
I dno what to do :S

Is "VIPACommand" the name of your class if not change it. I.e. your class is called "VipAlertCommand" you would put new VipAlertCommand
 

xXMufaisaXx

Member
Apr 8, 2018
90
13
Having issues with this, when I register the command at:
Code:
 this.Register("disablemimic", new DisableMimicCommand()); ;
            this.Register("vipalert", new VIPACommand());
It turns this error:
I dno what to do :S
Not to sure what all you did here man but I added with no problems. Add my disc: PureDesire#7214
 

Users who are viewing this thread

Top