Shitty chat bot indigo

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

client.cpp

ImGui::Checkbox("Chat Bot", &Settings::Misc::shittychatbot);

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

misc.cpp

B void CMisc::OnEvents(IGameEvent* pEvent)


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


        return;


    if (Settings::Misc::shittychatbot) {    





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


        {


            // The game launched a player_death event.


            int nUserID = pEvent->GetInt("attacker");


            int nDead = pEvent->GetInt("userid");


            if (!nUserID || !nDead)


                return;





            // Continue only if I'm the one who killed


            if (Interfaces::Engine()->GetPlayerForUserID(nUserID) != Interfaces::Engine()->GetLocalPlayer())


                return; //This will craft deathnotices only when I kill





                        // If I return false previously this if clause won't ever be executed. Just adjust the if clause properly


                        // If I'm the one who dies...


            if (Interfaces::Engine()->GetPlayerForUserID(nDead) == Interfaces::Engine()->GetLocalPlayer())


            {


                Interfaces::Engine()->ClientCmd("say Wait...you actually killed me? How dare...");


                return;


            }





            PlayerInfo killed_info;


            Interfaces::Engine()->GetPlayerInfo(nDead, &killed_info);





            std::stringstream ss;


            ss << "say " << killed_info.m_szPlayerName << ", you got rekt by the oxlade.vip, an exclusive internal meme, using a weapon named " << pEvent->GetString("weapon") << ".";





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


        }





        if (!strcmp(pEvent->GetName(), "bomb_planted"))


        {


            // The game launched the bomb_beginplant event


            int nPlanter = pEvent->GetInt("userid");


            if (!nPlanter)


                return;





            PlayerInfo planter_info;


            Interfaces::Engine()->GetPlayerInfo(nPlanter, &planter_info);





            std::stringstream ss;


            ss << "say Wow, " << planter_info.m_szPlayerName << ", you planted the bomb like a real muslim!";





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





        }





        if (!strcmp(pEvent->GetName(), "bomb_exploded"))


        {


            // The game launched the bomb_exploded event


            Interfaces::Engine()->ClientCmd("say ALLAHU AKBAR!!!");


        }





        if (!strcmp(pEvent->GetName(), "bomb_dropped"))


        {


            int nDropper = pEvent->GetInt("userid");


            if (!nDropper)


                return;





            PlayerInfo pinfo;


            Interfaces::Engine()->GetPlayerInfo(nDropper, &pinfo);





            std::stringstream ss;


            ss << "say Oh no! " << pinfo.m_szPlayerName << " dropped the fuckin bomb!";





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


        }





        if (!strcmp(pEvent->GetName(), "bomb_defused"))


        {


            int nDefuser = pEvent->GetInt("userid");


            if (!nDefuser)


                return;





            PlayerInfo info;





            std::stringstream ss;





            ss << "say " << info.m_szPlayerName << " defused the bomb with SWAT style! Bin Laden really sad atm...";





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


        }





        if (!strcmp(pEvent->GetName(), "bomb_begindefuse"))


        {


            //[WARNING: This event isn't called anymore, idk why]


            int nDefuser = pEvent->GetInt("userid");


            if (!nDefuser)


                return;





            PlayerInfo info;


            Interfaces::Engine()->GetPlayerInfo(nDefuser, &info);





            std::stringstream ss;





            ss << "say " << info.m_szPlayerName << " started defusing the mothafucking bomb!";


            if (pEvent->GetInt("haskit"))


                ss << " And he has got a l33t defuser!!!";





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


        }





        if (!strcmp(pEvent->GetName(), "bomb_abortdefuse"))


        {


            //[WARNING: This event isn't called anymore, idk why]


            int nAborter = pEvent->GetInt("userid");


            if (!nAborter)


                return;





            PlayerInfo info;


            Interfaces::Engine()->GetPlayerInfo(nAborter, &info);





            // Continue only if I'm not the aborter


            if (Interfaces::Engine()->GetPlayerForUserID(nAborter) == Interfaces::Engine()->GetLocalPlayer())


                return;





            std::stringstream ss;





            ss << "say " << info.m_szPlayerName << " aborted the bomb defusal like a fucking pussy!!! MAYBE HE NEEDS SOME oxlade.vip ;)";





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


        }





        if (!strcmp(pEvent->GetName(), "round_freeze_end"))


        {


            Interfaces::Engine()->ExecuteClientCmd("say Wow another round full of pure skills starts!");


        }





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


            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 << "Hello,  " << name;


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


            }


        }


    }

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

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