DrawText

mrT101

Active member
Joined
Feb 18, 2014
Messages
58
Reaction score
0
Hey, is there any functions in GTA/SAMP that will allow me to draw text wherever i choose on the screen? i know of the High priority text and chat text but these are not what im looking for.
 

T3KTONIT

Well-known member
Joined
Sep 2, 2013
Messages
308
Reaction score
5
you can use D3D functions to draw text and 2d/3d boxes and whatever you want.

DrawText:
PHP:
void DrawText(int x, int y, DWORD color, const char *fmt, LPD3DXFONT g_pFont )
{
	RECT FontPos = { x, y, x + 120, y + 20 };
	char buf[1024] = {'\0'};
	va_list va_alist;

	va_start(va_alist, fmt);
	vsprintf_s(buf, fmt, va_alist);
	va_end(va_alist);

	g_pFont->DrawTextA(NULL, buf, -1, &FontPos, DT_NOCLIP, color);
}

you can get LPD3DXFONT g_pFont after hooking a d3d9 function (Endscene for example)
then just pass it to the function like :
DrawText(52,127, 0x0, "Heeeey!", pFont);
 
Top