public static void Main() { Game.LogTrivial("Loading SirenMastery " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version + ", developed by Albo1125"); Albo1125.Common.DependencyChecker.RegisterPluginForDependencyChecks(PluginName); Albo1125.Common.UpdateChecker.VerifyXmlNodeExists(PluginName, FileID, DownloadURL, Path); if (Albo1125.Common.DependencyChecker.DependencyCheckMain(PluginName, Albo1125CommonVer, MinimumRPHVer, OtherRequiredFilesToCheckFor: OtherFilesToCheckFor)) { if (Albo1125.Common.DependencyChecker.CheckIfFileExists("NAudio.dll", new Version("1.8.0.0"))) { if (Directory.Exists("Plugins/SirenMastery/vehicles")) { if (Albo1125.Common.DependencyChecker.CheckIfThereAreNoConflictingFiles(PluginName, new string[] { "Plugins/SirenControl.dll" })) { Game.LogTrivial("SirenMastery, developed by Albo1125, has been loaded successfully!"); SirenMasterySetup.Setup(); } else { Game.DisplayNotification("~r~SirenMastery exited due to an installation error."); } } else { Albo1125.Common.CommonLibrary.ExtensionMethods.DisplayPopupTextBoxWithConfirmation(PluginName, "You're missing the following folder: GTAV/Plugins/SirenMastery/vehicles. Please follow Part 2 of the documentation installation guide thoroughly before trying again.", true); } } else { Albo1125.Common.CommonLibrary.ExtensionMethods.DisplayPopupTextBoxWithConfirmation(PluginName, "Your version of NAudio.dll is out of date or you don't have it installed. Please install the NAudio.dll that's packaged in the download.", true); } } else { Game.DisplayNotification("~r~SirenMastery by Albo1125 has exited due to an installation error."); GameFiber.Hibernate(); return; } }
public static void OnUnload(bool Exit) { SirenMasterySetup.Cleanup(); }