[PLUSEMU] - Online Command

Malibu4796

Junior Member
Members
3Posts:
2 Threads:
Dec 02Joined:
0 Reputation:
#1
Here is the gallery of the Archives, today I come to bring you a command 

basic that most of the hotel uses to see the amount of users connected to the hotel. 

1. Go to HabboHotel -> Rooms -> Chat -> Commands -> User -> Fun 
2. Create a Class within Fun called  OnlineCommand.cs
3. Paste these code inside:

Code:
using System;
using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.GameClients;
using Plus.Communication.Packets.Outgoing.Rooms.Chat;

namespace Plus.HabboHotel.Rooms.Chat.Commands.User
{
   class OnlineCommand : IChatCommand
   {
       public string PermissionRequired
       {
           get { return "command_info"; }
       }
       public string Parameters
       {
           get { return ""; }
       }
       public string Description
       {
           get { return "Zie hoeveel spelers er online zijn!"; }
       }

       public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
       {
           int OnlineUsers = PlusEnvironment.GetGame().GetClientManager().Count;
           int RoomCount = PlusEnvironment.GetGame().GetRoomManager().Count;

           if (RoomCount == 1)
           {
               Session.SendWhisper("Existem " + OnlineUsers + " jogadores distribuídos online / " + RoomCount + " no quarto.");
           }
           else
           {
               Session.SendWhisper("Existem" + OnlineUsers + " jogadores distribuídos online / " + RoomCount + " no quarto.");
           }
       }
   }
}
Add this to your CommandManager.cs :
Code:
this.Register("online", new OnlineCommand());
Paste this into your permissions_commands table:
Code:
INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`, `command_info`) VALUES ('command_nota', 1, 0, '0');
Do this, debug your emulator and be happy!
(Sorry for any explanation error, I'm Brazilian.)

CREDITS
Angelo
Malibu
Snaiker
Reet and Tom like this post
Reply

Tom

RetroRiper Love
Owner
Developer
49Posts:
5 Threads:
Oct 07Joined:
4 Reputation:
Developer
#2
Nice command 

Tnx for this release Cheese

Tom
Malibu4796 likes this post
Reply

Malibu4796

Junior Member
Members
3Posts:
2 Threads:
Dec 02Joined:
0 Reputation:
#3
Tom Wrote: Please log in or register to see this link.Nice comanda o 

Tnx para este lançamento Cheese

Tom
I'm glad you liked it.
Tom likes this post
Reply
Users browsing this thread:
1 Guest(s)