SRS Bladez 30 Posted July 21, 2018 So I've got the settings folder with the settings.cs in there with everything I need to make an ini file. Here's my hole settings.cs, I don't know why the .ini file doesn't work namespace RoadIncidentCallouts { internal class Settings { private static readonly InitializationFile INIFile = new InitializationFile("Plugins/LSPDFR/RoadIncidentCallouts.ini"); internal static bool CheckForUpDates = true; internal static Keys ModifierKey = Keys.None; internal static Keys EndCalloutKey = Keys.End; internal static Keys InteractionKey = Keys.Y; internal static string OfficerName = "Senior Constable Young"; internal static string PoliceDepartment = "South Australian Police Department"; internal static void LoadSettings() { CheckForUpDates = INIFile.ReadBoolean("Main", "Check For Road Incident Callouts Updates", true); ModifierKey = INIFile.ReadEnum("Main", "Modifier Key", Keys.None); EndCalloutKey = INIFile.ReadEnum("Main", "End Callout Key", Keys.X); InteractionKey = INIFile.ReadEnum("Main", "Interaction Key", Keys.T); OfficerName = INIFile.ReadString("Main", "Officer Name", "Senior Constable Young"); PoliceDepartment = INIFile.ReadString("Main", "PoliceDepartment", "South Australian Police Department"); } internal static void CheckNameLength() { if (OfficerName.Length < 1 || OfficerName.Length > 12) { OfficerName = "Max12Chars"; "OfficerName length greater than 12 or smaller than 1".AddLog(); } } internal static bool wasJustPressed(Keys keyToCheck) { if (ModifierKey == Keys.None) return Game.IsKeyDown(keyToCheck); return Game.IsKeyDownRightNow(ModifierKey) && Game.IsKeyDown(keyToCheck); } internal static void Create() { using (var ini = File.AppendText("Plugins/LSPDFR/RoadIncidentCallouts.ini")) { ini.WriteLine("[Main]"); ini.WriteLine(string.Empty); ini.WriteLine(";If Road Incident Callouts should check for updates"); ini.WriteLine("Check For Updates=true"); ini.WriteLine(string.Empty); ini.WriteLine(";Optional modifier key"); ini.WriteLine("Modifier Key=None"); ini.WriteLine(string.Empty); ini.WriteLine(";Key to end the current callout"); ini.WriteLine("End Callout Key=End"); ini.WriteLine(string.Empty); ini.WriteLine(";Key to interact with peds in a callout"); ini.WriteLine("Interaction Key=Y"); ini.WriteLine(string.Empty); ini.WriteLine(";Your in game officer name, maximum of 12 chars"); ini.WriteLine("Officer Name=Senior Constable Young"); ini.WriteLine(";Certain callouts will make your player say you're in such and such police department. Edit this to change it"); ini.WriteLine("PoliceDepartment=South Australian Police Department"); } } } } Quote Hide SRS Bladez's signature Hide all signatures Hi Share this post Link to post Share on other sites
AlexanderK. 4 Posted July 30, 2018 You have a code typo. In line 34...36 you don't have {} the code has to be: internal static bool wasJustPressed(Keys keyToCheck) { if (ModifierKey == Keys.None) { return Game.IsKeyDown(keyToCheck); return Game.IsKeyDownRightNow(ModifierKey) && Game.IsKeyDown(keyToCheck); } } May be another problem also, but for now, the typo is important. Quote Hide AlexanderK.'s signature Hide all signatures HELLO!! I'm a Greek guy and YouTuber. I really like Modding and playing LSPDFR! I'm very familiar with Programming (Coding) and PC Hardware / Software. I'm also a Cuber ( I Solve Rubicks Cubes and other kinds). My YouTube Channel: https://www.youtube.com/c/ATGGGR/ Share this post Link to post Share on other sites
SRS Bladez 30 Posted July 30, 2018 Thanks for that, I forgot to end this post because I fixed it a while ago Quote Hide SRS Bladez's signature Hide all signatures Hi Share this post Link to post Share on other sites
AlexanderK. 4 Posted July 30, 2018 1 minute ago, SRS Bladez said: Thanks for that, I forgot to end this post because I fixed it a while ago Ok. Quote Hide AlexanderK.'s signature Hide all signatures HELLO!! I'm a Greek guy and YouTuber. I really like Modding and playing LSPDFR! I'm very familiar with Programming (Coding) and PC Hardware / Software. I'm also a Cuber ( I Solve Rubicks Cubes and other kinds). My YouTube Channel: https://www.youtube.com/c/ATGGGR/ Share this post Link to post Share on other sites
NoNameSet 633 Posted July 30, 2018 4 hours ago, AlexanderK. said: You have a code typo. In line 34...36 you don't have {} the code has to be: internal static bool wasJustPressed(Keys keyToCheck) { if (ModifierKey == Keys.None) { return Game.IsKeyDown(keyToCheck); return Game.IsKeyDownRightNow(ModifierKey) && Game.IsKeyDown(keyToCheck); } } May be another problem also, but for now, the typo is important. You don't need those brackets lol, th are you on about? The first line after the statement returns true and the second one false. Quote Share this post Link to post Share on other sites