unknowncheats uc-forum.com ucdownloads ucdownloads.com

Go Back   UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials > First-Person Shooters > Counter Strike

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


Reply
 
Thread Tools Display Modes
  #1  
Old 12-24-2006, 07:49 AM
zero_tolerance zero_tolerance is offline
Senior Member
 
Join Date: Dec 2006
Posts: 289
Default Counter-Strike OpenGL Tutorial Part 2

By DoraTehExploda

Code:
/*

  Okay, now that you have successfully completed(or I am assuming you did since you are looking at this) a very simple
  walllhack,wireframe, and wiremodels, lets get into this a bit deeper...

*/

/*

  I am now assuming that you probably would love to get some hotkeys setup to enable/disable the all the bools you have
  done up to this point... I will now show you how this would be done...

*/

/*

  Make everything I have shown you up to this point just:
  
  bool wallhack;
  bool wireframe;
  bool wiremodel;

  Instead of the original:

  bool wallhack = true;
  bool wireframe = true;
  bool wiremodel = true;

  Now, since thats done, go ahead and do this also.. Its used for key toggling...

  bool num1pressed = false;
  bool num2pressed = false;
  bool num3pressed = false;

  Now, for the actual coding of the key toggles.. This also goes into glBegin.. Above or below your wallhack, wireframe,
  and wiremodel code...

  */

if(GetAsyncKeyState(VK_NUMPAD1) <0 && ! num1pressed)
{
	wallhack = !wallhack;
	num1pressed = true;
}
else if(!(GetAsyneKeyState(VK_NUMPAD1) <0))
{
	num1pressed = false;
}

if(GetAsyncKeyState(VK_NUMPAD2) <0 && ! num2pressed)
{
	wireframe = !wireframe;
	num2pressed = true;
}
else if(!(GetAsyneKeyState(VK_NUMPAD2) <0))
{
	num2pressed = false;
}

if(GetAsyncKeyState(VK_NUMPAD3) <0 && ! num3pressed)
{
	wiremodel = !wiremodel;
	num3pressed = true;
}
else if(!(GetAsyneKeyState(VK_NUMPAD3) <0))
{
	num3pressed = false;
}


/*

  Now, this is all complete.. The next tutorial will feature more hack based stuff to go off of.. Again, if there is any
  question's just feel free to ask, I am a helpdesk and will help to the best of my knowledge... Enjoy everyone...

  DoraTehExploda

 */
Credits -> Kalvin for overlooking my key toggling code and helping me fix the not wanting to toggle off.. Mad <3...


Garrett
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
counterstrike, opengl, tutorial

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 07:57 PM.