Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace TheCharacterClothesMod
- {
- public class Clothes
- {
- public int headId;
- public int beardId;
- public int hairId;
- public int torsoId;
- public int legsId;
- public int handsId;
- public int footId;
- public int masksId;
- public int extraParts1Id;
- public int extraParts2Id;
- public int auxilaryPartsId;
- public int headTextureId;
- public int beardTextureId;
- public int hairTextureId;
- public int torsoTextureId;
- public int legsTextureId;
- public int handsTextureId;
- public int footTextureId;
- public int masksTextureId;
- public int extraParts1TextureId;
- public int extraParts2TextureId;
- public int auxilaryPartsTextureId;
- public int hatId;
- public int glassesId;
- public int earsId;
- public int hatTextureId;
- public int glassesTextureId;
- public int earsTextureId;
- public Clothes()
- {
- this.headId = 0;
- this.beardId = 0;
- this.hairId = 0;
- this.torsoId = 0;
- this.legsId = 0;
- this.handsId = 0;
- this.footId = 0;
- this.masksId = 0;
- this.extraParts1Id = 0;
- this.extraParts2Id = 0;
- this.auxilaryPartsId = 0;
- this.headTextureId = 0;
- this.beardTextureId = 0;
- this.hairTextureId = 0;
- this.torsoTextureId = 0;
- this.legsTextureId = 0;
- this.handsTextureId = 0;
- this.footTextureId = 0;
- this.masksTextureId = 0;
- this.extraParts1TextureId = 0;
- this.extraParts2TextureId = 0;
- this.auxilaryPartsTextureId = 0;
- this.hatId = 0;
- this.glassesId = 0;
- this.earsId = 0;
- this.hatTextureId = 0;
- this.glassesTextureId = 0;
- this.earsTextureId = 0;
- }
- }
- }
- //End of Part 1
- using GTA;
- using GTA.Native;
- using MadMilkman.Ini;
- using NativeUI;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.IO;
- using System.Windows.Forms;
- namespace TheCharacterClothesMod
- {
- public class MainClass : Script
- {
- private bool modActivated;
- private bool keepPersistent;
- private bool onStartup;
- private bool useDuffleBag;
- private bool gaveBackBag;
- private bool setupCacheClothes;
- private bool startedUp;
- private Keys openMenuKey;
- private Clothes cachedClothing;
- private Clothes SavedClothesForMichael;
- private Clothes SavedClothesForTrevor;
- private Clothes SavedClothesForFranklin;
- private UIMenu mainMenu;
- private MenuPool _menuPool;
- private UIMenuItem SaveCurrentClothes;
- private UIMenuItem LoadCurrentClothes;
- private UIMenuItem SaveGeneralSettings;
- private UIMenuCheckboxItem ActivateMod;
- private UIMenuCheckboxItem Persistent;
- private UIMenuCheckboxItem Startup;
- private UIMenuCheckboxItem DuffleBag;
- private UIMenuListItem DuffleBagTypes;
- private Model playerModel;
- private const string INI_PATH = ".\\scripts\\TheCharacterClothesMod.ini";
- private Control control1;
- private Control control2;
- public MainClass()
- {
- base.\u002Ector();
- if (!File.Exists(".\\scripts\\TheCharacterClothesMod.ini"))
- File.Create(".\\scripts\\TheCharacterClothesMod.ini").Close();
- LogWriter.WriteToLog("You are running version 0.9", false, (Script) this, (Exception) null);
- this.GetSettings();
- this.CreateMenus();
- this.add_Tick(new EventHandler(this.MainClass_Tick));
- this.add_KeyDown(new KeyEventHandler(this.MainClass_KeyDown));
- }
- private void GetSettings()
- {
- try
- {
- if (!File.Exists(".\\scripts\\TheCharacterClothesMod.ini"))
- return;
- IniFile iniFile = new IniFile();
- iniFile.Load(".\\scripts\\TheCharacterClothesMod.ini");
- if (iniFile.Sections.Contains("KEYS"))
- {
- if (iniFile.Sections["KEYS"].Keys.Contains("OPEN_MENU_KEY"))
- {
- this.openMenuKey = (Keys) Enum.Parse(typeof (Keys), iniFile.Sections["KEYS"].Keys["OPEN_MENU_KEY"].Value);
- }
- else
- {
- iniFile.Sections["KEYS"].Keys.Add("OPEN_MENU_KEY", "O");
- this.openMenuKey = Keys.O;
- iniFile.Save(".\\scripts\\TheCharacterClothesMod.ini");
- }
- }
- else
- {
- iniFile.Sections.Add("KEYS").Keys.Add("OPEN_MENU_KEY", "O");
- this.openMenuKey = Keys.O;
- }
- if (iniFile.Sections.Contains("GENERAL"))
- {
- IniSection section = iniFile.Sections["GENERAL"];
- if (section.Keys.Contains("MOD_ACTIVATE"))
- {
- this.ActivateMod.Checked = bool.Parse(iniFile.Sections["GENERAL"].Keys["MOD_ACTIVATE"].Value);
- this.modActivated = this.ActivateMod.Checked;
- }
- if (section.Keys.Contains("KEEP_PERSISTENT"))
- {
- this.Persistent.Checked = bool.Parse(iniFile.Sections["GENERAL"].Keys["KEEP_PERSISTENT"].Value);
- this.keepPersistent = this.Persistent.Checked;
- }
- if (section.Keys.Contains("ON_STARTUP"))
- {
- this.Startup.Checked = bool.Parse(iniFile.Sections["GENERAL"].Keys["ON_STARTUP"].Value);
- this.onStartup = this.Startup.Checked;
- }
- if (section.Keys.Contains("USE_DUFFLE_BAG"))
- {
- this.DuffleBag.Checked = bool.Parse(iniFile.Sections["GENERAL"].Keys["USE_DUFFLE_BAG"].Value);
- this.useDuffleBag = this.DuffleBag.Checked;
- }
- if (section.Keys.Contains("DUFFLE_BAG_TYPE"))
- this.DuffleBagTypes.Index = int.Parse(section.Keys["DUFFLE_BAG_TYPE"].Value);
- }
- else
- {
- IniSection iniSection = iniFile.Sections.Add("GENERAL");
- iniSection.Keys.Add("MOD_ACTIVATE", this.modActivated.ToString());
- iniSection.Keys.Add("KEEP_PERSISTENT", this.keepPersistent.ToString());
- iniSection.Keys.Add("ON_STARTUP", this.onStartup.ToString());
- iniSection.Keys.Add("USE_DUFFLE_BAG", this.useDuffleBag.ToString());
- iniSection.Keys.Add("DUFFLE_BAG_TYPE", 0.ToString());
- }
- if (iniFile.Sections.Contains("CONTROLLER_SETTINGS"))
- {
- IniSection section = iniFile.Sections["CONTROLLER_SETTINGS"];
- if (section.Keys.Contains("CONTROL_1"))
- {
- if (section.Keys.Contains("CONTROL_2"))
- {
- try
- {
- this.control1 = (Control) Enum.Parse(typeof (Control), section.Keys["CONTROL_1"].Value);
- this.control2 = (Control) Enum.Parse(typeof (Control), section.Keys["CONTROL_2"].Value);
- goto label_25;
- }
- catch (Exception ex)
- {
- UI.Notify(ex.Message);
- goto label_25;
- }
- }
- }
- UI.Notify("Could not read file.");
- }
- else
- {
- IniSection iniSection = iniFile.Sections.Add("CONTROLLER_SETTINGS");
- iniSection.Keys.Add("CONTROL_1", "ScriptPadLeft");
- iniSection.Keys.Add("CONTROL_2", "ScriptLB");
- }
- label_25:
- iniFile.Save(".\\scripts\\TheCharacterClothesMod.ini");
- }
- catch (Exception ex)
- {
- UI.Notify("Could not read settings from TheCharacterClothesMod.ini file.");
- UI.Notify(ex.Message);
- LogWriter.WriteToLog(ex.Message, true, (Script) this, ex);
- }
- }
- private void CreateMenus()
- {
- this.mainMenu = new UIMenu("", "~g~The Character Clothes Mod");
- this._menuPool = new MenuPool();
- this._menuPool.Add(this.mainMenu);
- this.SaveCurrentClothes = new UIMenuItem("Save Current Clothes For: ", "Saves your current character's clothes clothes.");
- this.LoadCurrentClothes = new UIMenuItem("Load Saved Clothes For: ", "Loads your saved clothes.");
- this.SaveGeneralSettings = new UIMenuItem("Save General Settings", "Saves settings for checkboxes above.");
- this.ActivateMod = new UIMenuCheckboxItem("Only For Char Switch", this.modActivated, "When you switch characters, the character you switch to will have the clothes you saved for him.");
- this.Persistent = new UIMenuCheckboxItem("Keep Persistent", this.keepPersistent, "Keeps your clothes persistent, and they cannot be changed no matter what.");
- this.Startup = new UIMenuCheckboxItem("On Startup", this.onStartup, "If checked, your clothes will be automatically on you when the script starts.");
- this.DuffleBag = new UIMenuCheckboxItem("Use Duffel Bag", this.useDuffleBag, "If checked, you will use a duffle bag that will hold your weapons.");
- this.DuffleBagTypes = new UIMenuListItem("Duffel Bag Type", new List<object>()
- {
- (object) "Black",
- (object) "Tan"
- }, 0, "Select a duffle bag type.");
- this.mainMenu.AddItem((UIMenuItem) this.ActivateMod);
- this.mainMenu.AddItem((UIMenuItem) this.Persistent);
- this.mainMenu.AddItem((UIMenuItem) this.Startup);
- this.mainMenu.AddItem((UIMenuItem) this.DuffleBag);
- this.mainMenu.AddItem((UIMenuItem) this.DuffleBagTypes);
- this.mainMenu.AddItem(this.SaveGeneralSettings);
- this.mainMenu.AddItem(this.SaveCurrentClothes);
- this.mainMenu.AddItem(this.LoadCurrentClothes);
- this.mainMenu.OnItemSelect += new ItemSelectEvent(this.MainMenu_OnItemSelect);
- this.mainMenu.OnCheckboxChange += new CheckboxChangeEvent(this.MainMenu_OnCheckboxChange);
- this.DuffleBagTypes.OnListChanged += new ItemListEvent(this.DuffleBagTypes_OnListChanged);
- }
- private void MainMenu_OnItemSelect(UIMenu sender, UIMenuItem selectedItem, int index)
- {
- if (selectedItem == this.SaveCurrentClothes)
- this.SaveToIni();
- if (selectedItem == this.LoadCurrentClothes)
- this.LoadFromIni();
- if (selectedItem != this.SaveGeneralSettings)
- return;
- this.SaveGeneral();
- }
- private void SaveToIni()
- {
- try
- {
- if (!File.Exists(".\\scripts\\TheCharacterClothesMod.ini"))
- return;
- this.SaveToIniForChar(Utilities.GetCurrentCharacterName());
- }
- catch (Exception ex)
- {
- UI.Notify("Could not save to TheCharacterClothesMod.ini");
- UI.Notify(ex.Message);
- LogWriter.WriteToLog(ex.Message, true, (Script) this, ex);
- }
- }
- private void SaveToIniForChar(string charName)
- {
- string upper = charName.ToUpper();
- Clothes currentClothes = Utilities.GetCurrentClothes();
- IniFile iniFile = new IniFile();
- iniFile.Load(".\\scripts\\TheCharacterClothesMod.ini");
- if (!iniFile.Sections.Contains(charName))
- {
- IniSection iniSection = iniFile.Sections.Add(upper);
- iniSection.Keys.Add("HEAD_ID", currentClothes.headId.ToString());
- iniSection.Keys.Add("BEARD_ID", currentClothes.beardId.ToString());
- iniSection.Keys.Add("HAIR_ID", currentClothes.hairId.ToString());
- iniSection.Keys.Add("TORSO_ID", currentClothes.torsoId.ToString());
- iniSection.Keys.Add("LEGS_ID", currentClothes.legsId.ToString());
- iniSection.Keys.Add("HANDS_ID", currentClothes.handsId.ToString());
- iniSection.Keys.Add("FOOT_ID", currentClothes.footId.ToString());
- iniSection.Keys.Add("EXTRA_PART1_ID", currentClothes.extraParts1Id.ToString());
- if (!this.useDuffleBag && currentClothes.extraParts2Id != 1 && (currentClothes.extraParts2Id != 2 && currentClothes.extraParts2Id != 11) && currentClothes.extraParts2Id != 12)
- {
- iniSection.Keys.Add("EXTRA_PART2_ID", currentClothes.extraParts2Id.ToString());
- }
- else
- {
- UI.Notify("Cannot save duffle bag created by this script.");
- iniSection.Keys.Add("EXTRA_PART2_ID", "0");
- }
- iniSection.Keys.Add("MASKS_ID", currentClothes.masksId.ToString());
- iniSection.Keys.Add("AUXILLIRAY_PARTS_ID", currentClothes.auxilaryPartsId.ToString());
- iniSection.Keys.Add("HEAD_TEXTURE_ID", currentClothes.headTextureId.ToString());
- iniSection.Keys.Add("BEARD_TEXTURE_ID", currentClothes.beardTextureId.ToString());
- iniSection.Keys.Add("HAIR_TEXTURE_ID", currentClothes.hairTextureId.ToString());
- iniSection.Keys.Add("TORSO_TEXTURE_ID", currentClothes.torsoTextureId.ToString());
- iniSection.Keys.Add("LEGS_TEXTURE_ID", currentClothes.legsTextureId.ToString());
- iniSection.Keys.Add("HANDS_TEXTURE_ID", currentClothes.handsTextureId.ToString());
- iniSection.Keys.Add("FOOT_TEXTURE_ID", currentClothes.footTextureId.ToString());
- iniSection.Keys.Add("EXTRA_PART1_TEXTURE_ID", currentClothes.extraParts1TextureId.ToString());
- iniSection.Keys.Add("EXTRA_PART2_TEXTURE_ID", currentClothes.extraParts2TextureId.ToString());
- iniSection.Keys.Add("MASKS_TEXTURE_ID", currentClothes.masksTextureId.ToString());
- iniSection.Keys.Add("AUXILLIRAY_PARTS_TEXTURE_ID", currentClothes.auxilaryPartsTextureId.ToString());
- iniSection.Keys.Add("HAT_ID", currentClothes.hatId.ToString());
- iniSection.Keys.Add("GLASSES_ID", currentClothes.glassesId.ToString());
- iniSection.Keys.Add("EARS_ID", currentClothes.earsId.ToString());
- iniSection.Keys.Add("HAT_TEXTURE_ID", currentClothes.hatTextureId.ToString());
- iniSection.Keys.Add("GLASSES_TEXTURE_ID", currentClothes.glassesTextureId.ToString());
- iniSection.Keys.Add("EARS_TEXTURE_ID", currentClothes.earsTextureId.ToString());
- }
- else
- {
- IniSection section = iniFile.Sections[upper];
- section.Keys["HEAD_ID"].Value = currentClothes.headId.ToString();
- section.Keys["BEARD_ID"].Value = currentClothes.beardId.ToString();
- section.Keys["HAIR_ID"].Value = currentClothes.hairId.ToString();
- section.Keys["TORSO_ID"].Value = currentClothes.torsoId.ToString();
- section.Keys["LEGS_ID"].Value = currentClothes.legsId.ToString();
- section.Keys["HANDS_ID"].Value = currentClothes.handsId.ToString();
- section.Keys["FOOT_ID"].Value = currentClothes.footId.ToString();
- section.Keys["EXTRA_PART1_ID"].Value = currentClothes.extraParts1Id.ToString();
- if (!this.useDuffleBag)
- section.Keys["EXTRA_PART2_ID"].Value = currentClothes.extraParts2Id.ToString();
- else
- UI.Notify("Not saving duffle bag created by this script.");
- section.Keys["MASKS_ID"].Value = currentClothes.masksId.ToString();
- section.Keys["AUXILLIRAY_PARTS_ID"].Value = currentClothes.auxilaryPartsId.ToString();
- section.Keys["HEAD_TEXTURE_ID"].Value = currentClothes.headTextureId.ToString();
- section.Keys["BEARD_TEXTURE_ID"].Value = currentClothes.beardTextureId.ToString();
- section.Keys["HAIR_TEXTURE_ID"].Value = currentClothes.hairTextureId.ToString();
- section.Keys["TORSO_TEXTURE_ID"].Value = currentClothes.torsoTextureId.ToString();
- section.Keys["LEGS_TEXTURE_ID"].Value = currentClothes.legsTextureId.ToString();
- section.Keys["HANDS_TEXTURE_ID"].Value = currentClothes.handsTextureId.ToString();
- section.Keys["FOOT_TEXTURE_ID"].Value = currentClothes.footTextureId.ToString();
- section.Keys["EXTRA_PART1_TEXTURE_ID"].Value = currentClothes.extraParts1TextureId.ToString();
- section.Keys["EXTRA_PART2_TEXTURE_ID"].Value = currentClothes.extraParts2TextureId.ToString();
- section.Keys["MASKS_TEXTURE_ID"].Value = currentClothes.masksTextureId.ToString();
- section.Keys["AUXILLIRAY_PARTS_TEXTURE_ID"].Value = currentClothes.auxilaryPartsTextureId.ToString();
- section.Keys["HAT_ID"].Value = currentClothes.hatId.ToString();
- section.Keys["GLASSES_ID"].Value = currentClothes.glassesId.ToString();
- section.Keys["EARS_ID"].Value = currentClothes.earsId.ToString();
- section.Keys["HAT_TEXTURE_ID"].Value = currentClothes.hatTextureId.ToString();
- section.Keys["GLASSES_TEXTURE_ID"].Value = currentClothes.glassesTextureId.ToString();
- section.Keys["EARS_TEXTURE_ID"].Value = currentClothes.earsTextureId.ToString();
- }
- if (!(charName == "Michael"))
- {
- if (!(charName == "Trevor"))
- {
- if (charName == "Franklin")
- UI.Notify("Saved ~g~clothes~w~.");
- }
- else
- UI.Notify("Saved ~o~clothes~w~.");
- }
- else
- UI.Notify("Saved ~b~clothes~w~.");
- iniFile.Save(".\\scripts\\TheCharacterClothesMod.ini");
- }
- private void LoadFromIni()
- {
- try
- {
- if (!File.Exists(".\\scripts\\TheCharacterClothesMod.ini"))
- return;
- this.LoadFromIniForChar(Utilities.GetCurrentCharacterName());
- }
- catch (Exception ex)
- {
- UI.Notify("Could not load from TheCharacterClothesMod.ini");
- UI.Notify(ex.Message);
- LogWriter.WriteToLog(ex.Message, true, (Script) this, ex);
- }
- }
- private void LoadFromIniForChar(string charName)
- {
- IniFile iniFile = new IniFile();
- iniFile.Load(".\\scripts\\TheCharacterClothesMod.ini");
- IniSection section = iniFile.Sections[charName.ToUpper()];
- if (section != null)
- {
- Clothes clothesToSet = new Clothes();
- if (section.Keys["HEAD_ID"] != null)
- {
- clothesToSet.headId = int.Parse(section.Keys["HEAD_ID"].Value);
- clothesToSet.beardId = int.Parse(section.Keys["BEARD_ID"].Value);
- clothesToSet.hairId = int.Parse(section.Keys["HAIR_ID"].Value);
- clothesToSet.torsoId = int.Parse(section.Keys["TORSO_ID"].Value);
- clothesToSet.legsId = int.Parse(section.Keys["LEGS_ID"].Value);
- clothesToSet.handsId = int.Parse(section.Keys["HANDS_ID"].Value);
- clothesToSet.footId = int.Parse(section.Keys["FOOT_ID"].Value);
- clothesToSet.extraParts1Id = int.Parse(section.Keys["EXTRA_PART1_ID"].Value);
- clothesToSet.extraParts2Id = int.Parse(section.Keys["EXTRA_PART2_ID"].Value);
- clothesToSet.masksId = int.Parse(section.Keys["MASKS_ID"].Value);
- clothesToSet.auxilaryPartsId = int.Parse(section.Keys["AUXILLIRAY_PARTS_ID"].Value);
- clothesToSet.headTextureId = int.Parse(section.Keys["HEAD_TEXTURE_ID"].Value);
- clothesToSet.beardTextureId = int.Parse(section.Keys["BEARD_TEXTURE_ID"].Value);
- clothesToSet.hairTextureId = int.Parse(section.Keys["HAIR_TEXTURE_ID"].Value);
- clothesToSet.torsoTextureId = int.Parse(section.Keys["TORSO_TEXTURE_ID"].Value);
- clothesToSet.legsTextureId = int.Parse(section.Keys["LEGS_TEXTURE_ID"].Value);
- clothesToSet.handsTextureId = int.Parse(section.Keys["HANDS_TEXTURE_ID"].Value);
- clothesToSet.footTextureId = int.Parse(section.Keys["FOOT_TEXTURE_ID"].Value);
- clothesToSet.extraParts1TextureId = int.Parse(section.Keys["EXTRA_PART1_TEXTURE_ID"].Value);
- clothesToSet.extraParts2TextureId = int.Parse(section.Keys["EXTRA_PART2_TEXTURE_ID"].Value);
- clothesToSet.masksTextureId = int.Parse(section.Keys["MASKS_TEXTURE_ID"].Value);
- clothesToSet.auxilaryPartsTextureId = int.Parse(section.Keys["AUXILLIRAY_PARTS_TEXTURE_ID"].Value);
- clothesToSet.hatId = int.Parse(section.Keys["HAT_ID"].Value);
- clothesToSet.glassesId = int.Parse(section.Keys["GLASSES_ID"].Value);
- clothesToSet.earsId = int.Parse(section.Keys["EARS_ID"].Value);
- clothesToSet.hatTextureId = int.Parse(section.Keys["HAT_TEXTURE_ID"].Value);
- clothesToSet.glassesTextureId = int.Parse(section.Keys["GLASSES_TEXTURE_ID"].Value);
- clothesToSet.earsTextureId = int.Parse(section.Keys["EARS_TEXTURE_ID"].Value);
- Utilities.SetClothes(Game.get_Player().get_Character(), clothesToSet);
- if (!(charName == "Michael"))
- {
- if (!(charName == "Trevor"))
- {
- if (!(charName == "Franklin"))
- return;
- UI.Notify("~g~Clothes~w~ loaded.");
- this.SavedClothesForFranklin = clothesToSet;
- }
- else
- {
- UI.Notify("~o~Clothes~w~ loaded.");
- this.SavedClothesForTrevor = clothesToSet;
- }
- }
- else
- {
- UI.Notify("~b~Clothes~w~ loaded.");
- this.SavedClothesForMichael = clothesToSet;
- }
- }
- else
- UI.Notify("Error in TheCharacterClothesMod.ini file. Please ask a developer for help.");
- }
- else
- UI.Notify("Could not load clothes. No clothes found for " + charName + ".");
- }
- private void SaveGeneral()
- {
- try
- {
- IniFile iniFile = new IniFile();
- iniFile.Load(".\\scripts\\TheCharacterClothesMod.ini");
- if (iniFile == null)
- return;
- if (iniFile.Sections.Contains("GENERAL"))
- {
- IniSection section = iniFile.Sections["GENERAL"];
- section.Keys["KEEP_PERSISTENT"].Value = this.keepPersistent.ToString();
- section.Keys["MOD_ACTIVATE"].Value = this.modActivated.ToString();
- section.Keys["ON_STARTUP"].Value = this.onStartup.ToString();
- section.Keys["USE_DUFFLE_BAG"].Value = this.useDuffleBag.ToString();
- section.Keys["DUFFLE_BAG_TYPE"].Value = this.DuffleBagTypes.Index.ToString();
- UI.Notify("Settings saved.");
- }
- else
- {
- IniSection iniSection = iniFile.Sections.Add("GENERAL");
- iniSection.Keys.Add("KEEP_PERSISTENT", this.keepPersistent.ToString());
- iniSection.Keys.Add("MOD_ACTIVATE", this.modActivated.ToString());
- iniSection.Keys.Add("ON_STARTUP", this.onStartup.ToString());
- iniSection.Keys.Add("USE_DUFFLE_BAG", this.useDuffleBag.ToString());
- iniSection.Keys.Add("DUFFLE_BAG_TYPE", this.DuffleBagTypes.Index.ToString());
- UI.Notify("Settings added to ini, and saved.");
- }
- iniFile.Save(".\\scripts\\TheCharacterClothesMod.ini");
- }
- catch (Exception ex)
- {
- UI.Notify("Could not save settings.");
- UI.Notify(ex.Message);
- LogWriter.WriteToLog(ex.Message, true, (Script) this, ex);
- }
- }
- private void MainMenu_OnCheckboxChange(
- UIMenu sender,
- UIMenuCheckboxItem checkboxItem,
- bool Checked)
- {
- if (checkboxItem == this.ActivateMod)
- this.modActivated = Checked;
- if (checkboxItem == this.Persistent)
- this.keepPersistent = Checked;
- if (checkboxItem == this.DuffleBag)
- {
- this.useDuffleBag = Checked;
- this.NotifyAvailableBags(this.DuffleBagTypes.Index);
- }
- if (checkboxItem != this.Startup)
- return;
- this.onStartup = Checked;
- this.startedUp = true;
- }
- private void NotifyAvailableBags(int newIndex)
- {
- if (newIndex != 1)
- return;
- string currentCharacterName = Utilities.GetCurrentCharacterName();
- if (!(currentCharacterName == "Trevor"))
- {
- if (!(currentCharacterName == "Franklin"))
- return;
- UI.Notify("Selected bag type not available for ~g~Franklin~w~.");
- }
- else
- UI.Notify("Selected bag type not available for ~o~Trevor~w~.");
- }
- private void ControllerSupport()
- {
- if (this.mainMenu.Visible || !Game.IsControlPressed(2, this.control1))
- return;
- Game.DisableControlThisFrame(2, this.control2);
- if (!Game.IsDisabledControlJustPressed(2, this.control2))
- return;
- this.mainMenu.Visible = true;
- }
- private void DuffleBagTypes_OnListChanged(UIMenuListItem sender, int newIndex)
- {
- this.NotifyAvailableBags(newIndex);
- }
- private void MainClass_Tick(object sender, EventArgs e)
- {
- if (this.onStartup && !this.startedUp)
- {
- if (Game.get_IsLoading() && !this.startedUp)
- {
- Script.Wait(500);
- }
- else
- {
- this.LoadFromIni();
- this.startedUp = true;
- }
- }
- if (this._menuPool != null)
- this._menuPool.ProcessMenus();
- this.ControllerSupport();
- if (this.keepPersistent)
- {
- if (this.useDuffleBag)
- {
- this.Persistent.Checked = false;
- this.Persistent.Enabled = false;
- this.keepPersistent = false;
- }
- this.DuffleBag.Enabled = false;
- this.DuffleBag.Checked = false;
- this.useDuffleBag = false;
- this.DuffleBagTypes.Enabled = false;
- }
- else if (!this.useDuffleBag)
- {
- this.Persistent.Checked = false;
- this.Persistent.Enabled = true;
- this.keepPersistent = false;
- }
- if (this.useDuffleBag)
- {
- if (this.keepPersistent)
- {
- this.DuffleBag.Checked = false;
- this.DuffleBag.Enabled = false;
- this.DuffleBagTypes.Enabled = false;
- this.useDuffleBag = false;
- }
- this.keepPersistent = false;
- this.Persistent.Checked = false;
- this.Persistent.Enabled = false;
- }
- else if (!this.keepPersistent)
- {
- this.DuffleBag.Checked = false;
- this.DuffleBag.Enabled = true;
- this.DuffleBagTypes.Enabled = true;
- this.useDuffleBag = false;
- }
- this.SetBannerSprite();
- if (Function.Call<bool>((Hash) -2750907727005174945L, new InputArgument[0]) != null)
- return;
- this.SetupDuffleBag();
- if (!this.keepPersistent && !this.modActivated && (!this.onStartup && !this.useDuffleBag))
- this.SaveGeneralSettings.Enabled = false;
- else if (this.keepPersistent || this.modActivated || (this.onStartup || this.useDuffleBag))
- this.SaveGeneralSettings.Enabled = true;
- this.DuffleBagTypes.Enabled = this.useDuffleBag;
- if (this.keepPersistent)
- this.KeepClothesPersistent();
- if (Utilities.GetCurrentCharacterName() != "")
- {
- this.LoadCurrentClothes.Enabled = true;
- this.SaveCurrentClothes.Enabled = true;
- this.SaveCurrentClothes.Text = "Save Current Clothes For: " + Utilities.GetCurrentCharacterName();
- this.LoadCurrentClothes.Text = "Load Saved Clothes For: " + Utilities.GetCurrentCharacterName();
- }
- else
- {
- this.LoadCurrentClothes.Enabled = false;
- this.SaveCurrentClothes.Enabled = false;
- this.SaveCurrentClothes.Text = "Save Current Clothes For: ";
- this.LoadCurrentClothes.Text = "Load Saved Clothes For: ";
- }
- Model model = ((Entity) Game.get_Player().get_Character()).get_Model();
- if (!this.modActivated || !Model.op_Inequality(this.playerModel, model))
- return;
- this.LoadFromIni();
- this.playerModel = model;
- this.cachedClothing = Utilities.GetCurrentClothes();
- }
- private void SetBannerSprite()
- {
- if (this.mainMenu == null)
- return;
- string currentCharacterName = Utilities.GetCurrentCharacterName();
- if (!(currentCharacterName != ""))
- return;
- if (currentCharacterName == "Michael")
- {
- ((UIText) this.mainMenu.Subtitle).set_Caption("~b~THE CHARACTER CLOTHES MOD");
- this.mainMenu.SetBannerType(new Sprite("shopui_title_graphics_michael", "shopui_title_graphics_michael", new Point(0, 0), new Size(0, 0)));
- }
- if (currentCharacterName == "Trevor")
- {
- ((UIText) this.mainMenu.Subtitle).set_Caption("~o~THE CHARACTER CLOTHES MOD");
- this.mainMenu.SetBannerType(new Sprite("shopui_title_graphics_trevor", "shopui_title_graphics_trevor", new Point(0, 0), new Size(0, 0)));
- }
- if (!(currentCharacterName == "Franklin"))
- return;
- ((UIText) this.mainMenu.Subtitle).set_Caption("~g~THE CHARACTER CLOTHES MOD");
- this.mainMenu.SetBannerType(new Sprite("shopui_title_graphics_franklin", "shopui_title_graphics_franklin", new Point(0, 0), new Size(0, 0)));
- }
- private void SetupDuffleBag()
- {
- Ped character = Game.get_Player().get_Character();
- if (!this.setupCacheClothes)
- {
- this.cachedClothing = Utilities.GetCurrentClothes();
- this.setupCacheClothes = true;
- }
- if (!Utilities.DoClothesMatch(this.cachedClothing) && this.cachedClothing != null)
- {
- Clothes currentClothes = Utilities.GetCurrentClothes();
- if (currentClothes.extraParts2Id == 1 || currentClothes.extraParts2Id == 2 || (currentClothes.extraParts2Id == 11 || currentClothes.extraParts2Id == 12))
- currentClothes.extraParts2Id = this.cachedClothing.extraParts2Id;
- this.cachedClothing = currentClothes;
- }
- if (this.useDuffleBag)
- {
- Clothes currentClothes = Utilities.GetCurrentClothes();
- int index = this.DuffleBagTypes.Index;
- if (Utilities.GetSmallWeaponCount(character) >= 6 || Utilities.GetBigWeaponCount(character) >= 1)
- {
- switch (index)
- {
- case 0:
- currentClothes.extraParts2Id = 1;
- break;
- case 1:
- currentClothes.extraParts2Id = 12;
- break;
- }
- }
- else
- {
- switch (index)
- {
- case 0:
- currentClothes.extraParts2Id = this.cachedClothing.extraParts2Id;
- break;
- case 1:
- currentClothes.extraParts2Id = this.cachedClothing.extraParts2Id;
- break;
- }
- }
- Utilities.SetClothes(character, currentClothes);
- this.gaveBackBag = false;
- }
- else
- {
- if (this.gaveBackBag)
- return;
- Utilities.SetClothes(character, this.cachedClothing);
- string str = "Resetting ";
- string currentCharacterName = Utilities.GetCurrentCharacterName();
- if (!(currentCharacterName == "Michael"))
- {
- if (!(currentCharacterName == "Trevor"))
- {
- if (currentCharacterName == "Franklin")
- str += "~g~bag~w~.";
- }
- else
- str += "~o~bag~w~.";
- }
- else
- str += "~b~bag~w~.";
- UI.Notify(str);
- this.gaveBackBag = true;
- }
- }
- private void KeepClothesPersistent()
- {
- string currentCharacterName = Utilities.GetCurrentCharacterName();
- IniFile iniFile = new IniFile();
- iniFile.Load(".\\scripts\\TheCharacterClothesMod.ini");
- if (iniFile == null)
- return;
- if (currentCharacterName == "Michael")
- {
- if (!iniFile.Sections.Contains("MICHAEL") || Utilities.DoClothesMatch(this.SavedClothesForMichael))
- return;
- Utilities.SetClothes(Game.get_Player().get_Character(), this.SavedClothesForMichael);
- }
- else if (currentCharacterName == "Trevor")
- {
- if (!iniFile.Sections.Contains("TREVOR") || Utilities.DoClothesMatch(this.SavedClothesForTrevor))
- return;
- Utilities.SetClothes(Game.get_Player().get_Character(), this.SavedClothesForTrevor);
- }
- else
- {
- if (!(currentCharacterName == "Franklin") || !iniFile.Sections.Contains("FRANKLIN") || Utilities.DoClothesMatch(this.SavedClothesForFranklin))
- return;
- Utilities.SetClothes(Game.get_Player().get_Character(), this.SavedClothesForFranklin);
- }
- }
- private void MainClass_KeyDown(object sender, KeyEventArgs e)
- {
- if (this.mainMenu == null || e.KeyCode != this.openMenuKey)
- return;
- this.mainMenu.Visible = !this.mainMenu.Visible;
- }
- }
- }
- //End of Part 2
- using GTA;
- using GTA.Native;
- using MadMilkman.Ini;
- using System;
- namespace TheCharacterClothesMod
- {
- internal class Utilities
- {
- private static Script @this;
- public static Clothes GetCurrentClothes()
- {
- Clothes clothes = new Clothes();
- int handle = ((Entity) Game.get_Player().get_Character()).get_Handle();
- clothes.headId = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(0)
- });
- clothes.beardId = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(1)
- });
- clothes.hairId = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(2)
- });
- clothes.torsoId = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(3)
- });
- clothes.legsId = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(4)
- });
- clothes.handsId = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(5)
- });
- clothes.footId = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(6)
- });
- clothes.extraParts1Id = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(8)
- });
- clothes.extraParts2Id = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(9)
- });
- clothes.masksId = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(10)
- });
- clothes.auxilaryPartsId = (int) Function.Call<int>((Hash) 7490462606036423932L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(11)
- });
- clothes.headTextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(0)
- });
- clothes.beardTextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(1)
- });
- clothes.hairTextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(2)
- });
- clothes.torsoTextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(3)
- });
- clothes.legsTextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(4)
- });
- clothes.handsTextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(5)
- });
- clothes.footTextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(6)
- });
- clothes.extraParts1TextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(8)
- });
- clothes.extraParts2TextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(9)
- });
- clothes.masksTextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(10)
- });
- clothes.auxilaryPartsTextureId = (int) Function.Call<int>((Hash) 334205219021784294L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(11)
- });
- clothes.hatId = (int) Function.Call<int>((Hash) -8535233825580798760L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(0)
- });
- clothes.glassesId = (int) Function.Call<int>((Hash) -8535233825580798760L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(1)
- });
- clothes.earsId = (int) Function.Call<int>((Hash) -8535233825580798760L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(2)
- });
- clothes.hatTextureId = (int) Function.Call<int>((Hash) -2219814444253832526L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(0)
- });
- clothes.glassesTextureId = (int) Function.Call<int>((Hash) -2219814444253832526L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(1)
- });
- clothes.earsTextureId = (int) Function.Call<int>((Hash) -2219814444253832526L, new InputArgument[2]
- {
- InputArgument.op_Implicit(handle),
- InputArgument.op_Implicit(2)
- });
- return clothes;
- }
- public static void SetClothes(Ped ped, Clothes clothesToSet)
- {
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(clothesToSet.headId),
- InputArgument.op_Implicit(clothesToSet.headTextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(clothesToSet.beardId),
- InputArgument.op_Implicit(clothesToSet.beardTextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(2),
- InputArgument.op_Implicit(clothesToSet.hairId),
- InputArgument.op_Implicit(clothesToSet.hairTextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(3),
- InputArgument.op_Implicit(clothesToSet.torsoId),
- InputArgument.op_Implicit(clothesToSet.torsoTextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(4),
- InputArgument.op_Implicit(clothesToSet.legsId),
- InputArgument.op_Implicit(clothesToSet.legsTextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(5),
- InputArgument.op_Implicit(clothesToSet.handsId),
- InputArgument.op_Implicit(clothesToSet.handsTextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(6),
- InputArgument.op_Implicit(clothesToSet.footId),
- InputArgument.op_Implicit(clothesToSet.footTextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(8),
- InputArgument.op_Implicit(clothesToSet.extraParts1Id),
- InputArgument.op_Implicit(clothesToSet.extraParts1TextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(9),
- InputArgument.op_Implicit(clothesToSet.extraParts2Id),
- InputArgument.op_Implicit(clothesToSet.extraParts2TextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(10),
- InputArgument.op_Implicit(clothesToSet.masksId),
- InputArgument.op_Implicit(clothesToSet.masksTextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 2750315038012726912L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(11),
- InputArgument.op_Implicit(clothesToSet.auxilaryPartsId),
- InputArgument.op_Implicit(clothesToSet.auxilaryPartsTextureId),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) -7838678542154536097L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(clothesToSet.hatId),
- InputArgument.op_Implicit(clothesToSet.hatTextureId),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) -7838678542154536097L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(clothesToSet.glassesId),
- InputArgument.op_Implicit(clothesToSet.glassesTextureId),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) -7838678542154536097L, new InputArgument[5]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(2),
- InputArgument.op_Implicit(clothesToSet.earsId),
- InputArgument.op_Implicit(clothesToSet.earsTextureId),
- InputArgument.op_Implicit(true)
- });
- }
- public static bool DoClothesMatch(Clothes clothes)
- {
- bool flag = false;
- if (Utilities.GetCurrentClothes() != clothes)
- flag = false;
- if (Utilities.GetCurrentClothes() == clothes)
- flag = true;
- return flag;
- }
- public static bool DoesINIHaveSection(string filePath, string section)
- {
- bool flag = false;
- IniFile iniFile = new IniFile();
- iniFile.Load(filePath);
- if (iniFile != null)
- flag = iniFile.Sections.Contains(section);
- return flag;
- }
- public static string GetCurrentCharacterName()
- {
- string str = "";
- if (Model.op_Equality(((Entity) Game.get_Player().get_Character()).get_Model(), Model.op_Implicit((PedHash) 225514697)))
- str = "Michael";
- if (Model.op_Equality(((Entity) Game.get_Player().get_Character()).get_Model(), Model.op_Implicit((PedHash) -1686040670)))
- str = "Trevor";
- if (Model.op_Equality(((Entity) Game.get_Player().get_Character()).get_Model(), Model.op_Implicit((PedHash) -1692214353)))
- str = "Franklin";
- return str;
- }
- public static string GetValueFromIni(string path, string key)
- {
- string empty = string.Empty;
- IniFile iniFile = new IniFile();
- iniFile.Load(path);
- if (iniFile != null)
- {
- if (iniFile.Sections.Count > 0)
- {
- foreach (IniSection section in (IniItemCollection<IniSection>) iniFile.Sections)
- {
- if (section.Keys.Contains(key))
- empty = section.Keys[key].Value;
- else
- LogWriter.WriteToLog("Key was not found in -> " + path, true, Utilities.@this, (Exception) null);
- }
- }
- }
- else
- LogWriter.WriteToLog("Could not load value from -> " + path, true, Utilities.@this, (Exception) null);
- return empty;
- }
- public static int GetWeaponCount(Ped ped)
- {
- int num = 0;
- foreach (WeaponHash weaponHash in Enum.GetValues(typeof (WeaponHash)))
- {
- if (Function.Call<bool>((Hash) -8220001501650343748L, new InputArgument[3]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(weaponHash.GetHashCode()),
- InputArgument.op_Implicit(false)
- }) != null && weaponHash != -1569615261)
- ++num;
- }
- return num;
- }
- public static int GetBigWeaponCount(Ped ped)
- {
- int num = 0;
- foreach (Utilities.BigWeapons bigWeapons in Enum.GetValues(typeof (Utilities.BigWeapons)))
- {
- if (Function.Call<bool>((Hash) -8220001501650343748L, new InputArgument[3]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(bigWeapons.GetHashCode()),
- InputArgument.op_Implicit(false)
- }) != null)
- ++num;
- }
- return num;
- }
- public static int GetSmallWeaponCount(Ped ped)
- {
- int num = 0;
- foreach (Utilities.SmallWeapons smallWeapons in Enum.GetValues(typeof (Utilities.SmallWeapons)))
- {
- if (Function.Call<bool>((Hash) -8220001501650343748L, new InputArgument[3]
- {
- InputArgument.op_Implicit(((Entity) ped).get_Handle()),
- InputArgument.op_Implicit(smallWeapons.GetHashCode()),
- InputArgument.op_Implicit(false)
- }) != null)
- ++num;
- }
- return num;
- }
- private enum BigWeapons : uint
- {
- SniperRifle = 100416529, // 0x05FC3C11
- FireExtinguisher = 101631238, // 0x060EC506
- CombatPDW = 171789620, // 0x0A3D4D34
- HeavySniper = 205991906, // 0x0C472FE2
- PumpShotgun = 487013001, // 0x1D073A89
- HeavyShotgun = 984333226, // 0x3AABBBAA
- Minigun = 1119849093, // 0x42BF8A85
- GrenadeLauncherSmoke = 1305664598, // 0x4DD2DC56
- Gusenberg = 1627465347, // 0x61012683
- CompactRifle = 1649403952, // 0x624FE830
- HomingLauncher = 1672152130, // 0x63AB0442
- Railgun = 1834241177, // 0x6D544C99
- SawnOffShotgun = 2017895192, // 0x7846A318
- BullpupRifle = 2132975508, // 0x7F229F94
- Firework = 2138347493, // 0x7F7497E5
- CombatMG = 2144741730, // 0x7FD62962
- CarbineRifle = 2210333304, // 0x83BF0278
- MG = 2634544996, // 0x9D07F764
- BullpupShotgun = 2640438543, // 0x9D61E50F
- GrenadeLauncher = 2726580491, // 0xA284510B
- Musket = 2828843422, // 0xA89CB99E
- AdvancedRifle = 2937143193, // 0xAF113F99
- RPG = 2982836145, // 0xB1CA77B1
- AssaultRifle = 3220176749, // 0xBFEFFF6D
- SpecialCarbine = 3231910285, // 0xC0A3098D
- MarksmanRifle = 3342088282, // 0xC734385A
- AssaultShotgun = 3800352039, // 0xE284C527
- DoubleBarrelShotgun = 4019527611, // 0xEF951FBB
- AssaultSMG = 4024951519, // 0xEFE7E2DF
- }
- private enum SmallWeapons : uint
- {
- VintagePistol = 137902532, // 0x083839C4
- MicroSMG = 324215364, // 0x13532244
- Pistol = 453432689, // 0x1B06D571
- APPistol = 584646201, // 0x22D8FE39
- SMG = 736523883, // 0x2BE6766B
- StunGun = 911657153, // 0x3656C8C1
- FlareGun = 1198879012, // 0x47757124
- CombatPistol = 1593441988, // 0x5EF9FEC4
- Pistol50 = 2578377531, // 0x99AEEB3B
- SNSPistol = 3218215474, // 0xBFD21232
- Revolver = 3249783761, // 0xC1B3C3D1
- HeavyPistol = 3523564046, // 0xD205520E
- MachinePistol = 3675956304, // 0xDB1AA450
- MarksmanPistol = 3696079510, // 0xDC4DB296
- }
- }
- }
- //End of part 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement