- Статус
- Оффлайн
- Регистрация
- 24 Ноя 2019
- Сообщения
- 390
- Реакции
- 119
C++:
void Client::ClanTag( )
{
// lambda function for setting our clantag.
auto set_clantag = [ & ] ( std::string tag ) -> void {
using SetClanTag_t = int( __fastcall* )( const char*, const char* );
static auto SetClanTagFn = pattern::find( g_csgo.m_engine_dll, XOR( "53 56 57 8B DA 8B F9 FF 15" ) ).as<SetClanTag_t>( );
SetClanTagFn( tag.c_str( ), XOR( "netherius" ) );
};
static auto is_enable = false;
static int oldcurtime = 0;
if (!g_cfg[XOR("misc_clantag")].get<int>())
{
if (is_enable)
{
if (oldcurtime != g_csgo.m_globals->m_curtime) {
set_clantag("");
}
oldcurtime = g_csgo.m_globals->m_curtime;
}
is_enable = false;
return;
}
is_enable = true;
if (g_cfg[XOR("misc_clantag")].get<int>() == 1)
{
if (oldcurtime != int(g_csgo.m_globals->m_curtime)) {
set_clantag("[VALV\xE1\xB4\xB1]");
}
oldcurtime = int(g_csgo.m_globals->m_curtime);
}
else if (g_cfg[XOR("misc_clantag")].get<int>() == 2)
{
if (oldcurtime != int(g_csgo.m_globals->m_curtime)) {
set_clantag("netherius");
}
oldcurtime = int(g_csgo.m_globals->m_curtime);
}
else if (g_cfg[XOR("misc_clantag")].get<int>() == 3)
{
static auto is_freeze_period = false;
if (g_csgo.m_gamerules->m_bFreezePeriod())
{
if (is_freeze_period)
{
set_clantag("netherius");
}
is_freeze_period = false;
return;
}
is_freeze_period = true;
if (oldcurtime != int(g_csgo.m_globals->m_curtime * 3.6) % 18) {
switch (int(g_csgo.m_globals->m_curtime * 3.6) % 18) {
case 0: { set_clantag(" "); break; }
case 1: { set_clantag(" n"); break; }
case 2: { set_clantag(" ne"); break; }
case 3: { set_clantag(" net"); break; }
case 4: { set_clantag(" neth"); break; }
case 5: { set_clantag(" nethe"); break; }
case 6: { set_clantag(" nether"); break; }
case 7: { set_clantag(" netheri"); break; }
case 8: { set_clantag(" netheriu"); break; }
case 9: { set_clantag("netherius"); break; }
case 10: { set_clantag("etherius "); break; }
case 11: { set_clantag("therius "); break; }
case 12: { set_clantag("herius "); break; }
case 13: { set_clantag("erius "); break; }
case 14: { set_clantag("rius "); break; }
case 15: { set_clantag("ius "); break; }
case 16: { set_clantag("us "); break; }
case 17: { set_clantag("s "); break; }
default:;
}
oldcurtime = int(g_csgo.m_globals->m_curtime * 3.6) % 18;
}
}
}

