unknowncheats uc-forum.com ucdownloads ucdownloads.com

Go Back   UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials > First-Person Shooters > Other FPS Games > Half Life

- Sponsored Advertisement -
http://www.myfpscheats.com/


Reply
 
Thread Tools Display Modes
  #1  
Old 01-22-2007, 03:58 PM
Neo_Reloaded Neo_Reloaded is offline
Tutorial Admin
 
Join Date: Dec 2006
Posts: 259
Default Old Menu Class

By CrazyLord

This is the old class i used for my (old ) opengl cheat (you can also use it for client offcourse).
I know it is rather irritating to add chars for every entry, etc, but who knows someday i'll improve the code and post it here

Please notice that this code is not to edit the values, but to draw it

Interesting? Please give comment and credits would be nice
This is the code:
Code:
class menu {
private:
	int start_x;
	int new_y;
	int y_plus;
public:
	void add(bool VARIABLE,char variable[30],const char *text) 
	{
		if (VARIABLE)
			sprintf(variable,"%s: On",text);
		else
			sprintf(variable,"%s: Off",text); 
	}
	void check(int pospos,char variable[30])
	{
		if (menuPos==pospos) 
		{
			glPrint1(start_x,new_y,variable,1.0f,0.0f,0.0f,GLUT_BITMAP_HELVETICA_12);
			new_y = y_plus;
		}
		else
		{
			glPrint1(start_x,new_y,variable,1.0f,1.0f,1.0f,GLUT_BITMAP_HELVETICA_12);
			new_y += y_plus;
		}
	}
	void Set_Start(int x,int y,int difference)
	{
		start_x = x;		
		new_y = y;
		y_plus = difference;
	}
};
And this is a example:
Code:
void drawMenu()
{
	Box(200,215,200,426,255,255,255,0);
	DrawHudString(300,210,65,50,80,"Menu");

	char wglowentry[30],espentry[30];

	menu menu;

	menu.Set_Start(203,232,13);

	menu.add(var.wglow,wglowentry,"Glow");
	menu.add(var.esp,espentry,"Esp");

	menu.check(0,wglowentry);
	menu.check(1,espentry);
}
Reply With Quote
Reply

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit

Tags
class, menu

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 04:06 PM.