azrail063 0 Posted July 11, 2014 Share Posted July 11, 2014 (edited) I want to change notices /n to /b /n /b Edited August 22, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium Shogun 4579 Posted July 11, 2014 Premium Share Posted July 11, 2014 /b only shows the notice to yourself. Showing it to everyone would require changes in the source. Link to comment Share on other sites More sharing options...
Ken 903 Posted July 11, 2014 Share Posted July 11, 2014 void SendBigNotice(const char * c_pszBuf) { const DESC_MANAGER::DESC_SET & c_ref_set = DESC_MANAGER::instance().GetClientSet(); std::for_each(c_ref_set.begin(), c_ref_set.end(), big_notice_packet_func(c_pszBuf)); } struct big_notice_packet_func { const char * m_str; notice_packet_func(const char * str) : m_str(str) { } void operator () (LPDESC d) { if (!d->GetCharacter()) return; d->GetCharacter()->ChatPacket(CHAT_TYPE_BIG_NOTICE, "%s", m_str); } }; If you are add these function in cmd_gm.cpp, you can use it. I will give a example. Usage : if (g1->WaitStartWar(guild_id2) || g2->WaitStartWar(guild_id1) ) { char buf[256]; snprintf(buf, sizeof(buf), LC_TEXT("%s 길드와 %s 길드가 잠시 후 전쟁을 시작합니다!"), g1->GetName(), g2->GetName()); SendBigNotice(buf); } Best Regards Ellie Do not be sorry, be better. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now