Розыгрыш Premium и Уникальной юзергруппы на форуме! Перейти


  • УЖЕ ЗАВТРА! Просто зашёл, нажал на кнопку участия и забрал кучу призов уже 30-го декабря: https://yougame.biz/threads/366947/

Дайте исходник namechanger'a и antikick'a

  • Автор темы Автор темы konig
  • Дата начала Дата начала
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
Expand Collapse Copy
void CSpam::Name(int mode)
{
    static std::list<std::string> _list;
    static unsigned short unTick = 0;
    static char cBuf[128];
 
    if (unTick >= 64)
    {
        UpdateNames(mode, _list); /*Updates only once every 64 ticks*/
        unTick = 0; /*Resets tick count*/
    }
    else
        unTick++;
 
    if (_list.empty())
        return;
 
    auto _it = _list.begin(); /*Creates a new iterator*/
    auto iRandom = rand() % _list.size(); /*Generates a pseudo-random number*/
    std::advance(_it, iRandom); /*Advances the iterator to the random position*/
    
    sprintf(cBuf, "%s ", (*_it).c_str()); /*Adds memes to the random name*/
 
    SetName(cBuf);
}
 
void CSpam::UpdateNames(int mode, std::list<std::string> &list)
{
    switch (mode)
    {
    case NAMESPAM_NONE:
    {
        list.clear();
        break;
    }
    case NAMESPAM_STEALALLANDSAVE:
    {
        StoreNames(24, false, true, list); /*Refreshes the list and compares*/
        break;
    }
    case NAMESPAM_STEALALL:
    {
        ClearNames(list); /*Clears the list to delete names of players who left the server*/
        StoreNames(24, false, false, list); /*Re-fills the list, don't need to compare*/
        break;
    }
    case NAMESPAM_STEALTEAM:
    {
        ClearNames(list); /*Clears the list to delete names of players who left the server*/
        StoreNames(12, true, false, list); /*Re-fills the list, don't need to compare*/
        break;
    }
    default:
        break;
    }
}
 
void CSpam::StoreNames(uint32_t listsize, bool onlyteam, bool compare, std::list<std::string> &list)
{
    auto pLocal = I::ClientEntList->GetClientEntity(I::Engine->GetLocalPlayer()); /*Gets local player*/
 
    for (auto iIndex = 0; iIndex < I::Globals->maxClients; iIndex++) /*Loops through all the nerds on the server and store their names in the list*/
    {
        auto pEntity = I::ClientEntList->GetClientEntity(iIndex); /*Grabs the entity by the index*/
 
        if (!pLocal || !pEntity || pEntity == pLocal || (onlyteam && pEntity->GetTeam() != pLocal->GetTeam())) /*Basic validity checks*/
            continue;
 
        player_info_t pInfo;
        if (!I::Engine->GetPlayerInfo(iIndex, &pInfo)) /*Gets the player info*/
            continue;
 
        if (pInfo.fakeplayer || pInfo.ishltv) /*Excludes bots and GOTV*/
            continue;
 
        std::string strName = (std::string)pInfo.name; /*Gets the name*/
 
        if (compare) /*Compares the name to the names already stored in the list*/
        {
            auto bAlreadyStored = false;
 
            for (auto it : list)
                if (strName.compare(it) == 0)
                {
                    bAlreadyStored = true;
                    break;
                }
 
            if (bAlreadyStored)
                continue;
        }
 
        list.push_back(strName); /*Stores name at the end of the list*/
 
        if (list.size() > listsize) /*Limits the size of the vector by popping the first name*/
            list.pop_front();
    }
}
 
void CSpam::ClearNames(std::list<std::string> &list)
{
    list.clear();
}
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Ммм, мб тебе еще исходник десинков дать?
Не наглей пожалуйста.
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Вроде это пофикшеный Name Stealer , отпиши он правильно работает или нет?
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Назад
Сверху Снизу