Welcome to hackvshack.net Forum!
Download Free HvH CS2/CS:GO Cheats, CFG, LUA/JS Scripts, and More!
Register

C++ why this trashtalk doesn`t work

freenot

Newbie HvHer
User ID:
152691
Messages:
13
Reactions:
2
Badges:
6
REP:
−0/0+
Level:
37
Code:
Expand Collapse Copy
inline void killMessage(c_game_event* event) noexcept
{

    auto localPlayer = HACKS->engine->get_local_player();
    if (g_cfg.misc.trashtalk
        && HACKS->engine->get_player_for_user_id(event->get_int(CXOR("attacker"))) == localPlayer
        && HACKS->engine->get_player_for_user_id(event->get_int(CXOR("userid"))) != localPlayer)
        HACKS->engine->execute_client_cmd(std::string{ "say " }.append(g_cfg.misc.trashtalkmsg).c_str());
}
 


You are not looking for a specific event name called "player_death".

If this is for airflow:
- You can literally scroll around in the event_logs.cpp to see how anything/everything works.
- Can you refactor your code so it is easier to read?
- I dont think calling the local player through the engine class is the right way of getting the local player index.
- tfm::format exists btw.
- Why are you not writing this inside of the c_event_logs class???
 
  • Nooo
Reactions: legacypaster

Who has read this thread (Total: 0) in last 1 hours View details