Jump to content

Remove the kingdom name in normal chat


Recommended Posts

I suppose it's somewhere around here:

 

#ifdef ENABLE_CHAT_COLOR_SYSTEM
	static const char* colorbuf[] = {"|cFFffa200|H|h[Staff]|h|r", "|cFFff0000|H|h[Shinsoo]|h|r", "|cFFffc700|H|h[Chunjo]|h|r", "|cFF000bff|H|h[Jinno]|h|r"};
	int len = snprintf(chatbuf, sizeof(chatbuf), "%s %s : %s", (ch->IsGM()?colorbuf[0]:colorbuf[MINMAX(0, ch->GetEmpire(), 3)]), ch->GetName(), buf);
#else
	int len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);
#endif

 

Link to comment
Share on other sites

  • 2 weeks later...
  • Active Member
#ifdef ENABLE_CHAT_COLOR_SYSTEM
	static const char* colorbuf[] = {"|cFFffa200|H|h[Staff]|h|r", "|cFFff0000|H|h[Shinsoo]|h|r", "|cFFffc700|H|h[Chunjo]|h|r", "|cFF000bff|H|h[Jinno]|h|r"};

	int len;

	if (CHAT_TYPE_SHOUT == pinfo->type) {
		len = snprintf(chatbuf, sizeof(chatbuf), "%s %s : %s", (ch->IsGM()?colorbuf[0]:colorbuf[MINMAX(0, ch->GetEmpire(), 3)]), ch->GetName(), buf);
	} else {
		len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);
	}
#else
	int len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);
#endif

 

or

 

#ifdef ENABLE_CHAT_COLOR_SYSTEM
	static const char* colorbuf[] = {"|cFFffa200|H|h [Staff]|h|r", "|cFFff0000|H|h [Shinsoo]|h|r", "|cFFffc700|H|h [Chunjo]|h|r", "|cFF000bff|H|h [Jinno]|h|r"};
	int len = snprintf(chatbuf, sizeof(chatbuf), "%s%s : %s", pinfo->type == CHAT_TYPE_SHOUT ? (ch->IsGM() ? colorbuf[0] : colorbuf[MINMAX(0, ch->GetEmpire(), 3)]) : "", ch->GetName(), buf);
#else
	int len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);
#endif

 

Edited by iMerv3
  • Love 1
Link to comment
Share on other sites

9 hours ago, Cunoo said:

Learn some basic of c/c++ then go start metin

Thanks for your answer, I don't know what I would do without it.

I have to learn c ++, tell me that a person who doesn't know how to compile a source.

Thanks you iMerv3 it works! 😀

 

Edited by danhakhavro
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.