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 Releases
Server Releases
Coloured Usernames Release [PlusEmu]
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="Mikee" data-source="post: 416954" data-attributes="member: 76567"><p>sure but icba to code it properly,</p><p>[CODE]public void SendNameColorPacket()</p><p> {</p><p> </p><p> if (IsBot || GetClient() == null || GetClient().GetHabbo() == null)</p><p> return;</p><p></p><p> //if (GetClient().GetHabbo().ChatColor == null || GetClient().GetHabbo().ChatColor == String.Empty)</p><p> // return;</p><p></p><p> if (GetClient().GetHabbo().ChatPreference)</p><p> return;</p><p></p><p> using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> {</p><p> </p><p> dbClient.SetQuery("SELECT `rank_tag` FROM `users` WHERE username = '" + GetClient().GetHabbo().Username + "'");</p><p> this.rankTag = dbClient.GetString();</p><p> }</p><p> </p><p></p><p> if (this.rankTag != String.Empty)</p><p> {</p><p> </p><p> string Username = "<font color='" + GetClient().GetHabbo().ChatColor + "'> [" + this.rankTag + "] " + GetClient().GetHabbo().Username + "</font>";</p><p> GetRoom().SendPacket(new UserNameChangeComposer(RoomId, VirtualId, Username));</p><p> return;</p><p> }</p><p> else</p><p> {</p><p> string Username = "<font color='" + GetClient().GetHabbo().ChatColor + "'>" + GetClient().GetHabbo().Username + "</font>";</p><p> GetRoom().SendPacket(new UserNameChangeComposer(RoomId, VirtualId, Username));</p><p> return;</p><p> }</p><p> }[/CODE]</p><p></p><p>I DO NOT RECOMMEND USING THIS CODE</p><p>It will flood ur SQL Server.</p><p></p><p>What you should do is store the RankTag as a session variable in Habbo.cs then call it.</p><p></p><p>I released this bit as an example as to how it could be done.</p></blockquote><p></p>
[QUOTE="Mikee, post: 416954, member: 76567"] sure but icba to code it properly, [CODE]public void SendNameColorPacket() { if (IsBot || GetClient() == null || GetClient().GetHabbo() == null) return; //if (GetClient().GetHabbo().ChatColor == null || GetClient().GetHabbo().ChatColor == String.Empty) // return; if (GetClient().GetHabbo().ChatPreference) return; using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("SELECT `rank_tag` FROM `users` WHERE username = '" + GetClient().GetHabbo().Username + "'"); this.rankTag = dbClient.GetString(); } if (this.rankTag != String.Empty) { string Username = "<font color='" + GetClient().GetHabbo().ChatColor + "'> [" + this.rankTag + "] " + GetClient().GetHabbo().Username + "</font>"; GetRoom().SendPacket(new UserNameChangeComposer(RoomId, VirtualId, Username)); return; } else { string Username = "<font color='" + GetClient().GetHabbo().ChatColor + "'>" + GetClient().GetHabbo().Username + "</font>"; GetRoom().SendPacket(new UserNameChangeComposer(RoomId, VirtualId, Username)); return; } }[/CODE] I DO NOT RECOMMEND USING THIS CODE It will flood ur SQL Server. What you should do is store the RankTag as a session variable in Habbo.cs then call it. I released this bit as an example as to how it could be done. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
Coloured Usernames Release [PlusEmu]
Top