diff options
| author | navewindre <nw@moneybot.cc> | 2024-07-16 07:19:43 +0200 |
|---|---|---|
| committer | navewindre <nw@moneybot.cc> | 2024-07-16 07:19:43 +0200 |
| commit | 4c8b52fc94c04c4b3d338c2501971ae348f5b3e5 (patch) | |
| tree | 049ff320ffed7398b91887f6c39cfa3f715a1ee4 /src/cs2/hack.cpp | |
| parent | 320e7b14a5a29838ed2cb909cadfd7c448c6849b (diff) | |
やーーーー
Diffstat (limited to 'src/cs2/hack.cpp')
| -rw-r--r-- | src/cs2/hack.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/cs2/hack.cpp b/src/cs2/hack.cpp index ef4008d..c98337a 100644 --- a/src/cs2/hack.cpp +++ b/src/cs2/hack.cpp @@ -1,9 +1,10 @@ #include "hack.h" +#include "entity.h" +#include "entity.h" #include "iface.h" SETTING_HOLDER gcfg; -#include "cs2.h" PROCESS64* hack_init() { CS2* p = new CS2(); @@ -12,9 +13,32 @@ PROCESS64* hack_init() { return nullptr; } + schema_dump_to_file( p ); + iface_dump_to_file( p ); + return p; } bool hack_run( PROCESS64* p ) { + perf_run_metric( perf_loop_start ); + CS2* cs = (CS2*)p; + + for( I32 i = 0; i < 64; ++i ) { + CS2_PLAYERCONTROLLER pc = cs2_ent_from_idx( cs, i ); + if( !pc ) + continue; + + CS2_PAWN pawn = pc.get_pawn(); + if( !pawn ) + continue; + + STR<128> name = pc.m_sSanitizedPlayerName(); + I32 health = pawn.m_iHealth(); + + clog( "player %d [%llx]: %s, health %d\n", i, pc.ptr, name.data, health ); + } + + + perf_run_metric( perf_loop_end ); return true; }
\ No newline at end of file |
