#define SAMP_CHAT_INFO_OFFSET 0x21A0E4
#define SAMP_FUNC_ADDTOCHATWND 0x64010
void addToChatWindow(char *text, DWORD textColor)
{
if (!getSampBase())
return;
if (!text)
return;
DWORD chatinfo = getSampBase() + SAMP_CHAT_INFO_OFFSET;
DWORD func = getSampBase() + SAMP_FUNC_ADDTOCHATWND;
__asm mov eax, dword ptr[chatinfo]
__asm mov ecx, dword ptr[eax]
__asm push 0
__asm push textColor
__asm push 0
__asm push text
__asm push 8
__asm call func
}