예제 #1
0
        private void giveWeapon(bool akimbo, string gun)
        {
            int  akim = (akimbo) ? 1 : 0;
            uint num  = Console.Call <uint>(offsets.BG_GetWeaponIndexForName, new object[] { gun });

            if (num == 0 || num == 1)
            {
                MessageBox.Show("An Error has Occured");
            }
            else
            {
                if (mainClientIndex == -1)
                {
                    for (uint i = 0; i < 12; i++)
                    {
                        Console.CallVoid(offsets.G_GivePlayerWeapon, new object[] { getPlayerState(i), num, akim, 0 });
                        Console.CallVoid(offsets.G_InitializeAmmo, new object[] { getPlayerState(i), num, 0, 0 });
                    }
                }
                else
                {
                    Console.CallVoid(offsets.G_GivePlayerWeapon, new object[] { getPlayerState((uint)mainClientIndex), num, akim, 0 });
                    Console.CallVoid(offsets.G_InitializeAmmo, new object[] { getPlayerState((uint)mainClientIndex), num, 0, 0 });
                }
            }
        }
예제 #2
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     //Console.XNotify(textBox1.Text);
     //here is an RPC example:
     Console.CallVoid(JRPC.ThreadType.Title, "xam.xex", 656, 34, 0xFF, 2, textBox1.Text.ToWCHAR(), 1);
 }
예제 #3
0
 public static void X360Text(string a)
 {
     object[] arguments = new object[] { Type(), 0xff, 2, (a).ToWCHAR(), 1 };
     Serenity.CallVoid(JRPC.ThreadType.Title, "xam.xex", 0x290, arguments);
 }