示例#1
0
        private void spawnCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (spawnCombo.SelectedItem.ToString() == "Throw Frag Grenade")
            {
                GenericHandler.ResetProjectile();
                sg_prev                 = 0x0001AD;
                sg_address              = VehicleTurretHandler.SetNewProjectile(sg_prev, "Grenade");
                projectileCombo.Text    = "";
                weaponsCombo.Text       = "";
                vehiclesCombo.Text      = "";
                propCombo.Text          = "";
                miscCombo.Text          = "";
                vehicleTurretCombo.Text = "";
                armorCombo.Text         = "";
                selectLabel.Text        = "Selected: Frag Grenade";

                //Unlimited grenades
                uint addr = 0xBA3C01;
                grenadeCheck.Checked = true;
                byte[] data = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
                // nop, nop, nop, nop, nop, nop
                MemoryManager.WriteToAddress(addr, data);
            }
            else if (spawnCombo.SelectedItem.ToString() == "Fire Weapon")
            {
                if (sg_address != 0xB5DBA5)
                {
                    sg_prev = 0x0001AD;
                    GenericHandler.SetNewProjectile(sg_prev, sg_address);
                    sg_address = 0xB5DBA5;
                    vehicleTurretCombo.Enabled = false;
                    projectileCombo.Text       = "";
                    weaponsCombo.Text          = "";
                    vehiclesCombo.Text         = "";
                    propCombo.Text             = "";
                    miscCombo.Text             = "";
                    vehicleTurretCombo.Text    = "";
                    armorCombo.Text            = "";
                    selectLabel.Text           = "Selected: Default";
                }
            }
        }
示例#2
0
        public void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (mapCheck.Checked)
            {
                GenericHandler.ResetProjectile();
                spawnCombo.Text         = "Fire Weapon";
                projectileCombo.Text    = "";
                weaponsCombo.Text       = "";
                vehiclesCombo.Text      = "";
                propCombo.Text          = "";
                miscCombo.Text          = "";
                vehicleTurretCombo.Text = "";
                armorCombo.Text         = "";
                selectLabel.Text        = "Selected: Default";

                projectileCombo.Enabled    = true;
                weaponsCombo.Enabled       = true;
                miscCombo.Enabled          = true;
                vehiclesCombo.Enabled      = true;
                armorCombo.Enabled         = true;
                propCombo.Enabled          = true;
                selectLabel.Enabled        = true;
                projectileLabel.Enabled    = true;
                weaponLabel.Enabled        = true;
                miscLabel.Enabled          = true;
                vehiclesLabel.Enabled      = true;
                armorLabel.Enabled         = true;
                propLabel.Enabled          = true;
                vehiclesLabel.Enabled      = true;
                vehicleTurretCombo.Enabled = (vehiclesCombo.SelectedItem != null && VehicleTurretHandler.accept_list.Contains((string)vehiclesCombo.SelectedItem));
                vehicleTurretLabel.Enabled = true;
                spawnLabel.Enabled         = true;
                spawnCombo.Enabled         = true;
                //grenadeSpawnCheck.Enabled = true;
            }
            else
            {
                GenericHandler.ResetProjectile();
                sg_prev = 0x0001AD;
                if (sg_address != 0xB5DBA5)
                {
                    GenericHandler.SetNewProjectile(sg_prev, sg_address);
                    sg_address = 0xB5DBA5;
                }
                spawnCombo.Text         = "Fire Weapon";
                projectileCombo.Text    = "";
                weaponsCombo.Text       = "";
                vehiclesCombo.Text      = "";
                propCombo.Text          = "";
                miscCombo.Text          = "";
                vehicleTurretCombo.Text = "";
                armorCombo.Text         = "";
                selectLabel.Text        = "Selected: Default";

                projectileCombo.Enabled    = false;
                weaponsCombo.Enabled       = false;
                miscCombo.Enabled          = false;
                vehiclesCombo.Enabled      = false;
                armorCombo.Enabled         = false;
                propCombo.Enabled          = false;
                selectLabel.Enabled        = false;
                projectileLabel.Enabled    = false;
                weaponLabel.Enabled        = false;
                miscLabel.Enabled          = false;
                vehiclesLabel.Enabled      = false;
                armorLabel.Enabled         = false;
                propLabel.Enabled          = false;
                vehiclesLabel.Enabled      = false;
                vehicleTurretCombo.Enabled = false;
                vehicleTurretLabel.Enabled = false;
                spawnLabel.Enabled         = false;
                spawnCombo.Enabled         = false;
                //grenadeSpawnCheck.Enabled = false;
            }
        }