2017-01-19 16:23:59 -05:00
|
|
|
#include "STDInclude.hpp"
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
std::string PlayerName::PlayerNames[18];
|
|
|
|
|
|
|
|
int PlayerName::GetClientName(int /*localClientNum*/, int index, char *buf, int size)
|
|
|
|
{
|
|
|
|
if (index < 0 || index >= 18) return 0;
|
|
|
|
return strncpy_s(buf, size, PlayerName::PlayerNames[index].data(), PlayerName::PlayerNames[index].size()) == 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
PlayerName::PlayerName()
|
|
|
|
{
|
2017-01-20 16:41:03 -05:00
|
|
|
#if(0) // Disabled for now
|
2017-01-19 16:23:59 -05:00
|
|
|
{
|
2017-01-27 08:43:52 -05:00
|
|
|
for (int i = 0; i < ARRAYSIZE(PlayerName::PlayerNames); ++i)
|
2017-01-19 16:23:59 -05:00
|
|
|
{
|
|
|
|
PlayerName::PlayerNames[i] = "mumu";
|
|
|
|
}
|
|
|
|
|
|
|
|
Utils::Hook(Game::CL_GetClientName, PlayerName::GetClientName, HOOK_JUMP).install()->quick();
|
|
|
|
}
|
2017-01-20 16:41:03 -05:00
|
|
|
#endif
|
2017-02-20 13:18:07 -05:00
|
|
|
|
|
|
|
//const char* clanname = "ZOB";
|
|
|
|
//Utils::Hook::Set<const char*>(0x497656, clanname);
|
|
|
|
//Utils::Hook::Set<const char*>(0x497679, clanname);
|
2017-01-19 16:23:59 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
PlayerName::~PlayerName()
|
|
|
|
{
|
2017-01-27 08:43:52 -05:00
|
|
|
for (int i = 0; i < ARRAYSIZE(PlayerName::PlayerNames); ++i)
|
2017-01-19 16:23:59 -05:00
|
|
|
{
|
|
|
|
PlayerName::PlayerNames[i].clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|