BaSs_HaXoR

(C#) Unfair Aimbot - All Clients

Nov 16th, 2014
1,484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 77.74 KB | None | 0 0
  1. //http://www.nextgenupdate.com/forums/modern-warfare-3-mods-patches-tutorials/759859-mw3-1-24-c-source-aimbot-unfair-all-clients.html
  2. //Credits: zRayz-
  3. //Download: http://www.mediafire.com/download/au2tdp5muddmejb/AimbotUnfair+C%23.rar
  4.  
  5. //Form1.cs
  6. using System;
  7. using System.Collections.Generic;
  8. using System.ComponentModel;
  9. using System.Data;
  10. using System.Drawing;
  11. using System.Linq;
  12. using System.Text;
  13. using System.Threading.Tasks;
  14. using System.Windows.Forms;
  15. using System.Threading;
  16. using MetroFramework;
  17. using PS3Lib;
  18.  
  19. namespace AimbotNGU
  20. {
  21.     public partial class Form1 : MetroFramework.Forms.MetroForm
  22.     {
  23.         public static PS3API PS3 = new PS3API();
  24.         public static uint ProcessID;
  25.         public static uint[] processIDs;
  26.         private uint Client;
  27.         public static string snresult;
  28.         public static string Info;
  29.         public static PS3TMAPI.ConnectStatus connectStatus;
  30.         public static string Status;
  31.         public static string MemStatus;
  32.         private Random rand = new Random();
  33.         public static CCAPI CCAPI = new CCAPI();
  34.         public static uint PlayersName = 0x01BBBC2C;
  35.         public Form1()
  36.         {
  37.             InitializeComponent();
  38.         }
  39.  
  40.         #region Aimbot
  41.         private void StartAimbot(UInt32 Client)
  42.         {
  43.             //Checks if player is aiming.
  44.             //Guckt ob der Spieler ziehlt.
  45.             if (RPC.Aimbot_and_ForgeMode.ReadFloat(0x110a5f8 + (Client * 0x3980)) > 0)
  46.                 RPC.Aimbot_and_ForgeMode.Aimbot(Client, RPC.Aimbot_and_ForgeMode.FindClosestEnemy(Client));
  47.         }
  48.         private void StartForgeMode(UInt32 Client)
  49.         {
  50.             //Checks if player is aiming.
  51.             //Guckt ob der Spieler ziehlt.
  52.             uint Enemy = RPC.Aimbot_and_ForgeMode.FindClosestEnemy(Client);
  53.             //This is just only a way you can use Key_Down.
  54.             //Das ist nur ein weg um es zu nutzen benutz am besten Key_Down.
  55.             if (RPC.Aimbot_and_ForgeMode.ReadFloat(0x110a5f8 + ((uint)Client * 0x3980)) > 0)
  56.             {
  57.                 RPC.Aimbot_and_ForgeMode.Freeze(Enemy, true);
  58.                 RPC.Aimbot_and_ForgeMode.ForgeMode(Client, Enemy);
  59.             }
  60.             else
  61.             {
  62.                 RPC.Aimbot_and_ForgeMode.Freeze(Enemy, false);
  63.             }
  64.         }
  65.         #endregion
  66.  
  67.         private void Form1_Load(object sender, EventArgs e)
  68.         {
  69.                
  70.                 // Hope you will have a fun and maybe you will make better this Type of unfair aimbot <3 //
  71.                // Follow me at Youtube : Rayz1337 Facebook : Rayz MoDz //
  72.               // You need help ' Add me on Facebook or Skype ;) //
  73.              // Facebook url : https://www.facebook.com/Rayz1337 //
  74.         }
  75.  
  76.         private void button1_Click(object sender, EventArgs e)
  77.         {
  78.             if (PS3.ConnectTarget())
  79.             {
  80.                 string Message = "Connected";
  81.                 MessageBox.Show(Message, "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  82.             }
  83.             else
  84.             {
  85.                 string Message = "Impossible to connect";
  86.                 MessageBox.Show(Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
  87.             }
  88.             if (PS3.AttachProcess())
  89.             {
  90.                 string Message = "Attached";
  91.                 MessageBox.Show(Message, "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  92.                 RPC.Enable();
  93.                 RPC.EnableRPC();
  94.             }
  95.             else
  96.             {
  97.                 MessageBox.Show("Cant'attach", "Error.", MessageBoxButtons.OK, MessageBoxIcon.Error);
  98.             }
  99.         }
  100.  
  101.         private void button2_Click(object sender, EventArgs e)
  102.         {
  103.             if (button2.Text == "Aimbot Unfair [OFF]")
  104.             {
  105.                 timer1.Start();
  106.                 timer2.Start();
  107.                 RPC.iPrintln((int)numericUpDown1.Value, "Aimbot Unfair ^2ON");
  108.                 button2.Text = "Aimbot Unfair [ON]";
  109.             }
  110.             else if (button2.Text == "Aimbot Unfair [ON]")
  111.             {
  112.                 timer1.Stop();
  113.                 timer2.Stop();
  114.                 RPC.iPrintln((int)numericUpDown1.Value, "Aimbot Unfair ^2ON");
  115.                 button2.Text = "Aimbot Unfair [OFF]";
  116.             }
  117.         }
  118.  
  119.         #region Aimbot Unfair
  120.         public static UInt32 G_Entity(Int32 clientIndex, UInt32 Mod = 0)
  121.         {
  122.             return ((0xfca280 + Mod) + ((UInt32)(0x280 * clientIndex)));
  123.         }
  124.         public static void PlayerDie(uint Killer, uint Victim)
  125.         {
  126.             RPC.Call(0x183E18, G_Entity((int)Victim), G_Entity((int)Killer), G_Entity((int)0), 0xD00CFF6C, 0xD00CFFA8, 0x64, 0, 1, 0, 0x1378, 0x10008DA0, 0xD00CFF24, 0xD00CF12C);
  127.         }
  128.         public void unfire(int Killer)
  129.         {
  130.             if (Buttons.PressL1R1((int)numericUpDown1.Value))
  131.             {
  132.                 Thread.Sleep(50);
  133.                 PlayerDie((uint)numericUpDown1.Value, 0);
  134.                 Thread.Sleep(50);
  135.                 PlayerDie((uint)numericUpDown1.Value, 1);
  136.                 Thread.Sleep(50);
  137.                 PlayerDie((uint)numericUpDown1.Value, 2);
  138.                 Thread.Sleep(50);
  139.                 PlayerDie((uint)numericUpDown1.Value, 3);
  140.                 Thread.Sleep(50);
  141.                 PlayerDie((uint)numericUpDown1.Value, 4);
  142.                 Thread.Sleep(50);
  143.                 PlayerDie((uint)numericUpDown1.Value, 5);
  144.                 Thread.Sleep(50);
  145.                 PlayerDie((uint)numericUpDown1.Value, 6);
  146.                 Thread.Sleep(50);
  147.                 PlayerDie((uint)numericUpDown1.Value, 7);
  148.                 Thread.Sleep(50);
  149.                 PlayerDie((uint)numericUpDown1.Value, 8);
  150.                 Thread.Sleep(50);
  151.                 PlayerDie((uint)numericUpDown1.Value, 9);
  152.                 Thread.Sleep(50);
  153.                 PlayerDie((uint)numericUpDown1.Value, 10);
  154.                 Thread.Sleep(50);
  155.                 PlayerDie((uint)numericUpDown1.Value, 11);
  156.                 Thread.Sleep(50);
  157.                 PlayerDie((uint)numericUpDown1.Value, 12);
  158.                 Thread.Sleep(50);
  159.                 PlayerDie((uint)numericUpDown1.Value, 13);
  160.                 Thread.Sleep(50);
  161.                 PlayerDie((uint)numericUpDown1.Value, 14);
  162.                 Thread.Sleep(50);
  163.                 PlayerDie((uint)numericUpDown1.Value, 15);
  164.                 Thread.Sleep(50);
  165.                 PlayerDie((uint)numericUpDown1.Value, 16);
  166.                 Thread.Sleep(50);
  167.                 PlayerDie((uint)numericUpDown1.Value, 17);
  168.                 Thread.Sleep(0);
  169.  
  170.             }
  171.         }
  172.         #endregion
  173.  
  174.         #region Aimbot UnfairR1
  175.  
  176.         public void unfireR1(int Killer)
  177.         {
  178.             if (Buttons.PressR1((int)numericUpDown1.Value))
  179.             {
  180.                 Thread.Sleep(50);
  181.                 PlayerDie((uint)numericUpDown1.Value, 0);
  182.                 Thread.Sleep(50);
  183.                 PlayerDie((uint)numericUpDown1.Value, 1);
  184.                 Thread.Sleep(50);
  185.                 PlayerDie((uint)numericUpDown1.Value, 2);
  186.                 Thread.Sleep(50);
  187.                 PlayerDie((uint)numericUpDown1.Value, 3);
  188.                 Thread.Sleep(50);
  189.                 PlayerDie((uint)numericUpDown1.Value, 4);
  190.                 Thread.Sleep(50);
  191.                 PlayerDie((uint)numericUpDown1.Value, 5);
  192.                 Thread.Sleep(50);
  193.                 PlayerDie((uint)numericUpDown1.Value, 6);
  194.                 Thread.Sleep(50);
  195.                 PlayerDie((uint)numericUpDown1.Value, 7);
  196.                 Thread.Sleep(50);
  197.                 PlayerDie((uint)numericUpDown1.Value, 8);
  198.                 Thread.Sleep(50);
  199.                 PlayerDie((uint)numericUpDown1.Value, 9);
  200.                 Thread.Sleep(50);
  201.                 PlayerDie((uint)numericUpDown1.Value, 10);
  202.                 Thread.Sleep(50);
  203.                 PlayerDie((uint)numericUpDown1.Value, 11);
  204.                 Thread.Sleep(50);
  205.                 PlayerDie((uint)numericUpDown1.Value, 12);
  206.                 Thread.Sleep(50);
  207.                 PlayerDie((uint)numericUpDown1.Value, 13);
  208.                 Thread.Sleep(50);
  209.                 PlayerDie((uint)numericUpDown1.Value, 14);
  210.                 Thread.Sleep(50);
  211.                 PlayerDie((uint)numericUpDown1.Value, 15);
  212.                 Thread.Sleep(50);
  213.                 PlayerDie((uint)numericUpDown1.Value, 16);
  214.                 Thread.Sleep(50);
  215.                 PlayerDie((uint)numericUpDown1.Value, 17);
  216.                 Thread.Sleep(0);
  217.  
  218.             }
  219.         }
  220.         #endregion
  221.  
  222.         private void timer1_Tick(object sender, EventArgs e)
  223.         {
  224.             unfire((int)numericUpDown1.Value);
  225.         }
  226.  
  227.         private void timer2_Tick(object sender, EventArgs e)
  228.         {
  229.             unfireR1((int)numericUpDown1.Value);
  230.         }
  231.  
  232.         private void button3_Click(object sender, EventArgs e)
  233.         {
  234.             try
  235.             {
  236.                 HOST.Text = RPC.ServerInfo.getHostName();
  237.                 MAP.Text = RPC.ServerInfo.getMapName();
  238.                 MODE.Text = RPC.ServerInfo.getGameMode();
  239.  
  240.                 for (int i = 0; i < 18; i++)
  241.                 {
  242.                     dataGridView1.Enabled = true;
  243.                     dataGridView1.RowCount = 18;
  244.                     dataGridView1.Rows[i].Cells[0].Value = i;
  245.                     dataGridView1.Rows[i].Cells[1].Value = GetName(i);
  246.                     Application.DoEvents();
  247.  
  248.                 }
  249.             }
  250.             catch
  251.             {
  252.                 for (int i = 0; i < 18; i++)
  253.                 {
  254.                     HOST.Text = "Null";
  255.                     MAP.Text = "Null";
  256.                     MODE.Text = "Null";
  257.                     dataGridView1.RowCount = 18;
  258.                     dataGridView1.Rows[i].Cells[0].Value = i;
  259.                     dataGridView1.Rows[i].Cells[1].Value = "";
  260.                 }
  261.             }
  262.         }
  263.  
  264.         #region GetName
  265.         public static uint NameAddress = 0x0110d60c;
  266.         public static string GetName(int client)
  267.         {
  268.             byte[] buffer = new byte[16];
  269.             PS3.GetMemory(NameAddress + 0x3980 * (uint)client, buffer);
  270.             string names = Encoding.ASCII.GetString(buffer);
  271.             names = names.Replace("\0", "");
  272.             return names;
  273.         }
  274.         #endregion
  275.  
  276.         private void button4_Click(object sender, EventArgs e)
  277.         {
  278.             if (button4.Text == "Aimbot Classic [OFF]")
  279.             {
  280.                 timer3.Start();
  281.                 RPC.iPrintln((int)numericUpDown1.Value, "Aimbot Classic ^2ON");
  282.                 button4.Text = "Aimbot Classic [ON]";
  283.             }
  284.             else if (button4.Text == "Aimbot Classic [ON]")
  285.             {
  286.                 timer3.Stop();
  287.                 RPC.iPrintln((int)numericUpDown1.Value, "Aimbot Classic ^1OFF");
  288.                 button4.Text = "Aimbot Classic [OFF]";
  289.             }
  290.         }
  291.  
  292.         private void timer3_Tick(object sender, EventArgs e)
  293.         {
  294.             StartAimbot((uint)numericUpDown1.Value);
  295.         }
  296.     }
  297. }
  298.  
  299. //Button.cs
  300. using System;
  301. using System.Collections.Generic;
  302. using System.Linq;
  303. using System.Text;
  304. using System.Threading.Tasks;
  305. using PS3Lib;
  306.  
  307. namespace AimbotNGU
  308. {
  309.     class Buttons
  310.     {
  311.         public static uint
  312.                 X = 1024,
  313.                 O = 512,
  314.                 Square = 2097152,
  315.                 L3 = 139264,
  316.                 R3 = 67371008,
  317.                 L2 = 32768,
  318.                 R2 = 16384,
  319.                 Start = 128,
  320.                 L1 = 2056,
  321.                 R1 = 65536,
  322.                 Crouch = 512,
  323.                 Prone = 256;
  324.  
  325.         public static uint getPlayerState(int clientIndex)
  326.         {
  327.             byte[] ClientPtr = new byte[4];
  328.             PS3.GetMemoryR(0xFCA280 + ((uint)clientIndex * 0x280) + 0x158, ref ClientPtr);
  329.             Array.Reverse(ClientPtr);
  330.             uint Next = BitConverter.ToUInt32(ClientPtr, 0);
  331.             return Next;
  332.         }
  333.  
  334.         public static uint UseButtonMonitoring(int client)
  335.         {
  336.             return (getPlayerState(client) + 0x3609);
  337.         }
  338.  
  339.         public static uint DetectButton(int clientID)
  340.         {
  341.             byte[] Button = new byte[4];
  342.             PS3.GetMemoryR(UseButtonMonitoring(clientID), ref Button);
  343.             return System.BitConverter.ToUInt32(Button, 0);
  344.         }
  345.  
  346.         public static bool PressR1(int client)
  347.         {
  348.             uint ButtonDown = DetectButton(client);
  349.             if (ButtonDown == Buttons.R1 || ButtonDown == Buttons.R1 + Buttons.Crouch || ButtonDown == Buttons.R1 + Buttons.Prone)
  350.             {
  351.                 return true;
  352.             }
  353.             return false;
  354.         }
  355.         public static bool PressL1R1(int client)
  356.         {
  357.             uint ButtonDown = DetectButton(client);
  358.             if (ButtonDown == Buttons.L1 + Buttons.R1 || ButtonDown == Buttons.L1 + Buttons.R1 + Buttons.Crouch || ButtonDown == Buttons.L1 + Buttons.R1 + Buttons.Prone)
  359.             {
  360.                 return true;
  361.             }
  362.             return false;
  363.         }
  364.     }
  365. }
  366.  
  367. //Offset.cs
  368. using System;
  369. using System.Collections.Generic;
  370. using System.Linq;
  371. using System.Text;
  372. using System.Threading.Tasks;
  373.  
  374. namespace AimbotNGU
  375. {
  376.     class Offset
  377.     {
  378.         public static UInt32
  379.                 G_HudElems = 0xF0E10C,
  380.                 HudelemSize = 0xB8,
  381.                 InGame = 0x7F072C,
  382.                 LevelTime = 0xFC3DB0,
  383.                 G_Client = 0x110A280,
  384.                 G_ClientSize = 0x3980,
  385.                 G_Entity = 0xFCA280,
  386.                 G_EntitySize = 0x280,
  387.                 ButtonMonitoring = 0xFCA280,
  388.                 PlayerName = 0x1BBBC2C,
  389.                 ClientName = G_Client + 0x338C,
  390.                 FreezeClient = G_Client + 0x35FF;
  391.     }
  392. }
  393.  
  394. //PS3.cs
  395. using System;
  396. using System.Collections.Generic;
  397. using System.Linq;
  398. using System.Text;
  399. using System.Threading.Tasks;
  400. using PS3Lib;
  401.  
  402. namespace AimbotNGU
  403. {
  404.     class PS3
  405.     {
  406.         public static PS3API PS31 = new PS3API();
  407.     private static PS3API DEX = new PS3API(SelectAPI.TargetManager);
  408.  
  409.         public static void ChangeAPI(SelectAPI API)
  410.         {
  411.             DEX.ChangeAPI(API);
  412.         }
  413.  
  414.         public static void Connect()
  415.         {
  416.             DEX.ConnectTarget(0);
  417.             DEX.AttachProcess();
  418.         }
  419.         public static SelectAPI CurrentAPI;
  420.         public static byte[] GetBytes(uint offset, int length, SelectAPI API)
  421.         {
  422.             byte[] bytes = new byte[length];
  423.             if (API == SelectAPI.ControlConsole)
  424.             {
  425.                 return DEX.GetBytes(offset, length);
  426.             }
  427.             if (API == SelectAPI.TargetManager)
  428.             {
  429.                 bytes = DEX.GetBytes(offset, length);
  430.             }
  431.             return bytes;
  432.         }
  433.  
  434.  
  435.         public static SelectAPI GetCurrentAPI()
  436.         {
  437.             return DEX.GetCurrentAPI();
  438.         }
  439.  
  440.         public static byte[] GetMemory(uint offset, int length)
  441.         {
  442.             byte[] buffer = new byte[length];
  443.             DEX.GetMemory(offset, buffer);
  444.             return buffer;
  445.         }
  446.  
  447.         public static byte[] GetMemoryL(uint address, int length)
  448.         {
  449.             byte[] buffer = new byte[length];
  450.             DEX.GetMemory(address, buffer);
  451.             return buffer;
  452.         }
  453.  
  454.         public static void GetMemoryR(uint Address, ref byte[] Bytes)
  455.         {
  456.             DEX.GetMemory(Address, Bytes);
  457.         }
  458.  
  459.         public static void SetMemory(uint Address, byte[] Bytes)
  460.         {
  461.             DEX.SetMemory(Address, Bytes);
  462.         }
  463.  
  464.         public class Extension
  465.         {
  466.             private static SelectAPI CurrentAPI;
  467.  
  468.             private static byte[] GetBytes(uint offset, int length, SelectAPI API)
  469.             {
  470.                 byte[] bytes = new byte[length];
  471.                 if (API == SelectAPI.ControlConsole)
  472.                 {
  473.                     return PS3.DEX.GetBytes(offset, length);
  474.                 }
  475.                 if (API == SelectAPI.TargetManager)
  476.                 {
  477.                     bytes = PS3.DEX.GetBytes(offset, length);
  478.                 }
  479.                 return bytes;
  480.             }
  481.  
  482.             private static void GetMem(uint offset, byte[] buffer, SelectAPI API)
  483.             {
  484.                 if (API == SelectAPI.ControlConsole)
  485.                 {
  486.                     PS3.GetMemoryR(offset, ref buffer);
  487.                 }
  488.                 else if (API == SelectAPI.TargetManager)
  489.                 {
  490.                     PS3.GetMemoryR(offset, ref buffer);
  491.                 }
  492.             }
  493.  
  494.             public static bool ReadBool(uint offset)
  495.             {
  496.                 byte[] buffer = new byte[1];
  497.                 GetMem(offset, buffer, CurrentAPI);
  498.                 return (buffer[0] != 0);
  499.             }
  500.  
  501.             public static byte ReadByte(uint offset)
  502.             {
  503.                 return GetBytes(offset, 1, CurrentAPI)[0];
  504.             }
  505.  
  506.             public static byte[] ReadBytes(uint offset, int length)
  507.             {
  508.                 return GetBytes(offset, length, CurrentAPI);
  509.             }
  510.  
  511.             public static float ReadFloat(uint offset)
  512.             {
  513.                 byte[] array = GetBytes(offset, 4, CurrentAPI);
  514.                 Array.Reverse(array, 0, 4);
  515.                 return BitConverter.ToSingle(array, 0);
  516.             }
  517.  
  518.             public static short ReadInt16(uint offset)
  519.             {
  520.                 byte[] array = GetBytes(offset, 2, CurrentAPI);
  521.                 Array.Reverse(array, 0, 2);
  522.                 return BitConverter.ToInt16(array, 0);
  523.             }
  524.  
  525.             public static int ReadInt32(uint offset)
  526.             {
  527.                 byte[] array = GetBytes(offset, 4, CurrentAPI);
  528.                 Array.Reverse(array, 0, 4);
  529.                 return BitConverter.ToInt32(array, 0);
  530.             }
  531.  
  532.             public static long ReadInt64(uint offset)
  533.             {
  534.                 byte[] array = GetBytes(offset, 8, CurrentAPI);
  535.                 Array.Reverse(array, 0, 8);
  536.                 return BitConverter.ToInt64(array, 0);
  537.             }
  538.  
  539.             public static sbyte ReadSByte(uint offset)
  540.             {
  541.                 byte[] buffer = new byte[1];
  542.                 GetMem(offset, buffer, CurrentAPI);
  543.                 return (sbyte) buffer[0];
  544.             }
  545.  
  546.             public static string ReadString(uint offset)
  547.             {
  548.                 int length = 40;
  549.                 int num2 = 0;
  550.                 string source = "";
  551.                 do
  552.                 {
  553.                     byte[] bytes = ReadBytes(offset + ((uint) num2), length);
  554.                     source = source + Encoding.UTF8.GetString(bytes);
  555.                     num2 += length;
  556.                 }
  557.                 while (!source.Contains<char>('\0'));
  558.                 int index = source.IndexOf('\0');
  559.                 string str2 = source.Substring(0, index);
  560.                 source = string.Empty;
  561.                 return str2;
  562.             }
  563.  
  564.             public static ushort ReadUInt16(uint offset)
  565.             {
  566.                 byte[] array = GetBytes(offset, 2, CurrentAPI);
  567.                 Array.Reverse(array, 0, 2);
  568.                 return BitConverter.ToUInt16(array, 0);
  569.             }
  570.  
  571.             public static uint ReadUInt32(uint offset)
  572.             {
  573.                 byte[] array = GetBytes(offset, 4, CurrentAPI);
  574.                 Array.Reverse(array, 0, 4);
  575.                 return BitConverter.ToUInt32(array, 0);
  576.             }
  577.  
  578.             public static ulong ReadUInt64(uint offset)
  579.             {
  580.                 byte[] array = GetBytes(offset, 8, CurrentAPI);
  581.                 Array.Reverse(array, 0, 8);
  582.                 return BitConverter.ToUInt64(array, 0);
  583.             }
  584.  
  585.             public static byte[] ReverseArray(float float_0)
  586.             {
  587.                 byte[] bytes = BitConverter.GetBytes(float_0);
  588.                 Array.Reverse(bytes);
  589.                 return bytes;
  590.             }
  591.  
  592.             public static byte[] ReverseBytes(byte[] inArray)
  593.             {
  594.                 Array.Reverse(inArray);
  595.                 return inArray;
  596.             }
  597.  
  598.             private static void SetMem(uint Address, byte[] buffer, SelectAPI API)
  599.             {
  600.                 PS3.DEX.SetMemory(Address, buffer);
  601.             }
  602.  
  603.             public static byte[] ToHexFloat(float Axis)
  604.             {
  605.                 byte[] bytes = BitConverter.GetBytes(Axis);
  606.                 Array.Reverse(bytes);
  607.                 return bytes;
  608.             }
  609.  
  610.             public static byte[] uintBytes(uint input)
  611.             {
  612.                 byte[] bytes = BitConverter.GetBytes(input);
  613.                 Array.Reverse(bytes);
  614.                 return bytes;
  615.             }
  616.  
  617.             public static void WriteBool(uint offset, bool input)
  618.             {
  619.                 byte[] buffer = new byte[] { input ? ((byte) 1) : ((byte) 0) };
  620.                 SetMem(offset, buffer, CurrentAPI);
  621.             }
  622.  
  623.             public static void WriteByte(uint offset, byte input)
  624.             {
  625.                 byte[] buffer = new byte[] { input };
  626.                 SetMem(offset, buffer, CurrentAPI);
  627.             }
  628.  
  629.             public static void WriteBytes(uint offset, byte[] input)
  630.             {
  631.                 byte[] buffer = input;
  632.                 SetMem(offset, buffer, CurrentAPI);
  633.             }
  634.  
  635.             public static void WriteFloat(uint offset, float input)
  636.             {
  637.                 byte[] array = new byte[4];
  638.                 BitConverter.GetBytes(input).CopyTo(array, 0);
  639.                 Array.Reverse(array, 0, 4);
  640.                 SetMem(offset, array, CurrentAPI);
  641.             }
  642.  
  643.             public static void WriteInt16(uint offset, short input)
  644.             {
  645.                 byte[] array = new byte[2];
  646.                 BitConverter.GetBytes(input).CopyTo(array, 0);
  647.                 Array.Reverse(array, 0, 2);
  648.                 SetMem(offset, array, CurrentAPI);
  649.             }
  650.  
  651.             public static void WriteInt32(uint offset, int input)
  652.             {
  653.                 byte[] array = new byte[4];
  654.                 BitConverter.GetBytes(input).CopyTo(array, 0);
  655.                 Array.Reverse(array, 0, 4);
  656.                 SetMem(offset, array, CurrentAPI);
  657.             }
  658.  
  659.             public static void WriteInt64(uint offset, long input)
  660.             {
  661.                 byte[] array = new byte[8];
  662.                 BitConverter.GetBytes(input).CopyTo(array, 0);
  663.                 Array.Reverse(array, 0, 8);
  664.                 SetMem(offset, array, CurrentAPI);
  665.             }
  666.  
  667.             public static void WriteSByte(uint offset, sbyte input)
  668.             {
  669.                 byte[] buffer = new byte[] { (byte) input };
  670.                 SetMem(offset, buffer, CurrentAPI);
  671.             }
  672.  
  673.             public static void WriteString(uint offset, string input)
  674.             {
  675.                 byte[] bytes = Encoding.UTF8.GetBytes(input);
  676.                 Array.Resize<byte>(ref bytes, bytes.Length + 1);
  677.                 SetMem(offset, bytes, CurrentAPI);
  678.             }
  679.  
  680.             public static void WriteUInt16(uint offset, ushort input)
  681.             {
  682.                 byte[] array = new byte[2];
  683.                 BitConverter.GetBytes(input).CopyTo(array, 0);
  684.                 Array.Reverse(array, 0, 2);
  685.                 SetMem(offset, array, CurrentAPI);
  686.             }
  687.  
  688.             public static void WriteUInt32(uint offset, uint input)
  689.             {
  690.                 byte[] array = new byte[4];
  691.                 BitConverter.GetBytes(input).CopyTo(array, 0);
  692.                 Array.Reverse(array, 0, 4);
  693.                 SetMem(offset, array, CurrentAPI);
  694.             }
  695.  
  696.             public static void WriteUInt64(uint offset, ulong input)
  697.             {
  698.                 byte[] array = new byte[8];
  699.                 BitConverter.GetBytes(input).CopyTo(array, 0);
  700.                 Array.Reverse(array, 0, 8);
  701.                 SetMem(offset, array, CurrentAPI);
  702.             }
  703.         }
  704.     }
  705. }
  706.  
  707. //RPC.cs
  708. using System;
  709. using System.Collections.Generic;
  710. using System.Linq;
  711. using System.Text;
  712. using System.Threading.Tasks;
  713. using System.Threading;
  714.  
  715. namespace AimbotNGU
  716. {
  717.     class RPC
  718.     {
  719.       #region RPC
  720.         public static void Enable()
  721.         {
  722.  
  723.             if (PS3.Extension.ReadString(0x00277213) == "H")
  724.             {
  725.                 //This will check if the RPC is set already, to prevent freeze's.
  726.             }
  727.             else
  728.             {
  729.                 byte[] WritePPC = new byte[] {0x3F,0x80,0x10,0x05,0x81,0x9C,0x00,0x48,0x2C,0x0C,0x00,0x00,0x41,0x82,0x00,0x78,
  730.                                         0x80,0x7C,0x00,0x00,0x80,0x9C,0x00,0x04,0x80,0xBC,0x00,0x08,0x80,0xDC,0x00,0x0C,
  731.                                         0x80,0xFC,0x00,0x10,0x81,0x1C,0x00,0x14,0x81,0x3C,0x00,0x18,0x81,0x5C,0x00,0x1C,
  732.                                         0x81,0x7C,0x00,0x20,0xC0,0x3C,0x00,0x24,0xC0,0x5C,0x00,0x28,0xC0,0x7C,0x00,0x2C,
  733.                                         0xC0,0x9C,0x00,0x30,0xC0,0xBC,0x00,0x34,0xC0,0xDC,0x00,0x38,0xC0,0xFC,0x00,0x3C,
  734.                                         0xC1,0x1C,0x00,0x40,0xC1,0x3C,0x00,0x44,0x7D,0x89,0x03,0xA6,0x4E,0x80,0x04,0x21,
  735.                                         0x38,0x80,0x00,0x00,0x90,0x9C,0x00,0x48,0x90,0x7C,0x00,0x4C,0xD0,0x3C,0x00,0x50,
  736.                                         0x48,0x00,0x00,0x14};
  737.                 PS3.SetMemory(func_address, new byte[] { 0x41 });
  738.                 PS3.SetMemory(func_address + 4, WritePPC);
  739.                 PS3.SetMemory(func_address, new byte[] { 0x40 });
  740.                 Thread.Sleep(10);
  741.                 RPC.DestroyAll();
  742.             }
  743.         }
  744.  
  745.         public static void EnableRPC()
  746.         {
  747.             PS3.SetMemory(0x523b10, new byte[0x87f]);
  748.             byte[] bytes = new byte[4];
  749.             bytes[0] = 0x60;
  750.             PS3.SetMemory(0x18be6c, bytes);
  751.             bytes = new byte[4];
  752.             bytes[0] = 0x60;
  753.             PS3.SetMemory(0x3bc9cc, bytes);
  754.             bytes = new byte[4];
  755.             bytes[0] = 0x48;
  756.             bytes[3] = 0x68;
  757.             PS3.SetMemory(0x18be74, bytes);
  758.             PS3.SetMemory(0x1db1244, new byte[4]);
  759.             PS3.SetMemory(0x114ae64, new byte[4]);
  760.             PS3.SetMemory(0x3bc9e4, new byte[] {
  761.                 0x41, 130, 2, 0x20, 0x3d, 0, 0, 0x52, 0x80, 0x68, 0x3b, 0x10, 0x80, 0x88, 0x3b, 20,
  762.                 0x80, 0xa8, 0x3b, 0x18, 0x80, 200, 0x3b, 0x1c, 0x80, 0xe8, 0x3b, 0x20, 0x39, 0, 0, 0,
  763.                 0x48, 0, 0, 0x1d, 60, 0x80, 1, 0x15, 0x90, 100, 0xae, 100, 0x38, 0x80, 0, 0,
  764.                 60, 0x60, 1, 0xdb, 0x90, 0x83, 0x12, 0x44, 0x48, 0, 1, 0xe8, 0x4e, 0x80, 0, 0x20,
  765.                 0x60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  766.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  767.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  768.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  769.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  770.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  771.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  772.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  773.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  774.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  775.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  776.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  777.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  778.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  779.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  780.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  781.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  782.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  783.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  784.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  785.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  786.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  787.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  788.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  789.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  790.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  791.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  792.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  793.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  794.                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x60, 0, 0, 0
  795.              });
  796.         }
  797.  
  798.  
  799.         public static void DestroyAll()
  800.         {
  801.             Byte[] clear = new Byte[0xB4 * 1024];
  802.             PS3.SetMemory(0xF0E10C, clear);
  803.         }
  804.  
  805.  
  806.         private static void WriteSingle(uint address, float input)
  807.         {
  808.             byte[] array = new byte[4];
  809.             BitConverter.GetBytes(input).CopyTo(array, 0);
  810.             Array.Reverse(array, 0, 4);
  811.             PS3.SetMemory(address, array);
  812.         }
  813.  
  814.         private static void WriteSingle(uint address, float[] input)
  815.         {
  816.             int length = input.Length;
  817.             byte[] array = new byte[length * 4];
  818.             for (int i = 0; i < length; i++)
  819.             {
  820.                 ReverseBytes(BitConverter.GetBytes(input[i])).CopyTo(array, (int)(i * 4));
  821.             }
  822.             PS3.SetMemory(address, array);
  823.         }
  824.  
  825.  
  826.         private static byte[] ReverseBytes(byte[] inArray)
  827.         {
  828.             Array.Reverse(inArray);
  829.             return inArray;
  830.         }
  831.  
  832.         public static Int32 Call(UInt32 address, params Object[] parameters)
  833.         {
  834.             Int32 length = parameters.Length;
  835.             Int32 index = 0;
  836.             UInt32 count = 0;
  837.             UInt32 Strings = 0;
  838.             UInt32 Single = 0;
  839.             UInt32 Array = 0;
  840.             while (index < length)
  841.             {
  842.                 if (parameters[index] is Int32)
  843.                 {
  844.                     PS3.Extension.WriteInt32(0x10050000 + (count * 4), (Int32)parameters[index]);
  845.                     count++;
  846.                 }
  847.                 else if (parameters[index] is UInt32)
  848.                 {
  849.                     PS3.Extension.WriteUInt32(0x10050000 + (count * 4), (UInt32)parameters[index]);
  850.                     count++;
  851.                 }
  852.                 else if (parameters[index] is Int16)
  853.                 {
  854.                     PS3.Extension.WriteInt16(0x10050000 + (count * 4), (Int16)parameters[index]);
  855.                     count++;
  856.                 }
  857.                 else if (parameters[index] is UInt16)
  858.                 {
  859.                     PS3.Extension.WriteUInt16(0x10050000 + (count * 4), (UInt16)parameters[index]);
  860.                     count++;
  861.                 }
  862.                 else if (parameters[index] is Byte)
  863.                 {
  864.                     PS3.Extension.WriteByte(0x10050000 + (count * 4), (Byte)parameters[index]);
  865.                     count++;
  866.                 } //Should work now :D let me try
  867.                 else
  868.                 {
  869.                     UInt32 pointer;
  870.                     if (parameters[index] is String)
  871.                     {
  872.                         pointer = 0x10052000 + (Strings * 0x400);
  873.                         PS3.Extension.WriteString(pointer, Convert.ToString(parameters[index]));
  874.                         PS3.Extension.WriteUInt32(0x10050000 + (count * 4), pointer);
  875.                         count++;
  876.                         Strings++;
  877.                     }
  878.                     else if (parameters[index] is Single)
  879.                     {
  880.                         WriteSingle(0x10050024 + (Single * 4), (Single)parameters[index]);
  881.                         Single++;
  882.                     }
  883.                     else if (parameters[index] is Single[])
  884.                     {
  885.                         Single[] Args = (Single[])parameters[index];
  886.                         pointer = 0x10051000 + Array * 4;
  887.                         WriteSingle(pointer, Args);
  888.                         PS3.Extension.WriteUInt32(0x10050000 + count * 4, pointer);
  889.                         count++;
  890.                         Array += (UInt32)Args.Length;
  891.                     }
  892.  
  893.                 }
  894.                 index++;
  895.             }
  896.             PS3.Extension.WriteUInt32(0x10050048, address);
  897.             Thread.Sleep(20);
  898.             return PS3.Extension.ReadInt32(0x1005004c);
  899.         }
  900.  
  901.         public static uint func_address = 0x0277208;
  902.         public static uint str_pointer(string str)
  903.         {
  904.             uint addr = 0x523B30;
  905.             byte[] check = new byte[1];
  906.             uint i;
  907.             for (i = 0; i < 5; i++)
  908.             {
  909.                 PS3.GetMemoryR(addr, ref check);
  910.                 if (check[0] == 0x00)
  911.                     break;
  912.                 if (i == 4)
  913.                 {
  914.                     i = 0; break;
  915.                 }
  916.             }
  917.             addr = (0x523B30 + (i * 0x68));
  918.             PS3.SetMemory(addr, new byte[0x68]);
  919.             PS3.SetMemory(addr, Encoding.UTF8.GetBytes(str));
  920.  
  921.             return addr;
  922.         }
  923.         public static void CallFunc(uint func_addr, uint param1 = 0, uint param2 = 0, uint param3 = 0, uint param4 = 0, uint param5 = 0)
  924.         {
  925.             byte[] par1 = BitConverter.GetBytes(param1);
  926.             byte[] par2 = BitConverter.GetBytes(param2);
  927.             byte[] par3 = BitConverter.GetBytes(param3);
  928.             byte[] par4 = BitConverter.GetBytes(param4);
  929.             byte[] par5 = BitConverter.GetBytes(param5);
  930.             Array.Reverse(par1);
  931.             Array.Reverse(par2);
  932.             Array.Reverse(par3);
  933.             Array.Reverse(par4);
  934.             Array.Reverse(par5);
  935.             PS3.SetMemory(0x523B10, par1);
  936.             PS3.SetMemory(0x523B14, par2);
  937.             PS3.SetMemory(0x523B18, par3);
  938.             PS3.SetMemory(0x523B1C, par4);
  939.             PS3.SetMemory(0x523B20, par5);
  940.             PS3.SetMemory(0x3BCA04, MakeBl(0x3BCA04, func_addr));
  941.             PS3.SetMemory(0x1DB1244, new byte[] { 0x00, 0x00, 0x00, 0x01 });
  942.  
  943.         }
  944.         public static uint GetFuncReturn()
  945.         {
  946.             byte[] ret = new byte[4];
  947.             PS3.GetMemoryR(0x114AE64, ref ret);
  948.             Array.Reverse(ret);
  949.             return BitConverter.ToUInt32(ret, 0);
  950.         }
  951.  
  952.         public static byte[] MakeBl(uint callAddr, uint addrToBlTo)
  953.         {
  954.             byte[] instruction = new byte[4];
  955.             uint addr_t = (uint)(((int)addrToBlTo - (int)callAddr) + 1);
  956.             if ((int)addrToBlTo > (int)callAddr) instruction[3] = 0x48;
  957.             else
  958.             {
  959.                 instruction[3] = 0x4B; addr_t = (uint)(0x1000000 - ((int)callAddr - (int)addrToBlTo) + 1);
  960.             }
  961.             byte[] addr = BitConverter.GetBytes(addr_t);
  962.             for (int i = 0; i < 3; i++)
  963.             {
  964.                 instruction[i] = addr[i];
  965.             }
  966.             Array.Reverse(instruction);
  967.             return instruction;
  968.         }
  969.  
  970.         public static void SV_Kickclient(int client, string command)
  971.         {
  972.             CallFunc(Addresses.SV_KickClient, (uint)client, 0, str_pointer(command), 0, 0);
  973.         }
  974.         public static void SV_GameSendServerCommand(int client, string command)
  975.         {
  976.             CallFunc(Addresses.SV_GameSendServerCommand, (uint)client, 0, str_pointer(command), 0, 0);
  977.  
  978.         }
  979.  
  980.  
  981.  
  982.  
  983.         public static void iPrintln(int client, string Text)
  984.         {
  985.             SV_GameSendServerCommand((int)client, "f \"" + Text + "\"");
  986.             Thread.Sleep(20);
  987.         }
  988.         public static void iPrintlnBold(uint client, string Text)
  989.         {
  990.             SV_GameSendServerCommand((int)client, "c \"" + Text + "\"");
  991.             Thread.Sleep(20);
  992.         }
  993.  
  994.         public static void method_25(int int_4, string string_3)
  995.         {
  996.             SV_GameSendServerCommand(int_4, "q " + string_3);
  997.         }
  998.  
  999.         public static void SetModel(int client, string model)
  1000.         {
  1001.             CallFunc(Addresses.G_SetModel, (uint)(Addresses.G_Entity + (client * 640)), str_pointer(model), 0, 0, 0);
  1002.         }
  1003.  
  1004.  
  1005.  
  1006.         public static void Visions(uint client, string VisionName)
  1007.         {
  1008.  
  1009.             SV_GameSendServerCommand((int)client, "J \"" + VisionName + "\"");
  1010.         }
  1011.  
  1012.         public static void Fov(int client, string Text)
  1013.         {
  1014.             SV_GameSendServerCommand((int)client, "q \"cg_fov \"" + Text + "\"");
  1015.             System.Threading.Thread.Sleep(20);
  1016.         }
  1017.         #region Cbuf_AddText
  1018.         public static void CBuf_AddText(int client, string command)
  1019.         {
  1020.             CallFunc(Addresses.CBuf_AddText, (uint)client, str_pointer(command), 0, 0, 0);
  1021.         }
  1022.         #endregion
  1023.  
  1024.         #region G_ClientFunction
  1025.         public static uint G_ClientFunction(int client)
  1026.         {
  1027.             return Addresses.G_Client + ((uint)client * 0x3980);
  1028.         }
  1029.         #endregion
  1030.         public static void GiveWeapon(int client, int weapon)
  1031.         {
  1032.             CallFunc(Addresses.G_GivePlayerWeapon, (uint)G_ClientFunction(client), (uint)weapon, 0);
  1033.             CallFunc(Addresses.Add_Ammo, (uint)(Addresses.G_Entity + (client * 0x280)), (uint)weapon, 0, 9999, 1);
  1034.         }
  1035.  
  1036.  
  1037.         #endregion
  1038.       #region Addresses
  1039.         public static class Addresses
  1040.         {
  1041.             public static uint
  1042.                G_Client = 0x110A280,
  1043.                g_client = 0x110A280,
  1044.                G_ClientIndex = 0x3980,
  1045.                EntityIndex = 0x280,
  1046.                G_Entity = 0xFCA280,
  1047.                MapBrushModel = 0x7F80,
  1048.                BG_GetPerkIndexForName = 0x210B0,
  1049.                BG_GetNumWeapons = 0x3CFBC,
  1050.                BG_FindWeaponIndexForName = 0x3CFD0,
  1051.                BG_GetWeaponIndexForName = 0x3D434,
  1052.                BG_GetViewModelWeaponIndex = 0x3D7D8,
  1053.                Cmd_ExecuteSingleCommand = 0x1DB240,
  1054.                BG_WeaponFireRecoil = 0x3FBD0,
  1055.                CG_FireWeapon = 0xBE498,
  1056.                Key_IsDown = 0xD1CD8,
  1057.                Key_StringToKeynum = 0xD1D18,
  1058.                Key_IsValidGamePadChar = 0xD1E64,
  1059.                Key_KeyNumToString = 0xD1EA4,
  1060.                Key_Unbind_f = 0xD2368,
  1061.                Key_Bind_f = 0xD247C,
  1062.                BG_TakePlayerWeapon = 0x1C409C,
  1063.                G_GivePlayerWeapon = 0x1C3034,
  1064.                SV_GameSendServerCommand = 0x228FA8,
  1065.                SV_GetConfigString = 0x22A4A8,
  1066.                SV_SetConfigString = 0x22A208,
  1067.                va = 0x299490,
  1068.                G_SetModel = 0x1BEF5C,
  1069.                G_LocalizedStringIndex = 0x1BE6CC,
  1070.                G_MaterialIndex = 0x1BE744,
  1071.                G_ModelIndex = 0x1BE7A8,
  1072.                G_ModelName = 0x1BE8A0,
  1073.                Add_Ammo = 0x18A29C,
  1074.                PlayerCmd_SetPerk = 0x17EBE8,
  1075.                G_Damage = 0x183E18,
  1076.                G_RadiusDamage = 0x185600,
  1077.                G_GetClientScore = 0x18EA74,
  1078.                G_GetClientDeaths = 0x18EA98,
  1079.                Cmd_AddCommandInternal = 0x1DC4FC,
  1080.                CBuf_AddText /*(int localClientNum, const char *text)*/ = 0x001DB240,
  1081.                SV_SendDisconnect /*(client_s *client, int state, const char *reason)*/ = 0x0022472C,
  1082.                SV_SendClientGameState /*(client_s *client)*/ = 0x002284F8,
  1083.                SV_KickClient /*(client_s *cl, char *playerName, int maxPlayerNameLen)*/ = 0x00223BD0,
  1084.                G_CallSpawnEntity /*(gentity_s *ent)*/ = 0x001BA730,
  1085.                Player_Die /*(unsigned int *self, unsigned int *inflictor, unsigned int *attacker, int damage, int meansOfDeath, int iWeapon, const float *vDir, unsigned int hitLoc, int psTimeOffset)*/  = 0x00183748,
  1086.                SV_DropClient /*(client_s *drop, const char *reason, bool tellThem)*/ = 0x002249FC,
  1087.                SV_SendServerCommand /*(client_s *,svscmd_type,char const *,...)*/ = 0x0022CEBC,
  1088.                Scr_Notify /*(gentity_s *ent, unsigned __int16 stringValue, unsigned int paramcount)*/ = 0x001BB1B0,
  1089.                Sv_SetGametype /*(void)*/ = 0x00229C1C,
  1090.                Sv_Maprestart /*(int fast_restart)*/ = 0x00223774,
  1091.                sv_maprestart_f = 0x00223B20,
  1092.                sv_spawnsever /*(const char *server)*/ = 0x0022ADF8,
  1093.                sv_map_f = 0x002235A0,
  1094.                sv_matchend /*(void)*/ = 0x0022F7A8,
  1095.                R_AddCmdDrawText /*(const char *text, int maxChars, void *font, float x, float y, float xScale, float yScale, float rotation, const float *color, int style)*/ = 0x00393640,
  1096.                R_RegisterFont /*(char* asset, int imagetrack)*/ /*(const char *name, int imageTrack)*/ = 0x003808B8,
  1097.                R_AddCmdDrawStretchPic /*(float x, float y, float w, float h, float xScale, float yScale, float xay, float yay, const float *color, int material)*/ = 0x00392D78,
  1098.                CL_DrawTextHook /*(const char *text, int maxChars, void *font, float x, float y, float xScale, float yScale, const float *color, int style)*/ = 0x000D93A8,
  1099.                R_AddCmdDrawTextWithEffects /*(char const *,int,Font_s *,float,float,float,float,float,float const * const,int,float const * const,Material *,Material *,int,int,int,int)*/ = 0x003937C0,
  1100.                CG_BoldGameMessage /*(int LocalClientNum, const char *Message)*/ = 0x0007A5C8,
  1101.                UI_FillRectPhysical /*(float x, float y, float width, float height, const float *color)*/ = 0x0023A810,
  1102.                UI_DrawLoadBar /*(ScreenPlacement *scrPlace, float x, float y, float w, float h, int horzAlign, int vertAlign, const float *color, Material *material)*/ = 0x0023A730,
  1103.                Scr_MakeGameMessage /*(int iClientNum, const char *pszCmd)*/ = 0x001B07F0,
  1104.                Scr_ConstructMessageString /*(int firstParmIndex, int lastParmIndex, const char *errorContext, char *string, unsigned int stringLimit)*/ = 0x001B04F4,
  1105.                R_NormalizedTextScale /*(Font_s *font, float scale)*/ = 0x003808F0,
  1106.                TeleportPlayer /*(gentity_s *player, float *origin, float *angles)*/ = 0x00191B00,
  1107.                CL_DrawText /*(ScreenPlacement *scrPlace, const char *text, int maxChars, Font_s *font, float x, float y, int horzAlign, int vertAlign, float xScale, float yScale, const float *color, int style)*/ = 0x000D9490,
  1108.                CL_DrawTextRotate /*(ScreenPlacement *scrPlace, const char *text, int maxChars, Font_s *font, float x, float y, float rotation, int horzAlign, int vertAlign, float xScale, float yScale, const float *color, int style)*/ = 0x000D9554,
  1109.                SV_GameDropClient /*(int clientNum, const char *reason)*/ = 0x00229020,
  1110.                Dvar_GetBool /*(const char *dvarName)*/ = 0x00291060,
  1111.                Dvar_GetInt /*(const char *dvarName)*/ = 0x002910DC,
  1112.                Dvar_GetFloat /*(const char *dvarName)*/ = 0x00291148,
  1113.                Dvar_RegisterBool /*(const char *dvarName, bool value, unsigned __int16 flags, const char *description)*/ = 0x002933F0,
  1114.                Dvar_IsValidName /*(const char *dvarName)*/ = 0x0029019C,
  1115.                Material_RegisterHandle /*(const char *name, int imageTrack)*/ = 0x0038B044,
  1116.                CL_RegisterFont /*(const char *fontName, int imageTrack)*/ = 0x000D9734,
  1117.                SetClientViewAngle /*(gentity_s *ent, const float *angle)*/ = 0x001767E0,
  1118.                R_RegisterDvars /*(void)*/ = 0x0037E420,
  1119.                PlayerCmd_SetClientDvar /*(scr_entref_t entref)*/ = 0x0017CB4C,
  1120.                Jump_RegisterDvars /*(void)*/ = 0x00018E20,
  1121.                AimTarget_RegisterDvars = 0x00012098,
  1122.                G_FreeEntity /*(gentity_s *ed)*/ = 0x001C0840,
  1123.                G_EntUnlink /*(gentity_s *ent)*/ = 0x001C4A5C,
  1124.                SV_DObjGetTree /*(gentity_s *ent)*/ = 0x00229A68,
  1125.                BG_GetEntityTypeName /*(const int eType)*/ = 0x0001D1F0,
  1126.                CL_GetClientState /*(int localClientNum, uiClientState_s *state)*/ = 0x000E26A8,
  1127.                 CL_GetConfigString /*(int localClientNum, int configStringIndex)*/ = 0x000C5E7C,
  1128.                Info_ValueForKey /*(const char *s, const char *key)*/ = 0x00299604,
  1129.                Scr_GetInt /*(unsigned int index)*/ = 0x002201C4,
  1130.                ClientSpawn /*(gentity_s *ent, const float *spawn_origin, const float *spawn_angles)*/ = 0x00177468,
  1131.                Sv_ClientCommand /*(client_s *cl, msg_t *msg)*/ = 0x00228178,
  1132.                Sv_ExecuteClientMessage /*(client_s *cl, msg_t *msg)*/ = 0x00228B50,
  1133.                Sv_ExecuteClientCommand /*(client_s *cl, const char *s, int clientOK)*/ = 0x00182DEC,
  1134.                ClientCommand /*(int clientNum)*/ = 0x00182440,
  1135.                CalculateRanks /*(void)*/ = 0x0019031C,
  1136.                ClientScr_SetScore /*(gclient_s *pSelf, client_fields_s *pField)*/ = 0x00176150,
  1137.                ClientScr_SetMaxHealth /*(gclient_s *pSelf, client_fields_s *pField)*/ = 0x00176094,
  1138.                Sv_ReceiveStats /*(netadr_t from, msg_t *msg)*/ = 0x002244E0,
  1139.                ClientConnect /*(int clientNum, unsigned __int16 scriptPersId)*/ = 0x001771A0,
  1140.                Sv_DirectConnect /*(netadr_t from)*/ = 0x00255BB4,
  1141.                Sv_SetConfigstring /*(int index, const char *val)*/ = 0x0022A208,
  1142.                Sv_AddServerCommand /*(client_s *client, svscmd_type type, const char *cmd)*/ = 0x0022CBA0,
  1143.                IntermissionClientEndFrame /*(gentity_s *ent)*/ = 0x001745F8,
  1144.                memset = 0x0049B928,
  1145.                str_pointer = 0x523b30,
  1146.                g_gametype = 0x8360d5;
  1147.         }
  1148.         #endregion
  1149.       #region ServerInFo
  1150.         public static class ServerInfo
  1151.         {//credits to Seb5594 for this
  1152.  
  1153.             public static String ReturnInfos(Int32 Index)
  1154.             {
  1155.                 return Encoding.ASCII.GetString(PS3.Extension.ReadBytes(0x8360d5, 0x100)).Replace(@"\", "|").Split(new char[] { '|' })[Index];
  1156.  
  1157.             }
  1158.             public static String getHostName()
  1159.             {
  1160.                 String str = ReturnInfos(0x10);
  1161.                 switch (str)
  1162.                 {
  1163.                     case "Modern Warfare 3":
  1164.                         return "Dedicated Server (No Player is Host)";
  1165.                     case "":
  1166.                         return "You are not In-Game";
  1167.                 }
  1168.                 return str;
  1169.             }
  1170.             public static String getGameMode()
  1171.             {
  1172.                 switch (ReturnInfos(2))
  1173.                 {
  1174.                     case "war":
  1175.                         return "Team Deathmatch";
  1176.                     case "dm":
  1177.                         return "Free for All";
  1178.                     case "sd":
  1179.                         return "Search and Destroy";
  1180.                     case "dom":
  1181.                         return "Domination";
  1182.                     case "conf":
  1183.                         return "Kill Confirmed";
  1184.                     case "sab":
  1185.                         return "Sabotage";
  1186.                     case "koth":
  1187.                         return "Head Quartes";
  1188.                     case "ctf":
  1189.                         return "Capture The Flag";
  1190.                     case "infect":
  1191.                         return "Infected";
  1192.                     case "sotf":
  1193.                         return "Hunted";
  1194.                     case "dd":
  1195.                         return "Demolition";
  1196.                     case "grnd":
  1197.                         return "Drop Zone";
  1198.                     case "tdef":
  1199.                         return "Team Defender";
  1200.                     case "tjugg":
  1201.                         return "Team Juggernaut";
  1202.                     case "jugg":
  1203.                         return "Juggernaut";
  1204.                     case "gun":
  1205.                         return "Gun Game";
  1206.                     case "oic":
  1207.                         return "One In The Chamber";
  1208.                 }
  1209.                 return "Unknown Gametype";
  1210.             }
  1211.             public static String getMapName()
  1212.             {
  1213.                 switch (ReturnInfos(6))
  1214.                 {
  1215.                     case "mp_alpha":
  1216.                         return "Lockdown";
  1217.                     case "mp_bootleg":
  1218.                         return "Bootleg";
  1219.                     case "mp_bravo":
  1220.                         return "Mission";
  1221.                     case "mp_carbon":
  1222.                         return "Carbon";
  1223.                     case "mp_dome":
  1224.                         return "Dome";
  1225.                     case "mp_exchange":
  1226.                         return "Downturn";
  1227.                     case "mp_hardhat":
  1228.                         return "Hardhat";
  1229.                     case "mp_interchange":
  1230.                         return "Interchange";
  1231.                     case "mp_lambeth":
  1232.                         return "Fallen";
  1233.                     case "mp_mogadishu":
  1234.                         return "Bakaara";
  1235.                     case "mp_paris":
  1236.                         return "Resistance";
  1237.                     case "mp_plaza2":
  1238.                         return "Arkaden";
  1239.                     case "mp_radar":
  1240.                         return "Outpost";
  1241.                     case "mp_seatown":
  1242.                         return "Seatown";
  1243.                     case "mp_underground":
  1244.                         return "Underground";
  1245.                     case "mp_village":
  1246.                         return "Village";
  1247.                     case "mp_aground_ss":
  1248.                         return "Aground";
  1249.                     case "mp_aqueduct_ss":
  1250.                         return "Aqueduct";
  1251.                     case "mp_cement":
  1252.                         return "Foundation";
  1253.                     case "mp_hillside_ss":
  1254.                         return "Getaway";
  1255.                     case "mp_italy":
  1256.                         return "Piazza";
  1257.                     case "mp_meteora":
  1258.                         return "Sanctuary";
  1259.                     case "mp_morningwood":
  1260.                         return "Black Box";
  1261.                     case "mp_overwatch":
  1262.                         return "Overwatch";
  1263.                     case "mp_park":
  1264.                         return "Liberation";
  1265.                     case "mp_qadeem":
  1266.                         return "Oasis";
  1267.                     case "mp_restrepo_ss":
  1268.                         return "Lookout";
  1269.  
  1270.                     case "mp_terminal_cls":
  1271.                         return "Terminal";
  1272.                 }
  1273.                 return "Unknown Map";
  1274.             }
  1275.         }
  1276.         #endregion
  1277.       #region Aimbot & ForgeMode
  1278.         public static class Aimbot_and_ForgeMode
  1279.         {
  1280.             //If you using this class or the Functions give Credits to
  1281.             //xCSBKx: Making this class the Aimbot and the ForgeMode Function
  1282.             //VezahModz: AnglestoForward Function
  1283.             //iMCSx and Seb5594 Read+Write Function
  1284.             //Have Fun and enjoy using it :)
  1285.             //www.YouTube.com/GMTPS3
  1286.             #region Read + Write
  1287.             //Read and return an Integer.
  1288.             //Liest und gibt eine Integer wieder.
  1289.             public static int ReadInt(uint Offset)
  1290.             {
  1291.                 byte[] buffer = new byte[4];
  1292.                 PS3.PS31.GetMemory(Offset, buffer);
  1293.                 Array.Reverse(buffer);
  1294.                 int Value = BitConverter.ToInt32(buffer, 0);
  1295.                 return Value;
  1296.             }
  1297.  
  1298.             //Read and return 1 Byte.
  1299.             //Liest und gibt einen Byte wieder.
  1300.             public static byte ReadByte(uint Offset)
  1301.             {
  1302.                 byte[] buffer = new byte[1];
  1303.                 PS3.PS31.GetMemory(Offset, buffer);
  1304.                 return buffer[0];
  1305.             }
  1306.  
  1307.             //Read and return an float value over Length.
  1308.             //Liest und gibt eine Float Value wieder über eine Länge wieder.
  1309.             public static float[] ReadFloatLength(uint Offset, int Length)
  1310.             {
  1311.                 byte[] buffer = new byte[Length * 4];
  1312.                 PS3.PS31.GetMemory(Offset, buffer);
  1313.                 ReverseBytes(buffer);
  1314.                 float[] Array = new float[Length];
  1315.                 for (int i = 0; i < Length; i++)
  1316.                 {
  1317.                     Array[i] = BitConverter.ToSingle(buffer, (Length - 1 - i) * 4);
  1318.                 }
  1319.                 return Array;
  1320.             }
  1321.  
  1322.             //Write a Float Array in Memory.
  1323.             //Schreibt einen Float Array in den Memory.
  1324.             public static void WriteFloatArray(uint Offset, float[] Array)
  1325.             {
  1326.                 byte[] buffer = new byte[Array.Length * 4];
  1327.                 for (int Lenght = 0; Lenght < Array.Length; Lenght++)
  1328.                 {
  1329.                     ReverseBytes(BitConverter.GetBytes(Array[Lenght])).CopyTo(buffer, Lenght * 4);
  1330.                 }
  1331.                 PS3.SetMemory(Offset, buffer);
  1332.             }
  1333.  
  1334.             //Read and return an Float Value. (4 Bytes)
  1335.             //Liest und gibt eine Float Value wieder. (4 Bytes)
  1336.             public static float ReadFloat(uint Offset)
  1337.             {
  1338.                 byte[] buffer = new byte[4];
  1339.                 PS3.PS31.GetMemory(Offset, buffer);
  1340.                 Array.Reverse(buffer, 0, 4);
  1341.                 return BitConverter.ToSingle(buffer, 0);
  1342.             }
  1343.             #endregion
  1344.  
  1345.             //Freeze or unfreeze the selected Client.
  1346.             //Friert oder taut den Clienten ein oder auf.
  1347.             public static void Freeze(uint Client, bool State)
  1348.             {
  1349.                 if (State == true)
  1350.                 {
  1351.                     PS3.SetMemory(0x0110d87f + (Client * 0x3980), new byte[] { 0x04 });
  1352.                 }
  1353.                 else
  1354.                 {
  1355.                     PS3.SetMemory(0x0110d87f + (Client * 0x3980), new byte[] { 0x00 });
  1356.                 }
  1357.             }
  1358.  
  1359.             //Set Client View Angles to aim on Target
  1360.             //Setzs das Aiming vom Client auf die Position des Target
  1361.             public static void Aimbot(uint Client, uint Target)
  1362.             {
  1363.                 #region Check if Dead
  1364.                 //Checks if Target is Dead or Alive.
  1365.                 //Guckt ob der Gegeners Tot oder Lebendig ist.
  1366.                 if (ReadInt(0xFCA41D + (Target * 0x280)) > 0)
  1367.                 {
  1368.                     #region Stance
  1369.                     //Displays the player's Status.
  1370.                     //Zeigt den Status des Spielers an.
  1371.                     byte StanceByte = ReadByte(0x110d88a + (Target * 0x3980));
  1372.                     float Stance = 0;
  1373.                     //if Target is crouch Stance = 21.
  1374.                     //Wenn der Gegeners Hockt ist Stance = 21.    
  1375.                     if (StanceByte == 2)
  1376.                         Stance = 21;
  1377.                     //if Target is lie Stance = 47.
  1378.                     //Wenn der Gegeners liegt ist Stance = 47.
  1379.                     else if (StanceByte == 1)
  1380.                         Stance = 47;
  1381.                     //if Target is standing Stance = 0.
  1382.                     //Wenn der Gegeners steht ist Stance = 0.
  1383.                     else
  1384.                         Stance = 0;
  1385.                     #endregion
  1386.  
  1387.                     #region Origin
  1388.                     //Get the Origin of the Client.
  1389.                     //Gibt die Position des Clienten an.
  1390.                     float[] O1 = ReadFloatLength(0x110a29c + (Client * 0x3980), 3);
  1391.  
  1392.                     //Get the Origin of the Target.
  1393.                     //Gibt die Position des Gegeners an.
  1394.                     float[] O2 = ReadFloatLength(0x110a29c + (Target * 0x3980), 3);
  1395.                     //ZValue - Stance
  1396.                     O2[2] = O2[2] - Stance;
  1397.                     #endregion
  1398.  
  1399.                     #region VectoAngles
  1400.                     //Calculates the X angle and Y angle to give a direction.
  1401.                     //Berechnet den X Winkel und den Y Winkel um eine Richtung  anzugeben.
  1402.                     //Source: http://www.java2s.com/Open-Source/Java/Game/Jake2-0.9.5/Jake2/util/Math3D.java.htm
  1403.                     float[] value1 = new float[] { O2[0] - O1[0], O2[1] - O1[1], O2[2] - O1[2] };
  1404.                     float yaw, pitch;
  1405.                     float[] angles = new float[3];
  1406.  
  1407.                     if ((value1[1] == 0f) && (value1[0] == 0f))
  1408.                     {
  1409.                         yaw = 0f;
  1410.                         pitch = 0f;
  1411.                         if (value1[2] > 0f)
  1412.                             pitch = 90f;
  1413.                         else
  1414.                             pitch = 270f;
  1415.                     }
  1416.                     else
  1417.                     {
  1418.                         if (value1[0] != -1f)
  1419.                             yaw = (float)((Math.Atan2(value1[1], value1[0]) * 180) / Math.PI);
  1420.                         else if (value1[1] > 0f)
  1421.                             yaw = 90f;
  1422.                         else
  1423.                             yaw = 270f;
  1424.                         if (yaw < 0f)
  1425.                             yaw += 360f;
  1426.                         float forward = (float)Math.Sqrt(((value1[0] * value1[0]) + (value1[1] * value1[1])));
  1427.                         pitch = (float)((Math.Atan2(value1[2], (double)forward) * 180.0) / Math.PI);
  1428.                         if (pitch < 0f)
  1429.                             pitch += 360f;
  1430.                     }
  1431.                     angles[0] = -pitch;
  1432.                     angles[1] = yaw;
  1433.                     angles[2] = 0;
  1434.                     #endregion
  1435.  
  1436.                     #region SetViewAngles
  1437.                     //0x1767E0 - SetClientViewAngle(gentity_s *ent, const float *angle)
  1438.                     //Writes the angles to 0x1000000.
  1439.                     //Schreibt die Winkel auf 0x1000000.
  1440.                     WriteFloatArray(0x1000000, angles);
  1441.                     //Calls the SetClientViewAnlge and sets the Angles
  1442.                     //Ruft die SetCleintView Angles function auf und setzt die Winkel
  1443.                     RPC.Call(0x1767E0, 0xFCA280 + (0x280 * Client), 0x1000000);
  1444.                     #endregion
  1445.                 }
  1446.                 #endregion
  1447.             }
  1448.  
  1449.             //Teleport the Target in the Client Crosshairs.
  1450.             //Teleportiert den Target in das Fadenkreuz des Clienten.
  1451.             //The distance is set by a Metric size(Meters).
  1452.             //3 Yard = 1 Meter (rounded)
  1453.             public static void ForgeMode(uint Client, uint Target, uint Distance_in_Meters = 6)
  1454.             {
  1455.                 #region Get Angles and Origion
  1456.                 //Get the Angles of the Client.
  1457.                 //Gibt die Sicht Winkel des Clienten an.
  1458.                 float[] Angles = ReadFloatLength(0x110a3d8 + (Client * 0x3980), 2);
  1459.                 //Get the Origin of the Client.
  1460.                 //Gibt die Position des Clienten an.
  1461.                 float[] Origin = ReadFloatLength(0x110a29c + (Client * 0x3980), 3);
  1462.                 #endregion
  1463.  
  1464.                 #region AnglestoForward
  1465.                 //The Distance shows how far away the target is from the client.
  1466.                 //Die Distance gibt an wie weit weg der Target vom Clienten ist.
  1467.                 float diff = Distance_in_Meters * 40;
  1468.  
  1469.  
  1470.                 //Calculates the Angles and th to give a direction.
  1471.                 //Berechnet die anzugeben.
  1472.                 //http://www.nextgenupdate.com/forums/playstation-3-elite/723550-c-anglestoforward-function.html
  1473.                 float num = ((float)Math.Sin((Angles[0] * Math.PI) / 180)) * diff;
  1474.                 float num1 = (float)Math.Sqrt(((diff * diff) - (num * num)));
  1475.                 float num2 = ((float)Math.Sin((Angles[1] * Math.PI) / 180)) * num1;
  1476.                 float num3 = ((float)Math.Cos((Angles[1] * Math.PI) / 180)) * num1;
  1477.                 float[] forward = new float[] { Origin[0] + num3, Origin[1] + num2, Origin[2] - num };
  1478.                 #endregion
  1479.  
  1480.                 #region Set Target Origin
  1481.                 Freeze(Target, true);
  1482.                 WriteFloatArray(0x110a29c + (Target * 0x3980), forward);
  1483.                 #endregion
  1484.             }
  1485.             public static UInt32 G_Entity(Int32 clientIndex, UInt32 Mod = 0)
  1486.             {
  1487.                 return ((0xfca280 + Mod) + ((UInt32)(0x280 * clientIndex)));
  1488.             }
  1489.  
  1490.             public static void
  1491.                 PlayerDie(Int32 Killer, Int32 Victim)
  1492.             {
  1493.                 RPC.Call(0x183748, new Object[] { G_Entity(Victim), G_Entity(Victim), G_Entity(Killer), 60, 0, 0x43B29, 0, 0, 0xD00CF12C });
  1494.             }
  1495.  
  1496.  
  1497.             //Returns the Client who is closest to the Attacker.
  1498.             //Gibt den Clienten wieder der am nähsten zum Angreifer ist.
  1499.             public static float[] distances = new float[18];
  1500.             public static uint FindClosestEnemy(uint Attacker)
  1501.             {
  1502.                 #region Check if Alive and Get Origin
  1503.                 for (uint i = 0; i < 18; i++)
  1504.                 {
  1505.                     //Only if the Target is Alive it stores there distance.
  1506.                     //Nur wenn der Target lebt wird seine Enferung zum Clienten angezeigt.
  1507.                     if (ReadInt(0xFCA41D + (i * 0x280)) > 0)
  1508.                     {
  1509.                         #region Attacker Origin
  1510.                         //Get the Origin of the Attacker.
  1511.                         //Gibt die Position des Angreifers an.
  1512.                         float[] O1 = ReadFloatLength(0x110a29c + ((uint)Attacker * 0x3980), 3);
  1513.                         #endregion
  1514.  
  1515.                         #region Client Origin
  1516.                         //Get the Origin of the Target.
  1517.                         //Gibt die Position des Gegners an.
  1518.                         float[] O2 = ReadFloatLength(0x110a29c + (i * 0x3980), 3);
  1519.                         #endregion
  1520.  
  1521.                         #region Get Distance
  1522.                         //Convertet the Origin from Client and Target and shows the Distance.
  1523.                         //Convertiert die Position von Client und Target und gibt die Enferung an.
  1524.                         distances[i] = (float)(Math.Sqrt(
  1525.                         ((O2[0] - O1[0]) * (O2[0] - O1[0])) +
  1526.                         ((O2[1] - O1[1]) * (O2[1] - O1[1])) +
  1527.                         ((O2[2] - O1[2]) * (O2[2] - O1[2]))
  1528.                         ));
  1529.                         #endregion
  1530.                     }
  1531.                     else
  1532.                     {
  1533.                         #region Dead Players get Max Value
  1534.                         //If the Client is Dead the Distance set to Max.
  1535.                         //Wenn der Client Tod ist wird die Enfernung auf Max gesetzt.
  1536.                         distances[i] = float.MaxValue;
  1537.                         #endregion
  1538.                     }
  1539.                 }
  1540.                 #endregion
  1541.  
  1542.                 #region Copy Distances
  1543.                 float[] newDistances = new float[18];
  1544.                 Array.Copy(distances, newDistances, distances.Length);
  1545.                 #endregion
  1546.  
  1547.                 #region Sort Distances and return Client
  1548.                 //Sorts the Distances from Small to Big
  1549.                 //Sortiert die Enfernungen von Klein zu Groß
  1550.                 Array.Sort(newDistances);
  1551.                 //Array.Sort(distances);
  1552.                 for (uint i = 0; i < 18; i++)
  1553.                 {
  1554.                     //Shows which Client is the closest (0 is the attacker)
  1555.                     //Zeigt an welcher Client der nähste ist(0 ist der Angreifer)
  1556.                     if (distances[i] == newDistances[1])
  1557.                     //if (distances[i] == distances[1])
  1558.                     {
  1559.                         return i;
  1560.                     }
  1561.                 }
  1562.                 #endregion
  1563.  
  1564.                 #region Failed
  1565.                 //If finding ClosestEnemey Function is Failed it returns -1 but never happend :P
  1566.                 //Wenn die ClosestEnemy Funktion einen Fehler hat gibt sie -1 zurück das Passiert aber nie :P
  1567.                 int Failed = -1;
  1568.                 return (uint)Failed;
  1569.                 #endregion
  1570.             }
  1571.         }
  1572.       #endregion
  1573.     }
  1574. }
  1575.  
  1576. //Form1.Designer.cs
  1577. namespace AimbotNGU
  1578. {
  1579.     partial class Form1
  1580.     {
  1581.         /// <summary>
  1582.         /// Variabile di progettazione necessaria.
  1583.         /// </summary>
  1584.         private System.ComponentModel.IContainer components = null;
  1585.  
  1586.         /// <summary>
  1587.         /// Liberare le risorse in uso.
  1588.         /// </summary>
  1589.         /// <param name="disposing">ha valore true se le risorse gestite devono essere eliminate, false in caso contrario.</param>
  1590.         protected override void Dispose(bool disposing)
  1591.         {
  1592.             if (disposing && (components != null))
  1593.             {
  1594.                 components.Dispose();
  1595.             }
  1596.             base.Dispose(disposing);
  1597.         }
  1598.  
  1599.         #region Codice generato da Progettazione Windows Form
  1600.  
  1601.         /// <summary>
  1602.         /// Metodo necessario per il supporto della finestra di progettazione. Non modificare
  1603.         /// il contenuto del metodo con l'editor di codice.
  1604.         /// </summary>
  1605.         private void InitializeComponent()
  1606.         {
  1607.             this.components = new System.ComponentModel.Container();
  1608.             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
  1609.             this.button1 = new System.Windows.Forms.Button();
  1610.             this.button2 = new System.Windows.Forms.Button();
  1611.             this.timer1 = new System.Windows.Forms.Timer(this.components);
  1612.             this.timer2 = new System.Windows.Forms.Timer(this.components);
  1613.             this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
  1614.             this.button3 = new System.Windows.Forms.Button();
  1615.             this.dataGridView1 = new System.Windows.Forms.DataGridView();
  1616.             this.label1 = new System.Windows.Forms.Label();
  1617.             this.label2 = new System.Windows.Forms.Label();
  1618.             this.label3 = new System.Windows.Forms.Label();
  1619.             this.MODE = new System.Windows.Forms.Label();
  1620.             this.MAP = new System.Windows.Forms.Label();
  1621.             this.HOST = new System.Windows.Forms.Label();
  1622.             this.groupBox1 = new System.Windows.Forms.GroupBox();
  1623.             this.button4 = new System.Windows.Forms.Button();
  1624.             this.timer3 = new System.Windows.Forms.Timer(this.components);
  1625.             this.richTextBox1 = new System.Windows.Forms.RichTextBox();
  1626.             this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  1627.             this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
  1628.             ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
  1629.             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
  1630.             this.groupBox1.SuspendLayout();
  1631.             this.SuspendLayout();
  1632.             //
  1633.             // button1
  1634.             //
  1635.             this.button1.Location = new System.Drawing.Point(12, 63);
  1636.             this.button1.Name = "button1";
  1637.             this.button1.Size = new System.Drawing.Size(163, 34);
  1638.             this.button1.TabIndex = 1;
  1639.             this.button1.Text = "Connect/Attach";
  1640.             this.button1.UseVisualStyleBackColor = true;
  1641.             this.button1.Click += new System.EventHandler(this.button1_Click);
  1642.             //
  1643.             // button2
  1644.             //
  1645.             this.button2.Location = new System.Drawing.Point(12, 169);
  1646.             this.button2.Name = "button2";
  1647.             this.button2.Size = new System.Drawing.Size(163, 27);
  1648.             this.button2.TabIndex = 2;
  1649.             this.button2.Text = "Aimbot Unfair [OFF]";
  1650.             this.button2.UseVisualStyleBackColor = true;
  1651.             this.button2.Click += new System.EventHandler(this.button2_Click);
  1652.             //
  1653.             // timer1
  1654.             //
  1655.             this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
  1656.             //
  1657.             // timer2
  1658.             //
  1659.             this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
  1660.             //
  1661.             // numericUpDown1
  1662.             //
  1663.             this.numericUpDown1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  1664.             this.numericUpDown1.Location = new System.Drawing.Point(181, 156);
  1665.             this.numericUpDown1.Maximum = new decimal(new int[] {
  1666.             17,
  1667.             0,
  1668.             0,
  1669.             0});
  1670.             this.numericUpDown1.Name = "numericUpDown1";
  1671.             this.numericUpDown1.Size = new System.Drawing.Size(32, 20);
  1672.             this.numericUpDown1.TabIndex = 3;
  1673.             //
  1674.             // button3
  1675.             //
  1676.             this.button3.Location = new System.Drawing.Point(12, 103);
  1677.             this.button3.Name = "button3";
  1678.             this.button3.Size = new System.Drawing.Size(163, 27);
  1679.             this.button3.TabIndex = 5;
  1680.             this.button3.Text = "GetClient";
  1681.             this.button3.UseVisualStyleBackColor = true;
  1682.             this.button3.Click += new System.EventHandler(this.button3_Click);
  1683.             //
  1684.             // dataGridView1
  1685.             //
  1686.             this.dataGridView1.AllowUserToAddRows = false;
  1687.             this.dataGridView1.AllowUserToDeleteRows = false;
  1688.             this.dataGridView1.AllowUserToResizeColumns = false;
  1689.             this.dataGridView1.AllowUserToResizeRows = false;
  1690.             dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
  1691.             dataGridViewCellStyle1.NullValue = null;
  1692.             this.dataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
  1693.             this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
  1694.             this.dataGridView1.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
  1695.             this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
  1696.             this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
  1697.             this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
  1698.             this.Column1,
  1699.             this.Column2});
  1700.             this.dataGridView1.Location = new System.Drawing.Point(219, 29);
  1701.             this.dataGridView1.MultiSelect = false;
  1702.             this.dataGridView1.Name = "dataGridView1";
  1703.             this.dataGridView1.ReadOnly = true;
  1704.             this.dataGridView1.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
  1705.             this.dataGridView1.RowHeadersWidth = 10;
  1706.             this.dataGridView1.Size = new System.Drawing.Size(183, 429);
  1707.             this.dataGridView1.StandardTab = true;
  1708.             this.dataGridView1.TabIndex = 32;
  1709.             //
  1710.             // label1
  1711.             //
  1712.             this.label1.AutoSize = true;
  1713.             this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  1714.             this.label1.Location = new System.Drawing.Point(6, 26);
  1715.             this.label1.Name = "label1";
  1716.             this.label1.Size = new System.Drawing.Size(32, 15);
  1717.             this.label1.TabIndex = 33;
  1718.             this.label1.Text = "Host";
  1719.             //
  1720.             // label2
  1721.             //
  1722.             this.label2.AutoSize = true;
  1723.             this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  1724.             this.label2.Location = new System.Drawing.Point(6, 51);
  1725.             this.label2.Name = "label2";
  1726.             this.label2.Size = new System.Drawing.Size(32, 15);
  1727.             this.label2.TabIndex = 34;
  1728.             this.label2.Text = "Map";
  1729.             //
  1730.             // label3
  1731.             //
  1732.             this.label3.AutoSize = true;
  1733.             this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  1734.             this.label3.Location = new System.Drawing.Point(6, 75);
  1735.             this.label3.Name = "label3";
  1736.             this.label3.Size = new System.Drawing.Size(41, 15);
  1737.             this.label3.TabIndex = 35;
  1738.             this.label3.Text = "Game";
  1739.             //
  1740.             // MODE
  1741.             //
  1742.             this.MODE.AutoSize = true;
  1743.             this.MODE.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  1744.             this.MODE.Location = new System.Drawing.Point(49, 75);
  1745.             this.MODE.Name = "MODE";
  1746.             this.MODE.Size = new System.Drawing.Size(14, 15);
  1747.             this.MODE.TabIndex = 38;
  1748.             this.MODE.Text = "?";
  1749.             //
  1750.             // MAP
  1751.             //
  1752.             this.MAP.AutoSize = true;
  1753.             this.MAP.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  1754.             this.MAP.Location = new System.Drawing.Point(49, 51);
  1755.             this.MAP.Name = "MAP";
  1756.             this.MAP.Size = new System.Drawing.Size(14, 15);
  1757.             this.MAP.TabIndex = 37;
  1758.             this.MAP.Text = "?";
  1759.             //
  1760.             // HOST
  1761.             //
  1762.             this.HOST.AutoSize = true;
  1763.             this.HOST.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  1764.             this.HOST.Location = new System.Drawing.Point(49, 26);
  1765.             this.HOST.Name = "HOST";
  1766.             this.HOST.Size = new System.Drawing.Size(14, 15);
  1767.             this.HOST.TabIndex = 36;
  1768.             this.HOST.Text = "?";
  1769.             //
  1770.             // groupBox1
  1771.             //
  1772.             this.groupBox1.Controls.Add(this.label1);
  1773.             this.groupBox1.Controls.Add(this.MODE);
  1774.             this.groupBox1.Controls.Add(this.label2);
  1775.             this.groupBox1.Controls.Add(this.MAP);
  1776.             this.groupBox1.Controls.Add(this.label3);
  1777.             this.groupBox1.Controls.Add(this.HOST);
  1778.             this.groupBox1.Location = new System.Drawing.Point(12, 202);
  1779.             this.groupBox1.Name = "groupBox1";
  1780.             this.groupBox1.Size = new System.Drawing.Size(180, 109);
  1781.             this.groupBox1.TabIndex = 39;
  1782.             this.groupBox1.TabStop = false;
  1783.             this.groupBox1.Text = "Info\'s";
  1784.             //
  1785.             // button4
  1786.             //
  1787.             this.button4.Location = new System.Drawing.Point(12, 136);
  1788.             this.button4.Name = "button4";
  1789.             this.button4.Size = new System.Drawing.Size(163, 27);
  1790.             this.button4.TabIndex = 40;
  1791.             this.button4.Text = "Aimbot Classic [OFF]";
  1792.             this.button4.UseVisualStyleBackColor = true;
  1793.             this.button4.Click += new System.EventHandler(this.button4_Click);
  1794.             //
  1795.             // timer3
  1796.             //
  1797.             this.timer3.Tick += new System.EventHandler(this.timer3_Tick);
  1798.             //
  1799.             // richTextBox1
  1800.             //
  1801.             this.richTextBox1.Location = new System.Drawing.Point(12, 319);
  1802.             this.richTextBox1.Name = "richTextBox1";
  1803.             this.richTextBox1.ReadOnly = true;
  1804.             this.richTextBox1.Size = new System.Drawing.Size(179, 120);
  1805.             this.richTextBox1.TabIndex = 41;
  1806.             this.richTextBox1.Text = "Update v1 *\nAimbot Classic can be given to all clients\nAimbot Unfair can be given" +
  1807.     " to all clients but must be fix\nBy RayzModz\nCredits\nxCSBKx\nVezah\nSticky";
  1808.             //
  1809.             // Column1
  1810.             //
  1811.             this.Column1.FillWeight = 20F;
  1812.             this.Column1.HeaderText = "#";
  1813.             this.Column1.Name = "Column1";
  1814.             this.Column1.ReadOnly = true;
  1815.             this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
  1816.             this.Column1.Width = 40;
  1817.             //
  1818.             // Column2
  1819.             //
  1820.             this.Column2.DividerWidth = 1;
  1821.             this.Column2.FillWeight = 30F;
  1822.             this.Column2.HeaderText = "Name";
  1823.             this.Column2.Name = "Column2";
  1824.             this.Column2.ReadOnly = true;
  1825.             this.Column2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
  1826.             this.Column2.Width = 130;
  1827.             //
  1828.             // Form1
  1829.             //
  1830.             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  1831.             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  1832.             this.ClientSize = new System.Drawing.Size(410, 463);
  1833.             this.Controls.Add(this.richTextBox1);
  1834.             this.Controls.Add(this.button4);
  1835.             this.Controls.Add(this.groupBox1);
  1836.             this.Controls.Add(this.dataGridView1);
  1837.             this.Controls.Add(this.button3);
  1838.             this.Controls.Add(this.numericUpDown1);
  1839.             this.Controls.Add(this.button2);
  1840.             this.Controls.Add(this.button1);
  1841.             this.Location = new System.Drawing.Point(0, 0);
  1842.             this.Name = "Form1";
  1843.             this.Text = "Unfair by Rayz";
  1844.             this.Load += new System.EventHandler(this.Form1_Load);
  1845.             ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
  1846.             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
  1847.             this.groupBox1.ResumeLayout(false);
  1848.             this.groupBox1.PerformLayout();
  1849.             this.ResumeLayout(false);
  1850.  
  1851.         }
  1852.  
  1853.         #endregion
  1854.  
  1855.         private System.Windows.Forms.Button button1;
  1856.         private System.Windows.Forms.Button button2;
  1857.         private System.Windows.Forms.Timer timer1;
  1858.         private System.Windows.Forms.Timer timer2;
  1859.         private System.Windows.Forms.NumericUpDown numericUpDown1;
  1860.         private System.Windows.Forms.Button button3;
  1861.         private System.Windows.Forms.DataGridView dataGridView1;
  1862.         private System.Windows.Forms.Label label1;
  1863.         private System.Windows.Forms.Label label2;
  1864.         private System.Windows.Forms.Label label3;
  1865.         private System.Windows.Forms.Label MODE;
  1866.         private System.Windows.Forms.Label MAP;
  1867.         private System.Windows.Forms.Label HOST;
  1868.         private System.Windows.Forms.GroupBox groupBox1;
  1869.         private System.Windows.Forms.Button button4;
  1870.         private System.Windows.Forms.Timer timer3;
  1871.         private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
  1872.         private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
  1873.         private System.Windows.Forms.RichTextBox richTextBox1;
  1874.     }
  1875. }
Add Comment
Please, Sign In to add comment