Likes: 0
Results 1 to 1 of 1
Thread: C++ - Customizing MSG_SAY
-
07-03-15, 09:05 PM #1
C++ - Customizing MSG_SAY
Register to remove this adOriginally Posted by Lightning Blade
-- Start of Tutorial --
Open your ChatHandler.cpp and find your way to
Code:std::string to, channel, msg;
Code:std::string to, channel, msg, color;
Inside the switch you should see this IF STATEMENT.
Code:if (type == CHAT_MSG_SAY) sender->Say(color + msg, Language(lang));
Code:else if (type == CHAT_MSG_EMOTE) sender->TextEmote(msg); else if (type == CHAT_MSG_YELL) sender->Yell(msg, Language(lang));
Code:if (type == CHAT_MSG_SAY) sender->Say(color + msg, Language(lang));
Code:if (type == CHAT_MSG_SAY) { switch (sender->GetSession()->GetSecurity()) { case SEC_PLAYER: color = ""; break; case SEC_MODERATOR: color = ""; break; case SEC_GAMEMASTER: color = ""; break; case SEC_ADMINISTRATOR: color = ""; break; } sender->Say(color + msg, Language(lang)); }
Case Template
Code:Case SEC_PLAYER: break;
All you have to do now is compile and it works .
-- Tutorial End --.
Credits: LightningBlade
› See More: C++ - Customizing MSG_SAY
Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread
Visitors found this page by searching for:
Nobody landed on this page from a search engine, yet!
SEO Blog