made dis the other day. in b4 leachers
. ez add items just by adding strings to array. grr dumb highlight messes it up.
. ez add items just by adding strings to array. grr dumb highlight messes it up.Code:
struct Items
{
char *Name;
int Val;
}Hack[100];
struct MenuSettings
{
int CurrentIndex;
bool show;
}nMenu;
RECT Text;
cMenu Menu;
char *OnOff[] = { "0", "1" };
char *MenuItems[] = {
"Aimbot" ,
"Telekill",
"Name ESP" ,
"Box ESP" ,
"Weapon ESP"
};
void cMenu::DrawMenu( int x, int y, LPD3DXFONT g_pFont, LPDIRECT3DDEVICE9 pDevice )
{
if(GetAsyncKeyState(VK_INSERT)&1) nMenu.show =! nMenu.show;
if(nMenu.show)
{
if(GetAsyncKeyState(VK_UP)&1) if(nMenu.CurrentIndex > 0) nMenu.CurrentIndex--;
if(GetAsyncKeyState(VK_DOWN)&1) if(nMenu.CurrentIndex < sizeof( MenuItems ) / sizeof( MenuItems[0] ) - 1) nMenu.CurrentIndex++;
if(GetAsyncKeyState(VK_LEFT)&1) if(Hack[nMenu.CurrentIndex].Val > 0) Hack[nMenu.CurrentIndex].Val--;
if(GetAsyncKeyState(VK_RIGHT)&1) if(Hack[nMenu.CurrentIndex].Val < 1) Hack[nMenu.CurrentIndex].Val++;
for( int i = 0; i < sizeof( MenuItems ) / sizeof( MenuItems[0] ); i++ )
{
Hack[i].Name = MenuItems[i];
DWORD FontColor;
SetRect( &Text, x, y + (i * 20), x+150 , y + 20 + (i * 20) );
if(i != nMenu.CurrentIndex)
if(Hack[i].Val > 0)
FontColor = Green;
else
FontColor = Red;
else
FontColor = White;
g_pFont->DrawTextA(NULL, Hack[i].Name, -1, &Text, DT_NOCLIP, FontColor);
g_pFont->DrawTextA(NULL, OnOff[Hack[i].Val], -1, &Text, DT_RIGHT, FontColor);
}
SetRect( &Text, x, y - 20, x+150 , y );
g_pFont->DrawTextA(NULL, ("NOOB MENU"), -1, &Text, DT_CENTER, White);
}
}


