cazzwastaken / kakhack

An incomplete CS:GO internal with a rich SDK
https://www.youtube.com/c/cazzwastaken/
GNU General Public License v3.0
63 stars 19 forks source link

fix need to add a space at the start of chatprintf #5

Closed cristeigabriel closed 10 months ago

cristeigabriel commented 2 years ago

https://github.com/cazzwastaken/kakhack/blob/c70badccdbb53a892b1fe79cc9824f5544992175/cheat/core/functions/dispatchusermessage.cpp#L12

you can fix the need to add a character at the start of chatprintf to apply a color by using PushNotice. this allows you to directly use html

        ADD_PATTERN( CLIENT_DLL, "PushNotice", "55 8B EC 83 E4 F8 B8 ? ? ? ? E8 ? ? ? ? 53 8B D9 8B 0D ? ? ? ? 56 57 81 F9 ? ? ? ? 75 0C A1" );
            static void __fastcall push_notice( unk, unk, const char*, int, const char* );

use the first const char* for the last argument and you'll be able to use HTML directly. you can dynamically apply this by having some ct prefix and prepending it in some abstraction when you want to write to chat.

regards

AstrouxTheSecond commented 2 years ago

you should make A pull request.