namespace offsets {
namespace chat { // R1 - 0.3DL
constexpr std::uintptr_t ref[] = { 0x21A0E4, 0x21A0EC, 0x26E8C8, 0x26E9F8, 0x26EB80, 0x2ACA10 };
constexpr std::uintptr_t add_message[] = { 0x645A0, 0x64670, 0x679F0, 0x68130, 0x68170, 0x67BE0 };
}
}
#define VERSION rakhook::detail::to_underlying(rakhook::samp_version())
class c_chat : public singleton<c_chat> {
public:
c_chat*& ref() {
return *(c_chat**)rakhook::samp_addr(offsets::chat::ref[VERSION]);
}
void add_message(unsigned long color, const char* text) {
((void(__thiscall*)(c_chat*, unsigned long, const char*)) rakhook::samp_addr(offsets::chat::add_message[VERSION]) )(this, color, text);
}
};
#undef VERSION