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
Coloured Usernames PlusR1
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="JMS" data-source="post: 439983" data-attributes="member: 51728"><p>Hi all, I have been trying to add coloured usernames released by [USER=76567]@Mikee[/USER] (<a href="https://devbest.com/threads/coloured-usernames-release-plusemu.83748/" target="_blank">https://devbest.com/threads/coloured-usernames-release-plusemu.83748/</a>)</p><p></p><p>The code is coded around R2, however I am using R1.</p><p></p><p>One part of it is to replace this code here:</p><p>[CODE] if (GetClient().GetHabbo().TentId > 0)</p><p> {</p><p> mRoom.SendToTent(GetClient().GetHabbo().Id, GetClient().GetHabbo().TentId, Packet);</p><p></p><p> Packet = new WhisperComposer(this.VirtualId, "[Tent Chat] " + Message, 0, Colour);</p><p></p><p> List<RoomUser> ToNotify = mRoom.GetRoomUserManager().GetRoomUserByRank(2);</p><p></p><p> if (ToNotify.Count > 0)</p><p> {</p><p> foreach (RoomUser user in ToNotify)</p><p> {</p><p> if (user == null || user.GetClient() == null || user.GetClient().GetHabbo() == null ||</p><p> user.GetClient().GetHabbo().TentId == GetClient().GetHabbo().TentId)</p><p> {</p><p> continue;</p><p> }</p><p></p><p> user.GetClient().SendMessage(Packet);</p><p> }</p><p> }</p><p> }</p><p> else</p><p> {</p><p> foreach (RoomUser User in mRoom.GetRoomUserManager().GetRoomUsers().ToList())</p><p> {</p><p> if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().MutedUsers.Contains(mClient.GetHabbo().Id))</p><p> continue;</p><p></p><p> if (mRoom.chatDistance > 0 && Gamemap.TileDistance(this.X, this.Y, User.X, User.Y) > mRoom.chatDistance)</p><p> continue;</p><p></p><p> User.GetClient().SendMessage(Packet);</p><p> }</p><p> }[/CODE]</p><p></p><p>(Also worth noting, that using this code client loads fine and all chats show)</p><p>With this code</p><p></p><p>[CODE] </p><p> if (GetClient().GetHabbo().TentId > 0)</p><p> {</p><p> mRoom.SendToTent(GetClient().GetHabbo().Id, GetClient().GetHabbo().TentId, Packet);</p><p></p><p> Packet = new WhisperComposer(this.VirtualId, "[Tent Chat] " + Message, 0, Colour);</p><p></p><p> List<RoomUser> ToNotify = mRoom.GetRoomUserManager().GetRoomUserByRank(2);</p><p></p><p> if (ToNotify.Count > 0)</p><p> {</p><p> foreach (RoomUser user in ToNotify)</p><p> {</p><p> if (user == null || user.GetClient() == null || user.GetClient().GetHabbo() == null ||</p><p> user.GetClient().GetHabbo().TentId == GetClient().GetHabbo().TentId)</p><p> {</p><p> continue;</p><p> }</p><p></p><p> user.GetClient().SendMessage(Packet);</p><p> }</p><p> </p><p> }</p><p> }</p><p> else</p><p> {</p><p> SendNameColorPacket();</p><p></p><p> foreach (RoomUser User in mRoom.GetRoomUserManager().GetRoomUsers().ToList())</p><p> {</p><p> if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().GetIgnores().IgnoredUserIds().Contains(mClient.GetHabbo().Id))</p><p> continue;</p><p></p><p> if (mRoom.chatDistance > 0 && Gamemap.TileDistance(this.X, this.Y, User.X, User.Y) > mRoom.chatDistance)</p><p> continue;</p><p></p><p> User.GetClient().SendMessage(Packet);</p><p> }</p><p> SendNamePacket();</p><p> }</p><p>[/CODE]</p><p></p><p>However this threw up this error: <a href="https://image.prntscr.com/image/2HHzA4UyT_qGMlZo-9UJOg.png" target="_blank">https://image.prntscr.com/image/2HHzA4UyT_qGMlZo-9UJOg.png</a></p><p></p><p>I managed to fix this in VS by replacing:</p><p>[CODE] if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().GetIgnores().IgnoredUserIds().Contains(mClient.GetHabbo().Id))</p><p> continue;[/CODE]</p><p>With this:</p><p>[CODE] if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().MutedUsers.Contains(mClient.GetHabbo().Id))</p><p> continue;[/CODE]</p><p></p><p>With this, the emulator loads up correctly however chat does not show in game. It appears in the chatlogs in game, but doesnt show in game.</p><p>Can anyone offer any advice, this has been the vain of my life for the past week!</p><p></p><p>[USER=72299]@Damien[/USER] [USER=591]@Sledmore[/USER] [USER=17995]@Brad[/USER] maybe?</p></blockquote><p></p>
[QUOTE="JMS, post: 439983, member: 51728"] Hi all, I have been trying to add coloured usernames released by [USER=76567]@Mikee[/USER] ([URL]https://devbest.com/threads/coloured-usernames-release-plusemu.83748/[/URL]) The code is coded around R2, however I am using R1. One part of it is to replace this code here: [CODE] if (GetClient().GetHabbo().TentId > 0) { mRoom.SendToTent(GetClient().GetHabbo().Id, GetClient().GetHabbo().TentId, Packet); Packet = new WhisperComposer(this.VirtualId, "[Tent Chat] " + Message, 0, Colour); List<RoomUser> ToNotify = mRoom.GetRoomUserManager().GetRoomUserByRank(2); if (ToNotify.Count > 0) { foreach (RoomUser user in ToNotify) { if (user == null || user.GetClient() == null || user.GetClient().GetHabbo() == null || user.GetClient().GetHabbo().TentId == GetClient().GetHabbo().TentId) { continue; } user.GetClient().SendMessage(Packet); } } } else { foreach (RoomUser User in mRoom.GetRoomUserManager().GetRoomUsers().ToList()) { if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().MutedUsers.Contains(mClient.GetHabbo().Id)) continue; if (mRoom.chatDistance > 0 && Gamemap.TileDistance(this.X, this.Y, User.X, User.Y) > mRoom.chatDistance) continue; User.GetClient().SendMessage(Packet); } }[/CODE] (Also worth noting, that using this code client loads fine and all chats show) With this code [CODE] if (GetClient().GetHabbo().TentId > 0) { mRoom.SendToTent(GetClient().GetHabbo().Id, GetClient().GetHabbo().TentId, Packet); Packet = new WhisperComposer(this.VirtualId, "[Tent Chat] " + Message, 0, Colour); List<RoomUser> ToNotify = mRoom.GetRoomUserManager().GetRoomUserByRank(2); if (ToNotify.Count > 0) { foreach (RoomUser user in ToNotify) { if (user == null || user.GetClient() == null || user.GetClient().GetHabbo() == null || user.GetClient().GetHabbo().TentId == GetClient().GetHabbo().TentId) { continue; } user.GetClient().SendMessage(Packet); } } } else { SendNameColorPacket(); foreach (RoomUser User in mRoom.GetRoomUserManager().GetRoomUsers().ToList()) { if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().GetIgnores().IgnoredUserIds().Contains(mClient.GetHabbo().Id)) continue; if (mRoom.chatDistance > 0 && Gamemap.TileDistance(this.X, this.Y, User.X, User.Y) > mRoom.chatDistance) continue; User.GetClient().SendMessage(Packet); } SendNamePacket(); } [/CODE] However this threw up this error: [URL]https://image.prntscr.com/image/2HHzA4UyT_qGMlZo-9UJOg.png[/URL] I managed to fix this in VS by replacing: [CODE] if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().GetIgnores().IgnoredUserIds().Contains(mClient.GetHabbo().Id)) continue;[/CODE] With this: [CODE] if (User == null || User.GetClient() == null || User.GetClient().GetHabbo() == null || User.GetClient().GetHabbo().MutedUsers.Contains(mClient.GetHabbo().Id)) continue;[/CODE] With this, the emulator loads up correctly however chat does not show in game. It appears in the chatlogs in game, but doesnt show in game. Can anyone offer any advice, this has been the vain of my life for the past week! [USER=72299]@Damien[/USER] [USER=591]@Sledmore[/USER] [USER=17995]@Brad[/USER] maybe? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Coloured Usernames PlusR1
Top