Shit talk indigo

Забаненный
Статус
Оффлайн
Регистрация
30 Мар 2015
Сообщения
1,185
Реакции[?]
636
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
/* shit talk */

Client.cpp

ImGui::Checkbox("Shit Talk", &Settings::Misc::shittalk);

//////////////

Misc.cpp

Перед void CMisc::OnEvents(IGameEvent* pEvent)

int Kills2 = 0;
int Kills = 0;
bool RoundInfo = false;
size_t Delay = 0;

B void CMisc::OnEvents(IGameEvent* pEvent)



Код:
if (!Interfaces::Engine()->IsInGame())


        return;


    if (Settings::Misc::shittalk) {


        if (!strcmp(pEvent->GetName(), "round_end")) {


            RoundInfo = true;


            Delay = GetTickCount();


        }


        else if ((!strcmp(pEvent->GetName(), "game_newmap")) || (!strcmp(pEvent->GetName(), "game_start")) || (!strcmp(pEvent->GetName(), "game_end"))) {


            Kills = 0;


            Kills2 = 0;


        }


        else if (!strcmp(pEvent->GetName(), "player_connect")) {


            int PlayerID = Interfaces::Engine()->GetPlayerForUserID(pEvent->GetInt("userid"));





            PlayerInfo pinfo;


            std::stringstream tss;


            std::string name = pinfo.m_szPlayerName;


            if (Interfaces::Engine()->GetPlayerInfo(PlayerID, &pinfo)) {


                tss << say << "Ola " << name;


                Interfaces::Engine()->ExecuteClientCmd(tss.str().c_str());


            }


        }


        else if ((!strcmp(pEvent->GetName(), "player_death"))) {


            int PlayerID = Interfaces::Engine()->GetPlayerForUserID(pEvent->GetInt("userid"));


            int AttackerID = Interfaces::Engine()->GetPlayerForUserID(pEvent->GetInt("attacker"));





            PlayerInfo pinfo;


            PlayerInfo ainfo;





            if (Interfaces::Engine()->GetPlayerInfo(PlayerID, &pinfo) &&


                Interfaces::Engine()->GetPlayerInfo(AttackerID, &ainfo)) {





                if (PlayerID == Interfaces::Engine()->GetLocalPlayer())


                    Kills = 0;





                if (PlayerID != Interfaces::Engine()->GetLocalPlayer() && AttackerID == Interfaces::Engine()->GetLocalPlayer()) {


                    Kills++;


                    Kills2++;





                    std::stringstream tss2;


                    std::string name = pinfo.m_szPlayerName;


                    switch (Kills) {


                    case 1: tss2 << say << "-1 ez " << name; break;


                    case 2:    tss2 << say << "-2 eze " << name; break;


                    case 3:    tss2 << say << "-3 ezy " << name; break;


                    case 4:    tss2 << say << "-4 ezi " << name; break;


                    default:tss2 << say << "-5 izi " << name; break;


                    }





                    Interfaces::Engine()->ExecuteClientCmd(tss2.str().c_str());


                }


            }


        }


    }

///////////////

Settings

bool shittalk = false;
extern bool shittalk;
 
Сверху Снизу