Exemple #1
0
        public static void LoadConfig()
        {
            var path         = Path.Combine(Directory.GetCurrentDirectory(), "Settings.ini");
            var loadNoConfig = false;

            if (!File.Exists(path))
            {
                using (var sw = File.AppendText(path))
                {
                    {
                        sw.WriteLine("");
                        loadNoConfig = true;
                    }
                }
            }

            if (loadNoConfig)
            {
                loadNoConfig = false;
                SaveConfig();
            }

            try
            {
                var parser = new FileIniDataParser();
                var data   = parser.ReadFile("Settings.ini");
                // Keep ^^

                // Features
                Settings.GlowTeam.Enabled      = bool.Parse(data["GLOW TEAM"]["Enabled"]);
                Settings.GlowTeam.ChamsEnabled = bool.Parse(data["GLOW TEAM"]["Chams"]);
                Settings.GlowTeam.Alpha        = float.Parse(data["GLOW TEAM"]["Alpha"]);
                Settings.GlowTeam.Red          = float.Parse(data["GLOW TEAM"]["Red"]);
                Settings.GlowTeam.Green        = float.Parse(data["GLOW TEAM"]["Green"]);
                Settings.GlowTeam.Blue         = float.Parse(data["GLOW TEAM"]["Blue"]);

                Settings.GlowEnemy.Enabled      = bool.Parse(data["GLOW ENEMY"]["Enabled"]);
                Settings.GlowEnemy.ChamsEnabled = bool.Parse(data["GLOW ENEMY"]["Chams"]);
                Settings.GlowEnemy.Alpha        = float.Parse(data["GLOW ENEMY"]["Alpha"]);
                Settings.GlowEnemy.Red          = float.Parse(data["GLOW ENEMY"]["Red"]);
                Settings.GlowEnemy.Green        = float.Parse(data["GLOW ENEMY"]["Green"]);
                Settings.GlowEnemy.Blue         = float.Parse(data["GLOW ENEMY"]["Blue"]);

                Settings.Bhop.Enabled   = bool.Parse(data["BUNNY"]["Enabled"]);
                Settings.Bhop.JumpLimit = bool.Parse(data["BUNNY"]["JumpLimit"]);
                Settings.Bhop.MaxJumps  = int.Parse(data["BUNNY"]["MaxJumps"]);

                Settings.NoFlash.Enabled = bool.Parse(data["NO FLASH"]["Enabled"]);

                Settings.NoFlash.Flash = float.Parse(data["NO FLASH"]["Flash Amount"]);

                Settings.NoFlash.Enabled = bool.Parse(data["NOHANDS"]["Enabled"]);

                Settings.Fovchanger.Enabled = bool.Parse(data["FOV"]["Enabled"]);
                Settings.Fovchanger.Fov     = int.Parse(data["FOV"]["Fov"]);

                Settings.Hitsound.Enabled = bool.Parse(data["HITSOUND"]["Enabled"]);
                Settings.Hitsound.Mode    = int.Parse(data["HITSOUND"]["Mode"]);

                Settings.Trigger.Enabled = bool.Parse(data["TRIGGER"]["Enabled"]);

                Settings.Autopistol.Enabled = bool.Parse(data["AUTOPISTOL"]["Enabled"]);
                Settings.Autopistol.AnyGun  = bool.Parse(data["AUTOPISTOL"]["AnyGun"]);

                Settings.Radar.Enabled = bool.Parse(data["RADAR"]["Enabled"]);

                Settings.Aimbot.Enabled = bool.Parse(data["AIMBOT"]["Enabled"]);

                Settings.RCS.Enabled = bool.Parse(data["RCS"]["Enabled"]);
                Settings.RCS.X       = float.Parse(data["RCS"]["X"]);
                Settings.RCS.Y       = float.Parse(data["RCS"]["Y"]);

                Settings.Overlay.Enabled   = bool.Parse(data["OVERLAY"]["Enabled"]);
                Settings.Overlay.Crosshair = bool.Parse(data["OVERLAY"]["Crosshair"]);

                Settings.Skinchanger.Enabled          = bool.Parse(data["SKINCHANGER"]["Enabled"]);
                Settings.Skinchanger.WEAPON_DEAGLE    = int.Parse(data["SKINCHANGER"]["DEAGLESkin"]);
                Settings.Skinchanger.WEAPON_ELITE     = int.Parse(data["SKINCHANGER"]["ELITESkin"]);
                Settings.Skinchanger.WEAPON_FIVESEVEN = int.Parse(data["SKINCHANGER"]["FIVESEVENSkin"]);
                Settings.Skinchanger.WEAPON_GLOCK     = int.Parse(data["SKINCHANGER"]["GLOCKSkin"]);
                Settings.Skinchanger.WEAPON_AK47      = int.Parse(data["SKINCHANGER"]["AK47Skin"]);
                Settings.Skinchanger.WEAPON_AUG       = int.Parse(data["SKINCHANGER"]["AUGSkin"]);
                Settings.Skinchanger.WEAPON_AWP       = int.Parse(data["SKINCHANGER"]["AWPSkin"]);
                Settings.Skinchanger.WEAPON_FAMAS     = int.Parse(data["SKINCHANGER"]["FAMASSkin"]);
                Settings.Skinchanger.WEAPON_G3SG1     = int.Parse(data["SKINCHANGER"]["G3SG1Skin"]);
                Settings.Skinchanger.WEAPON_GALILAR   = int.Parse(data["SKINCHANGER"]["GALILSkin"]);
                Settings.Skinchanger.WEAPON_M249      = int.Parse(data["SKINCHANGER"]["M249Skin"]);
                Settings.Skinchanger.WEAPON_M4A1      = int.Parse(data["SKINCHANGER"]["M4A1Skin"]);
                Settings.Skinchanger.WEAPON_MAC10     = int.Parse(data["SKINCHANGER"]["MAC10Skin"]);
                Settings.Skinchanger.WEAPON_P90       = int.Parse(data["SKINCHANGER"]["P90Skin"]);
                Settings.Skinchanger.WEAPON_UMP45     = int.Parse(data["SKINCHANGER"]["UMP45Skin"]);
                Settings.Skinchanger.WEAPON_XM1014    = int.Parse(data["SKINCHANGER"]["XM1014Skin"]);
                Settings.Skinchanger.WEAPON_BIZON     = int.Parse(data["SKINCHANGER"]["BIZONSkin"]);
                Settings.Skinchanger.WEAPON_BIZON     = int.Parse(data["SKINCHANGER"]["BIZONSkin"]);
                Settings.Skinchanger.WEAPON_MAG7      = int.Parse(data["SKINCHANGER"]["MAG7Skin"]);
                Settings.Skinchanger.WEAPON_NEGEV     = int.Parse(data["SKINCHANGER"]["NEGEVSkin"]);
                Settings.Skinchanger.WEAPON_SAWEDOFF  = int.Parse(data["SKINCHANGER"]["SAWEDOFFSkin"]);
                Settings.Skinchanger.WEAPON_TEC9      = int.Parse(data["SKINCHANGER"]["TEC9Skin"]);
                Settings.Skinchanger.WEAPON_HKP2000   = int.Parse(data["SKINCHANGER"]["HKP2000Skin"]);
                Settings.Skinchanger.WEAPON_MP7       = int.Parse(data["SKINCHANGER"]["MP7Skin"]);
                Settings.Skinchanger.WEAPON_MP9       = int.Parse(data["SKINCHANGER"]["MP9Skin"]);
                Settings.Skinchanger.WEAPON_NOVA      = int.Parse(data["SKINCHANGER"]["NOVASkin"]);
                Settings.Skinchanger.WEAPON_P250      = int.Parse(data["SKINCHANGER"]["P250Skin"]);
                Settings.Skinchanger.WEAPON_SCAR20    = int.Parse(data["SKINCHANGER"]["SCAR20Skin"]);
                Settings.Skinchanger.WEAPON_SG556     = int.Parse(data["SKINCHANGER"]["SG556Skin"]);
                Settings.Skinchanger.WEAPON_SSG08     = int.Parse(data["SKINCHANGER"]["SSG08Skin"]);
                // Load config ^^
            }
            catch
            {
                SDK.Error("Config cannot be Loaded!, Try to delete your old one!", true);
                SDK.Error("IF YOU DONT HAVE A CONFIG STOP BITCHING AT ME ON UC!!!", true);
                Console.WriteLine("");

                LoadFailed = true;
            }

            if (!LoadFailed)
            {
                SDK.Log("Config Loaded!", true);
            }
            else
            {
                LoadFailed = false;
            }
        }