-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Вот эта функция нужна
void DoNameSteal(CUserCmd* cmd)
{
if (!Vars::Misc::NameSteal && !Vars::Misc::NameStealAdv)
return;
static ConVar* pName = Interfaces->Cvar->FindVar("name");
if (!bNameUnlocked)
{
pName->m_fnChangeCallbacks = NULL;
bNameUnlocked = true;
}
bool bDidMeme = false;
int iNameIndex = -1;
iGarbage = iGarbage + 1;
char chCommand[256];
if (!Vars::Misc::NameStealAdv)
{
for (int iPlayerIndex = 0; iPlayerIndex < Interfaces->Engine->GetMaxClients(); iPlayerIndex++)
{
CBaseEntity* pEntity = (CBaseEntity*)Interfaces->ClientEntList->GetClientEntity(iPlayerIndex);
if (!pEntity || pEntity == pLocalPlayer || iPlayerIndex == Interfaces->Engine->GetLocalPlayer() || pLocalPlayer->team() != pEntity->team())
continue;
if (rand() % 3 == 1)
{
iNameIndex = pEntity->index;
bDidMeme = true;
}
}
void DoNameSteal(CUserCmd* cmd)
{
if (!Vars::Misc::NameSteal && !Vars::Misc::NameStealAdv)
return;
static ConVar* pName = Interfaces->Cvar->FindVar("name");
if (!bNameUnlocked)
{
pName->m_fnChangeCallbacks = NULL;
bNameUnlocked = true;
}
bool bDidMeme = false;
int iNameIndex = -1;
iGarbage = iGarbage + 1;
char chCommand[256];
if (!Vars::Misc::NameStealAdv)
{
for (int iPlayerIndex = 0; iPlayerIndex < Interfaces->Engine->GetMaxClients(); iPlayerIndex++)
{
CBaseEntity* pEntity = (CBaseEntity*)Interfaces->ClientEntList->GetClientEntity(iPlayerIndex);
if (!pEntity || pEntity == pLocalPlayer || iPlayerIndex == Interfaces->Engine->GetLocalPlayer() || pLocalPlayer->team() != pEntity->team())
continue;
if (rand() % 3 == 1)
{
iNameIndex = pEntity->index;
bDidMeme = true;
}
}