Advertisement
Mango_Knife

Call Of Duty Ghosts - Single Player - Key_IsDown [C#] - 1.13

Jun 4th, 2014
667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.74 KB | None | 0 0
  1.             #region Key_IsDown
  2.             private static void GetMemoryR(uint Address, ref byte[] Bytes)
  3.             {
  4.                 PS3.GetMemory(Address, Bytes);
  5.             }
  6.             public static string Key_IsDown()
  7.             {
  8.                 uint Key_isDown = 0x013793cd;
  9.                 byte[] Key = new byte[3];
  10.                 GetMemoryR(Key_isDown, ref Key);
  11.                 string mystring = null;
  12.                 mystring = BitConverter.ToString(Key);
  13.                 string result = mystring.Replace("-", "");
  14.                 string result1 = result.Replace(" ", "");
  15.                 string key = result1;
  16.                 string KeyPressed = "";
  17.                 if (((key == "000030")|| (key == "000230")) || (key == "000130"))
  18.                 {
  19.                     KeyPressed = "[ ]";
  20.                 }
  21.                 else if (key == "000400")
  22.                 {
  23.                     KeyPressed = "X";
  24.                 }
  25.                 else if (((key == "002002") || (key == "002202")) || (key == "002102"))
  26.                 {
  27.                     KeyPressed = "L3";
  28.                 }
  29.                 else if (((key == "000004") || (key == "000204")) || (key == "000104"))
  30.                 {
  31.                     KeyPressed = "R3";
  32.                 }
  33.                 else if (((key == "080800") || (key == "080A00")) || (key == "080900"))
  34.                 {
  35.                     KeyPressed = "L1";
  36.                 }
  37.                 else if (((key == "000101") || (key == "000201")) || (key == "000001"))
  38.                 {
  39.                     KeyPressed = "R1";
  40.                 }
  41.                 else if (((key == "004000") || (key == "004200")) || (key == "004100"))
  42.                 {
  43.                     KeyPressed = "R2";
  44.                 }
  45.                 else if (((key == "008100") || (key == "008200")) || (key == "008000"))
  46.                 {
  47.                     KeyPressed = "L2";
  48.                 }
  49.                 else if (((key == "002006") || (key == "002206")) || (key == "002106"))
  50.                 {
  51.                     KeyPressed = "L3 + R3";
  52.                 }
  53.                 else
  54.                 {
  55.                     KeyPressed = key;
  56.                 }
  57.                 return KeyPressed;
  58.             }
  59.             //Exmple:
  60.             //Use Timer/Thread/backgroundWorker or whatever you want, aslong that is run like a timer.
  61.             public void Test()
  62.             {
  63.                 if (Key_IsDown() == "X")
  64.                 {
  65.                     MessageBox.Show("The button X Have been pressed", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
  66.                     //When you will press the button "X" you will get this messageBox pop up.
  67.                 }
  68.             }
  69.             #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement