Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool __fastcall hkFireEventClientSide(void* ecx, void* edx, CGameEvent* pEvent)
- {
- if (!pEvent)
- return oFireEventClientSide(ecx, pEvent);
- 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 false;
- // Continue only if I'm the one who killed
- if (I::Engine->GetPlayerForUserID(nUserID) != I::Engine->GetLocalPlayerIndex())
- return false;
- player_info_t killed_info = GetInfo(I::Engine->GetPlayerForUserID(nDead));
- std::stringstream ss;
- ss << "say ";
- ss << killed_info.szName << ", you got rekt by the ColumbineHook, an exclusive internal meme.";
- ss << " I've used a weapon named " << pEvent->GetString("weapon") << ".";
- I::Engine->ClientCmd(ss.str().c_str());
- }
- else if (!strcmp(pEvent->GetName(), "bomb_beginplant"))
- {
- // The game launched the bomb_beginplant event
- int nPlanter = pEvent->GetInt("userid");
- if (!nPlanter)
- return false;
- player_info_t planter_info = GetInfo(I::Engine->GetPlayerForUserID(nPlanter));
- std::stringstream ss;
- ss << "say ";
- ss << "WOW, " << planter_info.szName << ", you're planting the bomb like a real muslim!";
- I::Engine->ClientCmd(ss.str().c_str());
- }
- return oFireEventClientSide(ecx, pEvent);
- }
Add Comment
Please, Sign In to add comment