How to make?

LupusGG

New member
Joined
Nov 10, 2017
Messages
2
Reaction score
0
How i can make .asi to send messages like /nope  - my first mod or someting.. 
full code pls :)
 

user88

Well-known member
Joined
Jun 29, 2017
Messages
426
Reaction score
165
Location
LINK CLEO DICE HACK HERE!
copy and paste into editor.

Code:
void SAMP::addToChatWindow(char *text, DWORD textColor)
{
	traceLastFunc("addToChatWindow()");
	if (g_pStatic->g_dwSAMPAddr == NULL)
		return;

	if (!text)
		return;

	DWORD    chatinfo = g_pStatic->g_dwSAMPAddr + 0x21A0E4;
	DWORD    func = g_pStatic->g_dwSAMPAddr + 0x64010;

	__asm
	{
		MOV eax, dword ptr[chatinfo]
		MOV ecx, dword ptr[eax]
		PUSH 0
		PUSH textColor
		PUSH 0
		PUSH text
		PUSH 8
		CALL func
	}
}

void SAMP::addMessageToChatWindow(DWORD Color, const char *text, ...)
{
	traceLastFunc("addMessageToChatWindow()");
	if (g_pStatic->g_dwSAMPAddr != NULL)
	{
		va_list ap;
		if (text == NULL)
			return;

		char    tmp[512];
		memset(tmp, 0, 512);

		va_start(ap, text);
		vsnprintf(tmp, sizeof(tmp) - 1, text, ap);
		va_end(ap);

		addToChatWindow(tmp, Color);
	}
}


save as .dll
inject dll done..


profit!
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
Code:
traceLastFunc("addToChatWindow()");
    if (g_pStatic->g_dwSAMPAddr == NULL)
        return;

    if (!text)
        return;

    DWORD    chatinfo = g_pStatic->g_dwSAMPAddr + 0x21A0E4;
    DWORD    func = g_pStatic->g_dwSAMPAddr + 0x64010;

traceLastFunc is a s0b func, he dont have g_dwSAMPAddr, its not "save as .dll inject dll done.. profit!"
 
Top