diff --git a/src/component/notifies.cpp b/src/component/notifies.cpp index d88b680..75686df 100644 --- a/src/component/notifies.cpp +++ b/src/component/notifies.cpp @@ -4,7 +4,6 @@ #include "game/scripting/entity.hpp" #include "game/scripting/execution.hpp" -#include "notifies.hpp" namespace notifies { @@ -12,16 +11,13 @@ namespace notifies { utils::hook::detour client_command_hook; - utils::hook::detour scr_player_killed_hook; - utils::hook::detour scr_player_damage_hook; - void client_command_stub(int clientNum) { char cmd[1024] = { 0 }; game::SV_Cmd_ArgvBuffer(0, cmd, 1024); - if (cmd == "say"s) + if (cmd == "say"s || cmd == "say_team"s) { std::string message = game::ConcatArgs(1); message.erase(0, 1); @@ -29,8 +25,8 @@ namespace notifies const scripting::entity level{*game::levelEntityId}; const auto player = scripting::call("getEntByNum", {clientNum}).as(); - scripting::notify(level, "say", {player, message}); - scripting::notify(player, "say", {message}); + scripting::notify(level, cmd, {player, message}); + scripting::notify(player, cmd, {message}); } return client_command_hook.invoke(clientNum);