// R1
void addChatMessage(unsigned color, const char* message) {
static auto samp_base = GetModuleHandleA("samp.dll");
static auto addMessage = reinterpret_cast<void(__thiscall*)(void* pChat, unsigned color, const char* message)>(samp_base + 0x645A0);
addMessage(*reinterpret_cast<void**>(samp_base + 0x21A0E4), color, message);
}
// R3
void addChatMessage(unsigned color, const char* message) {
static auto samp_base = GetModuleHandleA("samp.dll");
static auto addMessage = reinterpret_cast<void(__thiscall*)(void* pChat, unsigned color, const char* message)>(samp_base + 0x679F0);
addMessage(*reinterpret_cast<void**>(samp_base + 0x26E8C8), color, message);
}