Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Who's Online Command
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Blasteh" data-source="post: 391531" data-attributes="member: 30540"><p>Here's a simple one, not sure if that's what you're looking for.</p><p></p><p>[CODE]using System;</p><p>using System.Collections.Generic;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Threading.Tasks;</p><p>using Plus.HabboHotel.GameClients;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun</p><p>{</p><p> class OnlineCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_online"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return "%test%"; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Online command"; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> int OnlineUsers = PlusEnvironment.GetGame().GetClientManager().Count;</p><p></p><p> Session.SendWhisper("There are " + OnlineUsers + " online, Coolio!");</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p>Then add the below to your command manager, be sure to create the permissions as well.</p><p>[CODE]this.Register("online", new OnlineCommand());[/CODE]</p></blockquote><p></p>
[QUOTE="Blasteh, post: 391531, member: 30540"] Here's a simple one, not sure if that's what you're looking for. [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Plus.HabboHotel.GameClients; namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun { class OnlineCommand : IChatCommand { public string PermissionRequired { get { return "command_online"; } } public string Parameters { get { return "%test%"; } } public string Description { get { return "Online command"; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { int OnlineUsers = PlusEnvironment.GetGame().GetClientManager().Count; Session.SendWhisper("There are " + OnlineUsers + " online, Coolio!"); } } } [/CODE] Then add the below to your command manager, be sure to create the permissions as well. [CODE]this.Register("online", new OnlineCommand());[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Who's Online Command
Top