Guest User

GTA V: Hunk's Expansion edited

a guest
Feb 8th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 488.79 KB | None | 0 0
  1.  
  2. using GTA;
  3. using GTA.Math;
  4. using GTA.Native;
  5. using iFruitAddon2;
  6. using NativeUI;
  7. using NAudio.Wave;
  8. using System;
  9. using System.Collections.Generic;
  10. using System.Drawing;
  11. using System.Globalization;
  12. using System.IO;
  13. using System.Linq;
  14. using System.Xml.Linq;
  15.  
  16. namespace GTAExpansion
  17. {
  18.     public class GTAExpansion : Script
  19.     {
  20.         private ScriptSettings config = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini");
  21.         private bool showHints = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("SETTINGS", "HINT_TOGGLE ", true);
  22.         private int main_menu_btn_on_foot = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("SETTINGS", "MAIN_MENU_BTN_ON_FOOT", 36);
  23.         private int main_menu_btn_in_vehicle = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("SETTINGS", "MAIN_MENU_BTN_IN_VEHICLE", 73);
  24.         private int main_menu_btn = 36;
  25.         private int GameTimeRef = 0;
  26.         private bool loaded = false;
  27.         private bool MaskIsOn = false;
  28.         private bool followCamera = false;
  29.         private Camera follow_camera = (Camera)null;
  30.         private int followCameraTimer = 0;
  31.         private int camTimer = 0;
  32.         private bool buyBag = false;
  33.         private bool buyHolster = false;
  34.         private bool buySupplies = false;
  35.         private int sellerAvailableItems = 0;
  36.         private System.Random rnd = new System.Random();
  37.         private int holster_toggle_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "TOGGLE_HOLSTER_BTN", 37);
  38.         private int intimidate_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "INTIMIDATE_BTN", 24);
  39.         private bool useHipHolster = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("HOLSTER_SETTINGS", "USE_HIP_HOLSTER", false);
  40.         private bool drawHolsterIcon = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("HOLSTER_SETTINGS", "ICON_DRAW", false);
  41.         private int holsterIconX = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "X", 195);
  42.         private int holsterIconY = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "Y", 620);
  43.         private int holsterIconW = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "Width", 82);
  44.         private int holsterIconH = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "Height", 85);
  45.         private bool customHolsterAnim = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("HOLSTER_SETTINGS", "CUSTOM_HOLSTER_ANIMATION", false);
  46.         private bool holsterSet = false;
  47.         private bool check = false;
  48.         private bool goodToGo = false;
  49.         private Model choosenPistol = (Model)Function.Call<int>(Hash._0x0A6DB4965674D243, (InputArgument)Game.Player.Character);
  50.         private Model prevPistol = (Model)Function.Call<int>(Hash._0x0A6DB4965674D243, (InputArgument)Game.Player.Character);
  51.         private bool weaponPistol = false;
  52.         private int holsterTimerCounterLong = 0;
  53.         private int holsterTimerCounterShort = 0;
  54.         private bool intimidation = false;
  55.         private bool hasHolster = false;
  56.         private int mask_toggle_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("OUTFIT_COMPONENTS_SETTINGS", "MASK_TOGGLE_BTN", 249);
  57.         private int gloves_toggle_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("OUTFIT_COMPONENTS_SETTINGS", "GLOVES_TOGGLE_BTN", 249);
  58.         private int glasses_toggle_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("OUTFIT_COMPONENTS_SETTINGS", "GLASSES_TOGGLE_BTN", 249);
  59.         private bool mask0 = false;
  60.         private bool mask1 = false;
  61.         private bool mask2 = false;
  62.         private bool mask3 = false;
  63.         private bool mask4 = false;
  64.         private bool gloves0 = false;
  65.         private bool gloves1 = false;
  66.         private bool gloves2 = false;
  67.         private bool gloves3 = false;
  68.         private bool gloves4 = false;
  69.         private bool glasses0 = false;
  70.         private bool glasses1 = false;
  71.         private bool glasses2 = false;
  72.         private bool glasses3 = false;
  73.         private bool glasses4 = false;
  74.         private int maskTimeCounter = 0;
  75.         private int earphone_toggle_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("EAR_RADIO_SETTINGS", "EARPHONE_TOGGLE_KEY", 249);
  76.         private int readio_off_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("EAR_RADIO_SETTINGS", "TURN_OFF_RADIO", 174);
  77.         private int prevStation = (int)byte.MaxValue;
  78.         private int earRadioTimer = 0;
  79.         private int wallet_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("WALLET_SETTINGS", "WALLET_CHECK_BTN", 157);
  80.         private bool inProcessWallet = false;
  81.         private bool walletCount = false;
  82.         private float animSpeed = 0.0f;
  83.         private int bag_menu_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("DUFFLEBAG_SETTINGS", "BAG_MENU_BTN", 45);
  84.         private bool drawStrap = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("DUFFLEBAG_SETTINGS", "DRAW_STRAP", true);
  85.         private float xd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_default", 0.21f);
  86.         private float yd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_default", -0.3f);
  87.         private float zd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_default", -0.2f);
  88.         private float xrd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_rot_default", 45.8999f);
  89.         private float yrd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_rot_default", 84.6992f);
  90.         private float zrd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_rot_default", 114.1992f);
  91.         private float xsdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_sky_diving_gear", -0.45f);
  92.         private float ysdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_sky_diving_gear", -0.05f);
  93.         private float zsdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_sky_diving_gear", -0.45f);
  94.         private float xrsdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_rot_sky_diving_gear", 0.0f);
  95.         private float yrsdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_rot_sky_diving_gear", 40f);
  96.         private float zrsdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_rot_sky_diving_gear", -45f);
  97.         private float xdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_diving_gear", -0.1f);
  98.         private float ydg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_diving_gear", -0.35f);
  99.         private float zdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_diving_gear", -0.07f);
  100.         private float xrdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_rot_diving_gear", 25f);
  101.         private float yrdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_rot_diving_gear", 25f);
  102.         private float zrdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_rot_diving_gear", 0.0f);
  103.         private string bagModel = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<string>("DUFFLEBAG_SETTINGS", "BAG", "p_ld_heist_bag_s_pro_o");
  104.         private string bagModelFull = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<string>("DUFFLEBAG_SETTINGS", "BAG_FULL", "p_ld_heist_bag_s_pro");
  105.         private string stashedBagModel = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<string>("DUFFLEBAG_SETTINGS", "BAG_STASHED", "p_ld_heist_bag_s_pro2_s");
  106.         private XDocument doc = XDocument.Load("scripts\\Expansion\\WeaponStash.xml");
  107.         private PedHash[] allPedHashes = (PedHash[])Enum.GetValues(typeof(PedHash));
  108.         private WeaponHash[] allWeaponHashes = (WeaponHash[])Enum.GetValues(typeof(WeaponHash));
  109.         private WeaponComponent[] allComponentsHashes = (WeaponComponent[])Enum.GetValues(typeof(WeaponComponent));
  110.         private WeaponTint[] allTintHashes = (WeaponTint[])Enum.GetValues(typeof(WeaponTint));
  111.         private bool skyDiving = false;
  112.         private bool wearingGear = false;
  113.         private bool changedPosition = false;
  114.         private bool bagPickUp = false;
  115.         private bool notifed = false;
  116.         private bool canTakeBagFromVehicle = false;
  117.         private bool canPutOnBagOnExit = false;
  118.         private BlipSprite sellerBlip = BlipSprite.Information;
  119.         private int TotalPrice = 0;
  120.         private int BagPrice = 100;
  121.         private int HolsterPrice = 50;
  122.         private int SupplyPrice = 25;
  123.         private bool greeting = false;
  124.         private bool greetingFinished = false;
  125.         private bool deal = false;
  126.         private bool payed = false;
  127.         private int timeOut = 0;
  128.         private bool inProcessBag = false;
  129.         private bool canceled = false;
  130.         private bool findSellerOption = false;
  131.         private int DufflebagTimeCounter = 0;
  132.         private int sellerDialogCounter = 6;
  133.         private Prop cur_bag = (Prop)null;
  134.         private bool hasBag = false;
  135.         private bool isBagBought = false;
  136.         private bool isBagDropped = false;
  137.         private bool extraEffects = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("CIGS_AND_PILLS_SETTINGS", "EXTRA_EFFECTS", false);
  138.         private bool screenFX = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("CIGS_AND_PILLS_SETTINGS", "SCREEN_EFFECT", true);
  139.         private bool hintShow = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("CIGS_AND_PILLS_SETTINGS", "SHOW_HINTS", true);
  140.         private int swallowBTN = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "PILLS_SWALLOW_BTN", 51);
  141.         private int maxPills = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "MAX_PILLS", 25);
  142.         private int extraFXDuration = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "EFFECTS_DURATION", 1000);
  143.         private bool cigsAndPillsCountDown = false;
  144.         private int cigsAndPillsCounter = 15;
  145.         private int pillsCount = 10;
  146.         private bool blockKeys = false;
  147.         private int cigsCount = 10;
  148.         private int smokeBTN = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "SMOKE_TOGGLE_BTN", 44);
  149.         private int maxCigs = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "MAX_CIGS", 25);
  150.         private int max_cig_durability = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "MAX_CIG_DURABILITY", 25);
  151.         private int cig_durability = 0;
  152.         private string smokeType = "prop_amb_ciggy_01";
  153.         private bool playCigAndSmokeAnim = true;
  154.         private bool flame = false;
  155.         private int smoke = -1;
  156.         private bool smoking = false;
  157.         private bool startSmoke = true;
  158.         private bool play_swallow_pills_anim = false;
  159.         private string medbagObject = "prop_ld_health_pack";
  160.         private bool canRefill = false;
  161.         private bool inProcessCigsAndPills = false;
  162.         private bool extraEffectsStat = false;
  163.         private int extraEffectsTimer = 0;
  164.         private float slowMoScale = 0.0f;
  165.         private Prop pillsJar = (Prop)null;
  166.         private bool inMenu = false;
  167.         private List<WeaponHash> stashedWeapons = new List<WeaponHash>();
  168.         private List<WeaponHash> characterWeapons = new List<WeaponHash>();
  169.         private List<object> mainMenuListString = new List<object>();
  170.         private Color btnColor1 = Color.Transparent;
  171.         private Color btnColor2 = Color.GhostWhite;
  172.         private Color btnTextColor1 = Color.White;
  173.         private Color btnTextColor2 = Color.Black;
  174.         private Entity CamObject;
  175.         private WaveFileReader WavereaderDown;
  176.         private WaveChannel32 wavechanDown;
  177.         private DirectSoundOut DSODown;
  178.         private float volumeDown;
  179.         private Prop holster;
  180.         private Ped player;
  181.         private Ped prevPlayer;
  182.         private Prop HolstedPistolPrev;
  183.         private Prop HolstedPistol;
  184.         private int worldPistolModel;
  185.         private Prop[] holsterProp;
  186.         private Ped[] closestPeds;
  187.         private Ped target;
  188.         private bool headset;
  189.         private Prop wallet;
  190.         private Prop walletOpened;
  191.         private uint prevWeapon;
  192.         private Ped seller;
  193.         private Prop cig;
  194.         private Prop medbag;
  195.         private CustomiFruit _iFruit;
  196.         private iFruitContact callContact;
  197.         private MenuPool modMenuPool;
  198.         private UIMenu mainMenu;
  199.  
  200.         private void update_inventory_status(Ped ped)
  201.         {
  202.             this.cur_bag = this.bagModelReturn(ped);
  203.             this.hasBag = this.doesPedWearingBag(ped);
  204.             this.hasHolster = this.doesPedHasHolster(ped);
  205.             this.isBagBought = this.doesPedHasInventoryBag(ped);
  206.             this.isBagDropped = this.DoesDroppedBagExist(ped);
  207.         }
  208.  
  209.         private bool isOccupied(Ped ped)
  210.         {
  211.             int num;
  212.             if (!Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) && ped.IsVisible)
  213.             {
  214.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_fall", (InputArgument)3))
  215.                 {
  216.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_idle", (InputArgument)3))
  217.                     {
  218.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_a", (InputArgument)3))
  219.                         {
  220.                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_b", (InputArgument)3))
  221.                             {
  222.                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_c", (InputArgument)3))
  223.                                 {
  224.                                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_d", (InputArgument)3))
  225.                                     {
  226.                                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
  227.                                         {
  228.                                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter", (InputArgument)3))
  229.                                             {
  230.                                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@exit", (InputArgument)"exit", (InputArgument)3))
  231.                                                 {
  232.                                                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  233.                                                     {
  234.                                                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3))
  235.                                                         {
  236.                                                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  237.                                                             {
  238.                                                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3))
  239.                                                                 {
  240.                                                                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
  241.                                                                     {
  242.                                                                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  243.                                                                         {
  244.                                                                             if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
  245.                                                                             {
  246.                                                                                 if (!Function.Call<bool>(Hash._0x3998B1276A3300E5, (InputArgument)Game.Player.Character) && !Game.Player.Character.IsGoingIntoCover && !Game.Player.Character.IsInCover())
  247.                                                                                 {
  248.                                                                                     if (!Function.Call<bool>(Hash._0xBB062B2B5722478E, (InputArgument)Game.Player.Character) && !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) && (!Game.Player.Character.IsInWater && !Game.Player.Character.IsJumping) && (!Game.Player.Character.IsOnFire && !Game.Player.Character.IsFalling && !Game.Player.Character.IsDiving))
  249.                                                                                     {
  250.                                                                                         if (!Function.Call<bool>(Hash._0xE3B6097CC25AA69E, (InputArgument)ped))
  251.                                                                                         {
  252.                                                                                             num = !Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player) ? 1 : 0;
  253.                                                                                             goto label_22;
  254.                                                                                         }
  255.                                                                                     }
  256.                                                                                 }
  257.                                                                             }
  258.                                                                         }
  259.                                                                     }
  260.                                                                 }
  261.                                                             }
  262.                                                         }
  263.                                                     }
  264.                                                 }
  265.                                             }
  266.                                         }
  267.                                     }
  268.                                 }
  269.                             }
  270.                         }
  271.                     }
  272.                 }
  273.             }
  274.             num = 0;
  275.         label_22:
  276.             return num == 0;
  277.         }
  278.  
  279.         private void followCameraCreateFunc(Ped ped, Entity follow_object)
  280.         {
  281.             ++this.camTimer;
  282.             if (this.camTimer >= 150)
  283.             {
  284.                 this.camTimer = 0;
  285.                 this.followCamera = false;
  286.             }
  287.             if (!Game.Player.Character.IsSittingInVehicle())
  288.             {
  289.                 if (Function.Call<int>(Hash._0x8D4D46230B2C353A, Array.Empty<InputArgument>()) != 4)
  290.                 {
  291.                     if (this.follow_camera == (Camera)null)
  292.                     {
  293.                         this.follow_camera = World.CreateCamera(GameplayCamera.Position, Vector3.Zero, GameplayCamera.FieldOfView);
  294.                         World.RenderingCamera = this.follow_camera;
  295.                         if (!(follow_object != (Entity)null) || !follow_object.Exists())
  296.                             return;
  297.                         this.follow_camera.PointAt(follow_object);
  298.                     }
  299.                     else
  300.                     {
  301.                         if (World.RenderingCamera != this.follow_camera)
  302.                             World.RenderingCamera = this.follow_camera;
  303.                         if (follow_object != (Entity)null && follow_object.Exists())
  304.                             this.follow_camera.PointAt(follow_object);
  305.                         this.follow_camera.Position = GameplayCamera.Position;
  306.                         this.follow_camera.Rotation = GameplayCamera.Rotation;
  307.                         if (this.followCameraTimer < 300 && this.followCameraTimer < 100)
  308.                         {
  309.                             ++this.followCameraTimer;
  310.                             if ((double)this.follow_camera.FieldOfView > (double)GameplayCamera.FieldOfView - 3.0)
  311.                                 this.follow_camera.FieldOfView -= 0.1f;
  312.                         }
  313.                     }
  314.                 }
  315.                 else if (this.follow_camera != (Camera)null && this.follow_camera.Exists())
  316.                 {
  317.                     if (World.RenderingCamera == this.follow_camera)
  318.                         World.RenderingCamera = (Camera)null;
  319.                     this.follow_camera.Destroy();
  320.                     this.follow_camera = (Camera)null;
  321.                 }
  322.             }
  323.             else if (this.follow_camera == (Camera)null)
  324.             {
  325.                 this.follow_camera = World.CreateCamera(GameplayCamera.Position, Vector3.Zero, GameplayCamera.FieldOfView);
  326.                 World.RenderingCamera = this.follow_camera;
  327.                 if (follow_object != (Entity)null && follow_object.Exists())
  328.                     this.follow_camera.PointAt(follow_object);
  329.             }
  330.             else
  331.             {
  332.                 if (World.RenderingCamera != this.follow_camera)
  333.                     World.RenderingCamera = this.follow_camera;
  334.                 if (follow_object != (Entity)null && follow_object.Exists())
  335.                     this.follow_camera.PointAt(follow_object);
  336.                 this.follow_camera.Position = GameplayCamera.Position;
  337.                 this.follow_camera.Rotation = GameplayCamera.Rotation;
  338.                 if (this.followCameraTimer < 300 && this.followCameraTimer < 100)
  339.                 {
  340.                     ++this.followCameraTimer;
  341.                     if ((double)this.follow_camera.FieldOfView > (double)GameplayCamera.FieldOfView - 3.0)
  342.                         this.follow_camera.FieldOfView -= 0.1f;
  343.                 }
  344.             }
  345.         }
  346.  
  347.         private void followCameraDeleteFunc(Ped ped, Entity follow_obje)
  348.         {
  349.             if (!(this.follow_camera != (Camera)null) || !this.follow_camera.Exists())
  350.                 return;
  351.             this.follow_camera.Position = GameplayCamera.Position;
  352.             this.follow_camera.Rotation = GameplayCamera.Rotation;
  353.             if (this.followCameraTimer > 0)
  354.             {
  355.                 --this.followCameraTimer;
  356.                 if ((double)this.follow_camera.FieldOfView != (double)GameplayCamera.FieldOfView)
  357.                 {
  358.                     if ((double)this.follow_camera.FieldOfView > (double)GameplayCamera.FieldOfView)
  359.                         this.follow_camera.FieldOfView -= 0.1f;
  360.                     else
  361.                         this.follow_camera.FieldOfView += 0.1f;
  362.                 }
  363.                 else
  364.                 {
  365.                     if (World.RenderingCamera == this.follow_camera)
  366.                         World.RenderingCamera = (Camera)null;
  367.                     this.follow_camera.Destroy();
  368.                     this.follow_camera = (Camera)null;
  369.                 }
  370.             }
  371.             else
  372.             {
  373.                 if (World.RenderingCamera == this.follow_camera)
  374.                     World.RenderingCamera = (Camera)null;
  375.                 this.follow_camera.Destroy();
  376.                 this.follow_camera = (Camera)null;
  377.             }
  378.         }
  379.  
  380.         private void checkMask(Ped ped)
  381.         {
  382.             if (ped.Model.Hash == this.GetHashKey("PLAYER_ZERO"))
  383.             {
  384.                 int num;
  385.                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 7)
  386.                 {
  387.                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 9)
  388.                     {
  389.                         if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 14)
  390.                         {
  391.                             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 21)
  392.                             {
  393.                                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 23)
  394.                                 {
  395.                                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9) != 8)
  396.                                     {
  397.                                         if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 2)
  398.                                         {
  399.                                             if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 14)
  400.                                             {
  401.                                                 if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 15)
  402.                                                 {
  403.                                                     if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 16)
  404.                                                     {
  405.                                                         if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 17)
  406.                                                         {
  407.                                                             if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 18)
  408.                                                             {
  409.                                                                 if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 19)
  410.                                                                 {
  411.                                                                     if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 20)
  412.                                                                     {
  413.                                                                         if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 23)
  414.                                                                         {
  415.                                                                             if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 25)
  416.                                                                             {
  417.                                                                                 num = this.mask0 ? 1 : 0;
  418.                                                                                 goto label_19;
  419.                                                                             }
  420.                                                                         }
  421.                                                                     }
  422.                                                                 }
  423.                                                             }
  424.                                                         }
  425.                                                     }
  426.                                                 }
  427.                                             }
  428.                                         }
  429.                                     }
  430.                                 }
  431.                             }
  432.                         }
  433.                     }
  434.                 }
  435.                 num = 1;
  436.             label_19:
  437.                 if (num != 0)
  438.                 {
  439.                     this.MaskIsOn = true;
  440.                     if (this.smoke != -1 && (uint)this.smoke > 0U)
  441.                         this.stopSmokingFunc(ped);
  442.                 }
  443.                 else
  444.                     this.MaskIsOn = false;
  445.             }
  446.             Model model = ped.Model;
  447.             if (model.Hash == this.GetHashKey("PLAYER_ONE"))
  448.             {
  449.                 int num;
  450.                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 4)
  451.                 {
  452.                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 5)
  453.                     {
  454.                         if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 8)
  455.                         {
  456.                             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 9)
  457.                             {
  458.                                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 18)
  459.                                 {
  460.                                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9) != 4)
  461.                                     {
  462.                                         if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)2) != 5)
  463.                                         {
  464.                                             if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 1)
  465.                                             {
  466.                                                 if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 6)
  467.                                                 {
  468.                                                     if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 8)
  469.                                                     {
  470.                                                         if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 9)
  471.                                                         {
  472.                                                             if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 10)
  473.                                                             {
  474.                                                                 if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 13)
  475.                                                                 {
  476.                                                                     if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 14)
  477.                                                                     {
  478.                                                                         num = this.mask1 ? 1 : 0;
  479.                                                                         goto label_41;
  480.                                                                     }
  481.                                                                 }
  482.                                                             }
  483.                                                         }
  484.                                                     }
  485.                                                 }
  486.                                             }
  487.                                         }
  488.                                     }
  489.                                 }
  490.                             }
  491.                         }
  492.                     }
  493.                 }
  494.                 num = 1;
  495.             label_41:
  496.                 if (num != 0)
  497.                 {
  498.                     this.MaskIsOn = true;
  499.                     if (this.smoke != -1 && (uint)this.smoke > 0U)
  500.                         this.stopSmokingFunc(ped);
  501.                 }
  502.                 else
  503.                     this.MaskIsOn = false;
  504.             }
  505.             model = ped.Model;
  506.             if (model.Hash != this.GetHashKey("PLAYER_TWO"))
  507.                 return;
  508.             int num1;
  509.             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 1)
  510.             {
  511.                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 6)
  512.                 {
  513.                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 10)
  514.                     {
  515.                         if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 13)
  516.                         {
  517.                             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 15)
  518.                             {
  519.                                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9) != 5)
  520.                                 {
  521.                                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9) != 6)
  522.                                     {
  523.                                         if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9) != 7)
  524.                                         {
  525.                                             if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 2)
  526.                                             {
  527.                                                 if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 14)
  528.                                                 {
  529.                                                     if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 15)
  530.                                                     {
  531.                                                         if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 16)
  532.                                                         {
  533.                                                             if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 17)
  534.                                                             {
  535.                                                                 if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 18)
  536.                                                                 {
  537.                                                                     if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 19)
  538.                                                                     {
  539.                                                                         if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 20)
  540.                                                                         {
  541.                                                                             if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 23)
  542.                                                                             {
  543.                                                                                 if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 25)
  544.                                                                                 {
  545.                                                                                     num1 = this.mask2 ? 1 : 0;
  546.                                                                                     goto label_67;
  547.                                                                                 }
  548.                                                                             }
  549.                                                                         }
  550.                                                                     }
  551.                                                                 }
  552.                                                             }
  553.                                                         }
  554.                                                     }
  555.                                                 }
  556.                                             }
  557.                                         }
  558.                                     }
  559.                                 }
  560.                             }
  561.                         }
  562.                     }
  563.                 }
  564.             }
  565.             num1 = 1;
  566.         label_67:
  567.             if (num1 != 0)
  568.             {
  569.                 this.MaskIsOn = true;
  570.                 if (this.smoke != -1 && (uint)this.smoke > 0U)
  571.                     this.stopSmokingFunc(ped);
  572.             }
  573.             else
  574.                 this.MaskIsOn = false;
  575.         }
  576.  
  577.         private void AnimPlayFunc(
  578.           Ped ped,
  579.           float actionPoint,
  580.           float stopPoint,
  581.           string animDict,
  582.           string animName,
  583.           float animSpeed,
  584.           int animFlags,
  585.           Action Action)
  586.         {
  587.             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName, (InputArgument)3))
  588.             {
  589.                 if (animFlags == 1)
  590.                     ped.Task.PlayAnimation(animDict, animName, animSpeed, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  591.                 if (animFlags == 2)
  592.                     ped.Task.PlayAnimation(animDict, animName, animSpeed, -1, AnimationFlags.StayInEndFrame | AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  593.                 if (animFlags == 3)
  594.                     ped.Task.PlayAnimation(animDict, animName, animSpeed, -1, AnimationFlags.AllowRotation);
  595.                 if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) != (double)actionPoint)
  596.                     return;
  597.                 Action();
  598.             }
  599.             else if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) > (double)stopPoint)
  600.                 Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)animName, (InputArgument)animDict, (InputArgument)3f);
  601.         }
  602.  
  603.         private void DisableControlsFunc(bool block_movements)
  604.         {
  605.             Game.DisableControlThisFrame(2, Control.NextCamera);
  606.             if (block_movements)
  607.             {
  608.                 Game.DisableControlThisFrame(2, Control.MoveLeft);
  609.                 Game.DisableControlThisFrame(2, Control.MoveLeftOnly);
  610.                 Game.DisableControlThisFrame(2, Control.MoveRight);
  611.                 Game.DisableControlThisFrame(2, Control.MoveRightOnly);
  612.                 Game.DisableControlThisFrame(2, Control.MoveUp);
  613.                 Game.DisableControlThisFrame(2, Control.MoveUpOnly);
  614.                 Game.DisableControlThisFrame(2, Control.MoveDown);
  615.                 Game.DisableControlThisFrame(2, Control.MoveDownOnly);
  616.                 Game.DisableControlThisFrame(2, Control.ScriptPadLeft);
  617.                 Game.DisableControlThisFrame(2, Control.ScriptPadRight);
  618.                 Game.DisableControlThisFrame(2, Control.ScriptPadUp);
  619.                 Game.DisableControlThisFrame(2, Control.ScriptPadDown);
  620.                 Game.DisableControlThisFrame(2, Control.VehicleMoveLeft);
  621.                 Game.DisableControlThisFrame(2, Control.VehicleMoveRight);
  622.                 Game.DisableControlThisFrame(2, Control.VehicleMoveLeft);
  623.                 Game.DisableControlThisFrame(2, Control.VehicleMoveRightOnly);
  624.                 Game.DisableControlThisFrame(2, Control.VehicleMoveLeftOnly);
  625.                 Game.DisableControlThisFrame(2, Control.VehicleMoveLeftRight);
  626.             }
  627.             Game.DisableControlThisFrame(2, Control.VehicleCinCam);
  628.             Game.DisableControlThisFrame(2, Control.VehicleNextRadio);
  629.             Game.DisableControlThisFrame(2, Control.VehiclePrevRadio);
  630.             Game.DisableControlThisFrame(2, Control.VehicleHeadlight);
  631.             Game.DisableControlThisFrame(2, Control.VehicleHorn);
  632.             Game.DisableControlThisFrame(2, Control.VehicleHandbrake);
  633.             Game.DisableControlThisFrame(2, Control.VehicleExit);
  634.             Game.DisableControlThisFrame(2, Control.SelectWeapon);
  635.             Game.DisableControlThisFrame(2, Control.Phone);
  636.             Game.DisableControlThisFrame(2, Control.PhoneCameraDOF);
  637.             Game.DisableControlThisFrame(2, Control.PhoneCameraExpression);
  638.             Game.DisableControlThisFrame(2, Control.PhoneCameraFocusLock);
  639.             Game.DisableControlThisFrame(2, Control.PhoneCameraGrid);
  640.             Game.DisableControlThisFrame(2, Control.PhoneCameraSelfie);
  641.             Game.DisableControlThisFrame(2, Control.PhoneCancel);
  642.             Game.DisableControlThisFrame(2, Control.PhoneDown);
  643.             Game.DisableControlThisFrame(2, Control.PhoneLeft);
  644.             Game.DisableControlThisFrame(2, Control.PhoneRight);
  645.             Game.DisableControlThisFrame(2, Control.PhoneUp);
  646.             Game.DisableControlThisFrame(2, Control.PhoneOption);
  647.             Game.DisableControlThisFrame(2, Control.PhoneExtraOption);
  648.             Game.DisableControlThisFrame(2, Control.PhoneSelect);
  649.             Game.DisableControlThisFrame(2, Control.Aim);
  650.             Game.DisableControlThisFrame(2, Control.Attack);
  651.             Game.DisableControlThisFrame(2, Control.Attack2);
  652.             Game.DisableControlThisFrame(2, Control.Sprint);
  653.             Game.DisableControlThisFrame(2, Control.Reload);
  654.             Game.DisableControlThisFrame(2, Control.Phone);
  655.             Game.DisableControlThisFrame(2, Control.Jump);
  656.             Game.DisableControlThisFrame(2, Control.VehicleCarJump);
  657.             Game.DisableControlThisFrame(2, Control.RappelJump);
  658.             Game.DisableControlThisFrame(2, Control.RappelLongJump);
  659.             Game.DisableControlThisFrame(2, Control.VehicleJump);
  660.             Game.DisableControlThisFrame(2, Control.Cover);
  661.             Game.DisableControlThisFrame(2, Control.MeleeAttack1);
  662.             Game.DisableControlThisFrame(2, Control.MeleeAttack2);
  663.             Game.DisableControlThisFrame(2, Control.MeleeAttackAlternate);
  664.             Game.DisableControlThisFrame(2, Control.MeleeAttackHeavy);
  665.             Game.DisableControlThisFrame(2, Control.MeleeAttackLight);
  666.             Game.DisableControlThisFrame(2, Control.Context);
  667.             Game.DisableControlThisFrame(2, Control.ContextSecondary);
  668.             Game.DisableControlThisFrame(2, Control.AccurateAim);
  669.             Game.DisableControlThisFrame(2, Control.Duck);
  670.             Game.DisableControlThisFrame(2, Control.Enter);
  671.             Game.DisableControlThisFrame(2, Control.VehicleAccelerate);
  672.         }
  673.  
  674.         private void Notify(string text, string subject, int r, int g, int b, string icon)
  675.         {
  676.             Function.Call(Hash._0x202709F4C58A0424, (InputArgument)"STRING");
  677.             Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)"");
  678.             Function.Call(Hash._0x17430B918701C342, (InputArgument)r, (InputArgument)g, (InputArgument)b, (InputArgument)200);
  679.             Function.Call(Hash._0x531B84E7DA981FB6, (InputArgument)icon, (InputArgument)icon, (InputArgument)true, (InputArgument)7, (InputArgument)text, (InputArgument)subject, (InputArgument)1f, (InputArgument)"", (InputArgument)4);
  680.             Function.Call(Hash._0x2ED7843F8F801023, (InputArgument)true, (InputArgument)true);
  681.             Function.Call(Hash._0x67C540AA08E4A6F5, (InputArgument)(-1), (InputArgument)"OTHER_TEXT", (InputArgument)"HUD_AWARDS");
  682.         }
  683.  
  684.         public void Draw(
  685.           int mode,
  686.           bool hasBag,
  687.           bool bagInCar,
  688.           bool hasHolster,
  689.           bool isBagBought,
  690.           bool bagIsDropped)
  691.         {
  692.             Scaleform scaleform = new Scaleform("instructional_buttons");
  693.             scaleform.CallFunction("CLEAR_ALL");
  694.             scaleform.CallFunction("TOGGLE_MOUSE_BUTTONS", (object)0);
  695.             scaleform.CallFunction("CREATE_CONTAINER");
  696.             if (mode == 1)
  697.                 scaleform.CallFunction("SET_DATA_SLOT", (object)1, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)51), (object)"Grab bag");
  698.             if (mode == 2)
  699.             {
  700.                 scaleform.CallFunction("SET_DATA_SLOT", (object)1, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)176), (object)"Find closest Dealer");
  701.                 if (this.isBagDropped)
  702.                     scaleform.CallFunction("SET_DATA_SLOT", (object)3, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)0), (object)"Mark Stashed Bag");
  703.                 scaleform.CallFunction("SET_DATA_SLOT", (object)2, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)177), (object)"Cancel");
  704.             }
  705.             if (mode == 3)
  706.             {
  707.                 if (!isBagBought)
  708.                 {
  709.                     if (!this.buyBag)
  710.                         scaleform.CallFunction("SET_DATA_SLOT", (object)4, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)52), (object)("Check bag (" + this.BagPrice.ToString() + " $)"));
  711.                     else
  712.                         scaleform.CallFunction("SET_DATA_SLOT", (object)4, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)52), (object)"Uncheck bag");
  713.                 }
  714.                 if (!hasHolster)
  715.                 {
  716.                     if (!this.buyHolster)
  717.                         scaleform.CallFunction("SET_DATA_SLOT", (object)5, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)73), (object)("Check holster (" + this.HolsterPrice.ToString() + " $)"));
  718.                     else
  719.                         scaleform.CallFunction("SET_DATA_SLOT", (object)5, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)73), (object)"Uncheck holster");
  720.                 }
  721.                 if (this.cigsCount < this.maxCigs || this.pillsCount < this.maxPills)
  722.                 {
  723.                     if (!this.buySupplies)
  724.                         scaleform.CallFunction("SET_DATA_SLOT", (object)2, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)0), (object)("Check supplies (" + this.SupplyPrice.ToString() + " $)"));
  725.                     else
  726.                         scaleform.CallFunction("SET_DATA_SLOT", (object)2, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)0), (object)"Uncheck supplies");
  727.                 }
  728.                 if (this.buyBag || this.buyHolster || this.buySupplies)
  729.                     scaleform.CallFunction("SET_DATA_SLOT", (object)3, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)51), (object)"Confirm");
  730.                 scaleform.CallFunction("SET_DATA_SLOT", (object)1, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)75), (object)"Cancel");
  731.             }
  732.             if (mode == 4)
  733.             {
  734.                 if (!this.intimidation)
  735.                 {
  736.                     scaleform.CallFunction("SET_DATA_SLOT", (object)1, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.smokeBTN), (object)("Smoke (" + this.cigsCount.ToString() + " cigs left)"));
  737.                     scaleform.CallFunction("SET_DATA_SLOT", (object)2, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.swallowBTN), (object)("Pills (" + this.pillsCount.ToString() + " pills left)"));
  738.                     if (!Game.Player.Character.IsSittingInVehicle())
  739.                         scaleform.CallFunction("SET_DATA_SLOT", (object)3, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)1, (InputArgument)this.wallet_btn), (object)"Wallet");
  740.                     scaleform.CallFunction("SET_DATA_SLOT", (object)4, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.earphone_toggle_btn), (object)"Earphone");
  741.                     if (this.headset)
  742.                         scaleform.CallFunction("SET_DATA_SLOT", (object)5, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)1, (InputArgument)this.readio_off_btn), (object)"Toggle Radio");
  743.                     scaleform.CallFunction("SET_DATA_SLOT", (object)6, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.mask_toggle_btn), (object)"Mask");
  744.                     scaleform.CallFunction("SET_DATA_SLOT", (object)7, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.gloves_toggle_btn), (object)"Gloves");
  745.                     scaleform.CallFunction("SET_DATA_SLOT", (object)8, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.glasses_toggle_btn), (object)"Glasses");
  746.                     if (hasHolster)
  747.                     {
  748.                         scaleform.CallFunction("SET_DATA_SLOT", (object)9, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.holster_toggle_btn), (object)"Holster");
  749.                         if ((Entity)this.holster != (Entity)null && this.holster.Exists() && !this.intimidation)
  750.                             scaleform.CallFunction("SET_DATA_SLOT", (object)10, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)1, (InputArgument)this.intimidate_btn), (object)"Start Intimidate");
  751.                     }
  752.                     if (hasBag)
  753.                         scaleform.CallFunction("SET_DATA_SLOT", (object)11, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.bag_menu_btn), (object)"Bag menu");
  754.                     else if (bagInCar)
  755.                         scaleform.CallFunction("SET_DATA_SLOT", (object)11, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.bag_menu_btn), (object)"Grab bag");
  756.                 }
  757.                 else
  758.                 {
  759.                     scaleform.CallFunction("SET_DATA_SLOT", (object)1, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)24), (object)"Start Intimidate");
  760.                     scaleform.CallFunction("SET_DATA_SLOT", (object)2, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)25), (object)"Stop Intimidate");
  761.                 }
  762.             }
  763.             scaleform.CallFunction("DRAW_INSTRUCTIONAL_BUTTONS", (object)-1);
  764.             scaleform.Render2D();
  765.         }
  766.  
  767.         private void iconDrawFunc(int x, int y, int width, int height, string icon_name)
  768.         {
  769.             if (File.Exists("scripts\\Expansion\\" + icon_name))
  770.                 UI.DrawTexture(".\\Scripts\\Expansion\\" + icon_name, 0, 1, 1500, new Point(x, y), new Size(width, height));
  771.             else
  772.                 UI.ShowSubtitle(icon_name + " was not found");
  773.         }
  774.  
  775.         private int GetHashKey(string value)
  776.         {
  777.             return Function.Call<int>(Hash._0xD24D37CC275948CC, (InputArgument)value);
  778.         }
  779.  
  780.         private void soundFX(Ped ped, string sound_fx)
  781.         {
  782.             if (File.Exists("scripts\\Expansion\\" + sound_fx))
  783.             {
  784.                 this.WavereaderDown = new WaveFileReader("scripts\\Expansion\\" + sound_fx);
  785.                 this.wavechanDown = new WaveChannel32((WaveStream)this.WavereaderDown);
  786.                 this.volumeDown = this.config.GetValue<float>("Settings", "Global Volume Down", 30f);
  787.                 this.DSODown = new DirectSoundOut();
  788.                 if (ped.IsSittingInVehicle())
  789.                 {
  790.                     if (Function.Call<int>(Hash._0xA4FF579AC0E3AAAE, Array.Empty<InputArgument>()) == 4)
  791.                     {
  792.                         this.DSODown.Init((IWaveProvider)this.wavechanDown);
  793.                         this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 10.0);
  794.                     }
  795.                     if (Function.Call<int>(Hash._0xA4FF579AC0E3AAAE, Array.Empty<InputArgument>()) != 4)
  796.                     {
  797.                         if (ped.CurrentVehicle.Model.IsCar)
  798.                         {
  799.                             float num1 = Function.Call<float>(Hash._0xFE3F9C29F7B32BD5, (InputArgument)ped.CurrentVehicle.Handle, (InputArgument)0);
  800.                             float num2 = Function.Call<float>(Hash._0xFE3F9C29F7B32BD5, (InputArgument)ped.CurrentVehicle.Handle, (InputArgument)1);
  801.                             float num3 = Function.Call<float>(Hash._0xFE3F9C29F7B32BD5, (InputArgument)ped.CurrentVehicle.Handle, (InputArgument)2);
  802.                             float num4 = Function.Call<float>(Hash._0xFE3F9C29F7B32BD5, (InputArgument)ped.CurrentVehicle.Handle, (InputArgument)3);
  803.                             this.DSODown.Init((IWaveProvider)this.wavechanDown);
  804.                             this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 10.0);
  805.                             int num5;
  806.                             if (Function.Call<bool>(Hash._0x8AC862B0B32C5B80, (InputArgument)ped.CurrentVehicle))
  807.                             {
  808.                                 if (Function.Call<bool>(Hash._0x46E571A0E20D01F1, (InputArgument)ped.CurrentVehicle, (InputArgument)0))
  809.                                 {
  810.                                     if (Function.Call<bool>(Hash._0x46E571A0E20D01F1, (InputArgument)ped.CurrentVehicle, (InputArgument)1) && (double)num1 <= 0.3 && ((double)num2 <= 0.3 && (double)num3 <= 0.3))
  811.                                     {
  812.                                         num5 = (double)num4 > 0.3 ? 1 : 0;
  813.                                         goto label_11;
  814.                                     }
  815.                                 }
  816.                             }
  817.                             num5 = 1;
  818.                         label_11:
  819.                             if (num5 != 0)
  820.                             {
  821.                                 this.DSODown.Init((IWaveProvider)this.wavechanDown);
  822.                                 this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 15.0);
  823.                             }
  824.                             int num6;
  825.                             if (Function.Call<bool>(Hash._0x8AC862B0B32C5B80, (InputArgument)ped.CurrentVehicle))
  826.                             {
  827.                                 if (Function.Call<bool>(Hash._0x46E571A0E20D01F1, (InputArgument)ped.CurrentVehicle, (InputArgument)0))
  828.                                 {
  829.                                     if (Function.Call<bool>(Hash._0x46E571A0E20D01F1, (InputArgument)ped.CurrentVehicle, (InputArgument)1) && (double)num1 < 0.1 && ((double)num2 < 0.1 && (double)num3 < 0.1))
  830.                                     {
  831.                                         num6 = (double)num4 < 0.1 ? 1 : 0;
  832.                                         goto label_18;
  833.                                     }
  834.                                 }
  835.                             }
  836.                             num6 = 0;
  837.                         label_18:
  838.                             if (num6 != 0)
  839.                             {
  840.                                 this.DSODown.Init((IWaveProvider)this.wavechanDown);
  841.                                 this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 20.0);
  842.                             }
  843.                         }
  844.                         else
  845.                         {
  846.                             this.DSODown.Init((IWaveProvider)this.wavechanDown);
  847.                             this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 15.0);
  848.                         }
  849.                     }
  850.                 }
  851.                 else
  852.                 {
  853.                     this.DSODown.Init((IWaveProvider)this.wavechanDown);
  854.                     this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 10.0);
  855.                 }
  856.                 this.DSODown.Play();
  857.                 this.DSODown.Dispose();
  858.             }
  859.             else
  860.                 UI.Notify("scripts/Expansion/ " + sound_fx + " ~r~Wasnt found", true);
  861.         }
  862.  
  863.         private void checkHolsterAfterCharacterSwitch(Ped ped)
  864.         {
  865.             Prop[] allProps = World.GetAllProps((Model)(this.useHipHolster ? "prop_holster_01" : "prop_pistol_holster"));
  866.             for (int index = 0; index < allProps.Length; ++index)
  867.             {
  868.                 if ((Entity)allProps[index] != (Entity)null && allProps[index].Exists())
  869.                 {
  870.                     if (!allProps[index].IsAttached())
  871.                     {
  872.                         this.holster = allProps[index];
  873.                         this.AttachHolster(ped);
  874.                         this.holsterSet = true;
  875.                         break;
  876.                     }
  877.                     if (allProps[index].IsAttachedTo((Entity)ped))
  878.                     {
  879.                         this.holster = allProps[index];
  880.                         this.holsterSet = true;
  881.                         break;
  882.                     }
  883.                 }
  884.                 else
  885.                 {
  886.                     Script.Wait(2000);
  887.                     if ((Entity)allProps[index] != (Entity)null && !allProps[index].Exists())
  888.                     {
  889.                         this.holster = (Prop)null;
  890.                         this.holsterSet = false;
  891.                         break;
  892.                     }
  893.                     if ((Entity)allProps[index] == (Entity)null)
  894.                     {
  895.                         this.holster = (Prop)null;
  896.                         this.holsterSet = false;
  897.                         break;
  898.                     }
  899.                 }
  900.             }
  901.         }
  902.  
  903.         private void checkPistolAfterScriptReload(Ped ped, string model)
  904.         {
  905.             if (!Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey(model), (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  906.                 return;
  907.             Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey(model), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  908.             if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped))
  909.                 prop.Delete();
  910.         }
  911.  
  912.         private void checkPistolFunc(Ped ped, WeaponHash gun, string model)
  913.         {
  914.             if (!Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped, (InputArgument)((uint)gun), (InputArgument)false))
  915.                 return;
  916.             this.choosenPistol = (Model)gun;
  917.             this.worldPistolModel = this.GetHashKey(model);
  918.             Function.Call(Hash._0x963D27A58DF860AC, (InputArgument)this.worldPistolModel);
  919.             this.HolstedPistol = World.CreateProp((Model)this.worldPistolModel, Game.Player.Character.Position, true, false);
  920.             this.AttachPistol(Game.Player.Character);
  921.         }
  922.  
  923.         private void removeHolstedPistolFunc(
  924.           Ped ped,
  925.           Prop holsted_pistol,
  926.           WeaponHash gun,
  927.           string world_pistol_model)
  928.         {
  929.             if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped, (InputArgument)((uint)gun)) || this.worldPistolModel != this.GetHashKey(world_pistol_model) || (!((Entity)holsted_pistol != (Entity)null) || !holsted_pistol.Exists()))
  930.                 return;
  931.             this.worldPistolModel = 0;
  932.             this.choosenPistol = (Model)((string)null);
  933.             this.HolstedPistol.Delete();
  934.             this.HolstedPistol = (Prop)null;
  935.         }
  936.  
  937.         private void AttackSpeech(Ped ped)
  938.         {
  939.             if (ped.Model.Hash == this.GetHashKey("PLAYER_TWO"))
  940.                 Function.Call(Hash._0x3523634255FC3318, (InputArgument)ped, (InputArgument)"FIGHT", (InputArgument)"TREVOR_ANGRY", (InputArgument)"SPEECH_PARAMS_FORCE", (InputArgument)0);
  941.             Model model = ped.Model;
  942.             if (model.Hash == this.GetHashKey("PLAYER_ONE"))
  943.                 Function.Call(Hash._0x3523634255FC3318, (InputArgument)ped, (InputArgument)"FIGHT", (InputArgument)"FRANKLIN_ANGRY", (InputArgument)"SPEECH_PARAMS_FORCE", (InputArgument)0);
  944.             model = ped.Model;
  945.             if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
  946.                 Function.Call(Hash._0x3523634255FC3318, (InputArgument)ped, (InputArgument)"FIGHT", (InputArgument)"MICHAEL_ANGRY", (InputArgument)"SPEECH_PARAMS_FORCE", (InputArgument)0);
  947.             model = ped.Model;
  948.             int num;
  949.             if (model.Hash != this.GetHashKey("PLAYER_ZERO"))
  950.             {
  951.                 model = ped.Model;
  952.                 if (model.Hash != this.GetHashKey("PLAYER_ONE"))
  953.                 {
  954.                     model = ped.Model;
  955.                     num = model.Hash != this.GetHashKey("PLAYER_TWO") ? 1 : 0;
  956.                     goto label_10;
  957.                 }
  958.             }
  959.             num = 0;
  960.         label_10:
  961.             if (num == 0)
  962.                 return;
  963.             if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)ped))
  964.                 Function.Call(Hash._0x3523634255FC3318, (InputArgument)ped, (InputArgument)"BLIND_RANGE", (InputArgument)"PACKIE", (InputArgument)"SPEECH_PARAMS_FORCE", (InputArgument)0);
  965.             else
  966.                 Function.Call(Hash._0x3523634255FC3318, (InputArgument)ped, (InputArgument)"BLIND_RANGE", (InputArgument)"TALINA", (InputArgument)"SPEECH_PARAMS_FORCE", (InputArgument)0);
  967.         }
  968.  
  969.         private void GetHolsterPropFunction(Ped ped)
  970.         {
  971.             ped.GetOffsetInWorldCoords(new Vector3(0.0f, 0.0f, 0.0f));
  972.             this.holsterProp = !this.useHipHolster ? World.GetAllProps((Model)"prop_holster_01") : World.GetAllProps((Model)"prop_pistol_holster");
  973.             for (int index = 0; index < this.holsterProp.Length; ++index)
  974.             {
  975.                 if (this.holsterProp[index].Exists() && (Entity)this.holsterProp[index] != (Entity)null)
  976.                 {
  977.                     this.holsterProp[index].Delete();
  978.                     this.holsterProp[index] = (Prop)null;
  979.                     break;
  980.                 }
  981.             }
  982.         }
  983.  
  984.         private void GetClosestPedDetectionFunction(Ped ped)
  985.         {
  986.             ped.GetOffsetInWorldCoords(new Vector3(0.0f, 0.0f, 0.0f));
  987.             this.closestPeds = World.GetNearbyPeds(ped.Position, 10f);
  988.             for (int index = 0; index < this.closestPeds.Length; ++index)
  989.             {
  990.                 int num1;
  991.                 if (Function.Call<bool>(Hash._0xB980061DA992779D, (InputArgument)this.closestPeds[index]) && (Entity)this.closestPeds[index] != (Entity)null && (this.closestPeds[index].Exists() && this.closestPeds[index].IsAlive) && ((double)this.closestPeds[index].Position.DistanceTo(ped.Position) < 15.0 && (Entity)this.closestPeds[index] != (Entity)ped))
  992.                     num1 = Function.Call<int>(Hash._0xF162E133B4E7A675, (InputArgument)this.closestPeds[index]) != Function.Call<int>(Hash._0xF162E133B4E7A675, (InputArgument)ped) ? 1 : 0;
  993.                 else
  994.                     num1 = 0;
  995.                 if (num1 != 0)
  996.                 {
  997.                     int num2;
  998.                     if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 0)
  999.                     {
  1000.                         if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 1)
  1001.                         {
  1002.                             if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 2)
  1003.                             {
  1004.                                 if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 6)
  1005.                                 {
  1006.                                     if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 29)
  1007.                                     {
  1008.                                         if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 27)
  1009.                                         {
  1010.                                             num2 = Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 21 ? 1 : 0;
  1011.                                             goto label_13;
  1012.                                         }
  1013.                                     }
  1014.                                 }
  1015.                             }
  1016.                         }
  1017.                     }
  1018.                     num2 = 0;
  1019.                 label_13:
  1020.                     if (num2 != 0)
  1021.                         Function.Call(Hash._0x72C896464915D1B1, (InputArgument)this.closestPeds[index], (InputArgument)ped);
  1022.                     else if (Game.Player.WantedLevel < 1)
  1023.                         ++Game.Player.WantedLevel;
  1024.                 }
  1025.             }
  1026.         }
  1027.  
  1028.         private void AttachPistol(Ped ped)
  1029.         {
  1030.             if (!((Entity)this.holster != (Entity)null) || !this.holster.Exists() || !((Entity)ped != (Entity)null) || !ped.Exists())
  1031.                 return;
  1032.             Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.HolstedPistol, (InputArgument)this.holster, (InputArgument)true);
  1033.             Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.HolstedPistol, (InputArgument)ped, (InputArgument)true);
  1034.             if (!this.useHipHolster)
  1035.             {
  1036.                 int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  1037.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.HolstedPistol, (InputArgument)ped, (InputArgument)num, (InputArgument)(-0.09f), (InputArgument)0.07f, (InputArgument)(-0.21f), (InputArgument)110f, (InputArgument)(-190f), (InputArgument)13f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1038.             }
  1039.             else
  1040.             {
  1041.                 int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57597);
  1042.                 if (this.worldPistolModel == this.GetHashKey("w_pi_pistol50"))
  1043.                     Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.HolstedPistol, (InputArgument)ped, (InputArgument)num, (InputArgument)0.05f, (InputArgument)(-0.017f), (InputArgument)(-0.21f), (InputArgument)93f, (InputArgument)(-190f), (InputArgument)12.4f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1044.                 else
  1045.                     Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.HolstedPistol, (InputArgument)ped, (InputArgument)num, (InputArgument)0.005f, (InputArgument)(-0.02f), (InputArgument)(-0.21f), (InputArgument)90f, (InputArgument)(-190f), (InputArgument)13f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1046.             }
  1047.         }
  1048.  
  1049.         private void AttachHolster(Ped ped)
  1050.         {
  1051.             Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.holster, (InputArgument)ped, (InputArgument)true);
  1052.             Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.holster, (InputArgument)this.choosenPistol, (InputArgument)true);
  1053.             if (!this.useHipHolster)
  1054.             {
  1055.                 int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  1056.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.holster, (InputArgument)ped, (InputArgument)num, (InputArgument)(-0.025f), (InputArgument)(-0.01f), (InputArgument)0.025f, (InputArgument)180f, (InputArgument)90f, (InputArgument)0.0f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1057.             }
  1058.             else
  1059.             {
  1060.                 int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57597);
  1061.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.holster, (InputArgument)ped, (InputArgument)num, (InputArgument)0.0f, (InputArgument)(-0.013f), (InputArgument)(-0.215f), (InputArgument)90f, (InputArgument)0.0f, (InputArgument)90f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1062.             }
  1063.         }
  1064.  
  1065.         private void IconHolsterDrawFunc(Ped ped)
  1066.         {
  1067.             if (this.drawHolsterIcon && !Function.Call<bool>(Hash._0x157F93B036700462, Array.Empty<InputArgument>()) && !Function.Call<bool>(Hash._0xA86478C6958735C5, Array.Empty<InputArgument>()) && !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()))
  1068.             {
  1069.                 this.iconDrawFunc(this.holsterIconX, this.holsterIconY, this.holsterIconW, this.holsterIconH, "holsterFull.png");
  1070.             }
  1071.             else
  1072.             {
  1073.                 if (!this.weaponPistol || ped.IsInVehicle() || (!this.drawHolsterIcon || Function.Call<bool>(Hash._0x157F93B036700462, Array.Empty<InputArgument>())) || Function.Call<bool>(Hash._0xA86478C6958735C5, Array.Empty<InputArgument>()) || Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()))
  1074.                     return;
  1075.                 this.iconDrawFunc(this.holsterIconX, this.holsterIconY, this.holsterIconW, this.holsterIconH, "holsterEmpty.png");
  1076.             }
  1077.         }
  1078.  
  1079.         private void SaveHolster(Ped ped)
  1080.         {
  1081.             bool flag = false;
  1082.             string str = "";
  1083.             foreach (PedHash allPedHash in this.allPedHashes)
  1084.             {
  1085.                 if (ped.Model == (Model)allPedHash)
  1086.                 {
  1087.                     str = allPedHash.ToString();
  1088.                     flag = true;
  1089.                 }
  1090.             }
  1091.             if (!flag)
  1092.                 str = ped.Model.ToString();
  1093.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  1094.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  1095.             if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster") == null)
  1096.             {
  1097.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XAttribute((XName)"holster", (object)true));
  1098.                 this.saveDoc();
  1099.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)true);
  1100.                 this.saveDoc();
  1101.             }
  1102.             else
  1103.             {
  1104.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)true);
  1105.                 this.saveDoc();
  1106.             }
  1107.         }
  1108.  
  1109.         private bool doesPedHasHolster(Ped ped)
  1110.         {
  1111.             bool flag = false;
  1112.             string str = "";
  1113.             foreach (PedHash allPedHash in this.allPedHashes)
  1114.             {
  1115.                 if (ped.Model == (Model)allPedHash)
  1116.                 {
  1117.                     str = allPedHash.ToString();
  1118.                     flag = true;
  1119.                 }
  1120.             }
  1121.             if (!flag)
  1122.                 str = ped.Model.ToString();
  1123.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  1124.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  1125.             XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str);
  1126.             return xelement.Attribute((XName)"holster") != null && xelement.Attribute((XName)"holster").Value == "true";
  1127.         }
  1128.  
  1129.         private void DeleteHolster(Ped ped)
  1130.         {
  1131.             bool flag = false;
  1132.             string str = "";
  1133.             foreach (PedHash allPedHash in this.allPedHashes)
  1134.             {
  1135.                 if (ped.Model == (Model)allPedHash)
  1136.                 {
  1137.                     str = allPedHash.ToString();
  1138.                     flag = true;
  1139.                 }
  1140.             }
  1141.             if (!flag)
  1142.                 str = ped.Model.ToString();
  1143.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  1144.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  1145.             if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster") == null)
  1146.             {
  1147.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XAttribute((XName)"holster", (object)false));
  1148.                 this.saveDoc();
  1149.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)false);
  1150.                 this.saveDoc();
  1151.             }
  1152.             else
  1153.             {
  1154.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)false);
  1155.                 this.saveDoc();
  1156.             }
  1157.         }
  1158.  
  1159.         private void SetHolster(Ped ped)
  1160.         {
  1161.             if (!((Entity)ped != (Entity)null) || !ped.Exists())
  1162.                 return;
  1163.             if (!this.useHipHolster)
  1164.             {
  1165.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)"puton_parachute", (InputArgument)3))
  1166.                 {
  1167.                     Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)ped, (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)"puton_parachute", (InputArgument)45f, (InputArgument)(-12.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1168.                     Script.Wait(700);
  1169.                     Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"puton_parachute", (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)3);
  1170.                 }
  1171.             }
  1172.             else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  1173.             {
  1174.                 Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)ped, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)7f, (InputArgument)(-12.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1175.                 Script.Wait(700);
  1176.                 Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"cop_p1_rf_right_0", (InputArgument)"mp_arrest_paired", (InputArgument)3);
  1177.             }
  1178.             this.holsterSet = true;
  1179.             if (!this.useHipHolster)
  1180.             {
  1181.                 if (Function.Call<bool>(Hash._0xBFA48E2FF417213F, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_pistol_holster"), (InputArgument)0))
  1182.                 {
  1183.                     Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_pistol_holster"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  1184.                     if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped))
  1185.                     {
  1186.                         this.holster = prop;
  1187.                         int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  1188.                         Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.holster, (InputArgument)ped, (InputArgument)num, (InputArgument)(-0.025f), (InputArgument)(-0.01f), (InputArgument)0.025f, (InputArgument)180f, (InputArgument)90f, (InputArgument)0.0f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1189.                     }
  1190.                     else if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_pistol_holster")))
  1191.                     {
  1192.                         if (Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_pistol_holster")))
  1193.                         {
  1194.                             this.holster = World.CreateProp((Model)"prop_pistol_holster", ped.Position, true, false);
  1195.                             int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  1196.                             Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.holster, (InputArgument)ped, (InputArgument)num, (InputArgument)(-0.025f), (InputArgument)(-0.01f), (InputArgument)0.025f, (InputArgument)180f, (InputArgument)90f, (InputArgument)0.0f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1197.                         }
  1198.                         else
  1199.                             UI.Notify("holster model has not loaded yet");
  1200.                     }
  1201.                     else
  1202.                         UI.Notify("holster model is invalid");
  1203.                 }
  1204.                 else if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_pistol_holster")))
  1205.                 {
  1206.                     if (Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_pistol_holster")))
  1207.                     {
  1208.                         this.holster = World.CreateProp((Model)"prop_pistol_holster", ped.Position, true, false);
  1209.                         int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  1210.                         Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.holster, (InputArgument)ped, (InputArgument)num, (InputArgument)(-0.025f), (InputArgument)(-0.01f), (InputArgument)0.025f, (InputArgument)180f, (InputArgument)90f, (InputArgument)0.0f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1211.                     }
  1212.                     else
  1213.                         UI.Notify("holster model has not loaded yet");
  1214.                 }
  1215.                 else
  1216.                     UI.Notify("holster model is invalid");
  1217.             }
  1218.             else if (Function.Call<bool>(Hash._0xBFA48E2FF417213F, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_holster_01"), (InputArgument)0))
  1219.             {
  1220.                 Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_holster_01"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  1221.                 if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped))
  1222.                 {
  1223.                     this.holster = prop;
  1224.                     int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57597);
  1225.                     Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.holster, (InputArgument)ped, (InputArgument)num, (InputArgument)0.0f, (InputArgument)(-0.013f), (InputArgument)(-0.215f), (InputArgument)90f, (InputArgument)0.0f, (InputArgument)90f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1226.                 }
  1227.                 else if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_holster_01")))
  1228.                 {
  1229.                     if (Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_holster_01")))
  1230.                     {
  1231.                         this.holster = World.CreateProp((Model)"prop_holster_01", ped.Position, true, false);
  1232.                         int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57597);
  1233.                         Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.holster, (InputArgument)ped, (InputArgument)num, (InputArgument)0.0f, (InputArgument)(-0.013f), (InputArgument)(-0.215f), (InputArgument)90f, (InputArgument)0.0f, (InputArgument)90f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1234.                     }
  1235.                     else
  1236.                         UI.Notify("holster model has not loaded yet");
  1237.                 }
  1238.                 else
  1239.                     UI.Notify("holster model is invalid");
  1240.             }
  1241.             else if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_holster_01")))
  1242.             {
  1243.                 if (Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_holster_01")))
  1244.                 {
  1245.                     this.holster = World.CreateProp((Model)"prop_holster_01", ped.Position, true, false);
  1246.                     int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57597);
  1247.                     Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.holster, (InputArgument)ped, (InputArgument)num, (InputArgument)0.0f, (InputArgument)(-0.013f), (InputArgument)(-0.215f), (InputArgument)90f, (InputArgument)0.0f, (InputArgument)90f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  1248.                 }
  1249.                 else
  1250.                     UI.Notify("holster model has not loaded yet");
  1251.             }
  1252.             else
  1253.                 UI.Notify("holster model is invalid");
  1254.         }
  1255.  
  1256.         private void UnsetHolster(Ped ped)
  1257.         {
  1258.             if (!((Entity)ped != (Entity)null) || !ped.Exists())
  1259.                 return;
  1260.             if (!this.useHipHolster)
  1261.             {
  1262.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"skydive@parachute@", (InputArgument)"chute_off", (InputArgument)3))
  1263.                 {
  1264.                     ped.Task.ClearAll();
  1265.                     Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)ped, (InputArgument)"skydive@parachute@", (InputArgument)"chute_off", (InputArgument)12f, (InputArgument)(-12.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1266.                     Script.Wait(700);
  1267.                     Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"chute_off", (InputArgument)"skydive@parachute@", (InputArgument)3);
  1268.                 }
  1269.             }
  1270.             else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  1271.             {
  1272.                 Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)ped, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)7f, (InputArgument)(-12.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1273.                 Script.Wait(700);
  1274.                 Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"cop_p1_rf_right_0", (InputArgument)"mp_arrest_paired", (InputArgument)3);
  1275.             }
  1276.             this.holsterSet = false;
  1277.             if ((Entity)this.holster != (Entity)null && this.holster.Exists())
  1278.             {
  1279.                 this.holster.Delete();
  1280.                 this.holster = (Prop)null;
  1281.             }
  1282.             if ((Entity)this.HolstedPistol != (Entity)null && this.HolstedPistol.Exists())
  1283.             {
  1284.                 this.HolstedPistol = (Prop)null;
  1285.                 Function.Call(Hash._0x4899CB088EDF59B8, (InputArgument)ped, (InputArgument)this.choosenPistol);
  1286.             }
  1287.             this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistol");
  1288.             this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_combatpistol");
  1289.             this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_appistol");
  1290.             this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistol50");
  1291.             this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_heavypistol");
  1292.             this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_vintage_pistol");
  1293.             this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_revolver");
  1294.             this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistolmk2");
  1295.             this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_revolvermk2");
  1296.             this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_wep1_gun");
  1297.         }
  1298.  
  1299.         private void PropsControlFunc(
  1300.           Ped ped,
  1301.           string action,
  1302.           bool condition,
  1303.           string section,
  1304.           int type)
  1305.         {
  1306.             Function.Call(Hash._0xDE2EF5DA284CC8DF, Array.Empty<InputArgument>());
  1307.             Function.Call(Hash._0xADFF1B2A555F5FBA, Array.Empty<InputArgument>());
  1308.             Function.Call(Hash._0x5A4F9EDF1673F704, (InputArgument)0);
  1309.             Function.Call(Hash._0xAC253D7842768F48, (InputArgument)0);
  1310.             int num1 = 0;
  1311.             int num2 = 0;
  1312.             int num3 = 0;
  1313.             if (type != 2 | condition)
  1314.             {
  1315.                 num1 = this.config.GetValue<int>(section, action + "COMPONENTID", 9);
  1316.                 num2 = this.config.GetValue<int>(section, action + "MODEL", 0);
  1317.                 num3 = this.config.GetValue<int>(section, action + "TEXTURE", 0);
  1318.             }
  1319.             if (type == 1)
  1320.             {
  1321.                 if (Function.Call<bool>(Hash._0xE825F6B6CEA7671D, (InputArgument)ped, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3))
  1322.                 {
  1323.                     Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)ped, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3);
  1324.                 }
  1325.                 else
  1326.                 {
  1327.                     Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
  1328.                     UI.Notify("Invalid Component number", true);
  1329.                 }
  1330.             }
  1331.             if (type != 2)
  1332.                 return;
  1333.             if (condition)
  1334.             {
  1335.                 if (Function.Call<bool>(Hash._0x2B16A3BFF1FBCE49, (InputArgument)ped, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3))
  1336.                 {
  1337.                     Function.Call(Hash._0x93376B65A266EB5F, (InputArgument)ped, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3, (InputArgument)false);
  1338.                 }
  1339.                 else
  1340.                 {
  1341.                     Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
  1342.                     UI.Notify("Invalid Prop number", true);
  1343.                 }
  1344.             }
  1345.             else
  1346.                 Function.Call(Hash._0x0943E5B8E078E76E, (InputArgument)ped, (InputArgument)1);
  1347.         }
  1348.  
  1349.         private void SmokeProceEffectsFunc(Ped ped, int type)
  1350.         {
  1351.             --this.cig_durability;
  1352.             Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
  1353.             Function.Call(Hash._0x0D53A3B8DA0809D2, (InputArgument)"scr_sh_cig_exhale_mouth", (InputArgument)this.cig, (InputArgument)(-0.1f), (InputArgument)0.0f, (InputArgument)0.0f, (InputArgument)(this.cig.Rotation.X + 90f), (InputArgument)this.cig.Rotation.Y, (InputArgument)this.cig.Rotation.Z, (InputArgument)1.0, (InputArgument)false, (InputArgument)false, (InputArgument)false);
  1354.             if (type == 1)
  1355.             {
  1356.                 if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)ped))
  1357.                 {
  1358.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
  1359.                         return;
  1360.                     if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") > 0.6)
  1361.                     {
  1362.                         this.flame = false;
  1363.                         int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)32679);
  1364.                         Vector3 vector3 = Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num, (InputArgument)0, (InputArgument)(-0.1), (InputArgument)0);
  1365.                         Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
  1366.                         Function.Call(Hash._0x25129531F77B9ED3, (InputArgument)"scr_sh_cig_exhale_mouth", (InputArgument)vector3.X, (InputArgument)vector3.Y, (InputArgument)((double)vector3.Z + 0.6), (InputArgument)ped.Rotation.X, (InputArgument)ped.Rotation.Y, (InputArgument)ped.Rotation.Z, (InputArgument)1.7, (InputArgument)false, (InputArgument)false, (InputArgument)false);
  1367.                     }
  1368.                     else
  1369.                     {
  1370.                         int num;
  1371.                         if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") < 0.5)
  1372.                             num = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") > 0.1 ? 1 : 0;
  1373.                         else
  1374.                             num = 0;
  1375.                         if (num != 0)
  1376.                             this.flame = true;
  1377.                     }
  1378.                 }
  1379.                 else if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
  1380.                 {
  1381.                     if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") > 0.6)
  1382.                     {
  1383.                         this.flame = false;
  1384.                         int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)32679);
  1385.                         Vector3 vector3 = Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num, (InputArgument)0, (InputArgument)(-0.1), (InputArgument)0);
  1386.                         Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
  1387.                         Function.Call(Hash._0x25129531F77B9ED3, (InputArgument)"scr_sh_cig_exhale_mouth", (InputArgument)vector3.X, (InputArgument)vector3.Y, (InputArgument)((double)vector3.Z + 0.6), (InputArgument)ped.Rotation.X, (InputArgument)ped.Rotation.Y, (InputArgument)ped.Rotation.Z, (InputArgument)1.7, (InputArgument)false, (InputArgument)false, (InputArgument)false);
  1388.                     }
  1389.                     else
  1390.                     {
  1391.                         int num;
  1392.                         if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") < 0.5)
  1393.                             num = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") > 0.1 ? 1 : 0;
  1394.                         else
  1395.                             num = 0;
  1396.                         if (num != 0)
  1397.                             this.flame = true;
  1398.                     }
  1399.                 }
  1400.             }
  1401.             else
  1402.             {
  1403.                 Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
  1404.                 Function.Call(Hash._0x0D53A3B8DA0809D2, (InputArgument)"scr_sh_cig_exhale_mouth", (InputArgument)this.cig, (InputArgument)(-0.1f), (InputArgument)0.0f, (InputArgument)0.0f, (InputArgument)(this.cig.Rotation.X + 90f), (InputArgument)this.cig.Rotation.Y, (InputArgument)this.cig.Rotation.Z, (InputArgument)0.5, (InputArgument)false, (InputArgument)false, (InputArgument)false);
  1405.                 int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)32679);
  1406.                 Vector3 vector3 = Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num, (InputArgument)0, (InputArgument)(-0.1), (InputArgument)0);
  1407.                 Function.Call(Hash._0xB80D8756B4668AB6, (InputArgument)"scr_safehouse");
  1408.                 while (true)
  1409.                 {
  1410.                     if (!Function.Call<bool>(Hash._0x8702416E512EC454, (InputArgument)"scr_safehouse"))
  1411.                         Script.Wait(10);
  1412.                     else
  1413.                         break;
  1414.                 }
  1415.                 Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
  1416.                 if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)"idle_a", (InputArgument)3))
  1417.                 {
  1418.                     if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)"idle_a") < 0.5)
  1419.                     {
  1420.                         this.flame = false;
  1421.                         Function.Call(Hash._0x25129531F77B9ED3, (InputArgument)"scr_sh_cig_exhale_mouth", (InputArgument)vector3.X, (InputArgument)vector3.Y, (InputArgument)((double)vector3.Z + 0.5), (InputArgument)ped.Rotation.X, (InputArgument)ped.Rotation.Y, (InputArgument)ped.Rotation.Z, (InputArgument)1.7, (InputArgument)false, (InputArgument)false, (InputArgument)false);
  1422.                     }
  1423.                     else
  1424.                         this.flame = true;
  1425.                 }
  1426.             }
  1427.         }
  1428.  
  1429.         private void SmokeLoopFunc(Ped ped, int type)
  1430.         {
  1431.             this.smoking = true;
  1432.             switch (type)
  1433.             {
  1434.                 case 1:
  1435.                     int num1;
  1436.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
  1437.                         num1 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3) ? 1 : 0;
  1438.                     else
  1439.                         num1 = 0;
  1440.                     if (num1 != 0)
  1441.                     {
  1442.                         if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)Game.Player.Character))
  1443.                         {
  1444.                             if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  1445.                                 break;
  1446.                             Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)1f, (InputArgument)(-1f), (InputArgument)(-1), (InputArgument)49, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1447.                             break;
  1448.                         }
  1449.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  1450.                             Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)1f, (InputArgument)(-1f), (InputArgument)(-1), (InputArgument)49, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1451.                         break;
  1452.                     }
  1453.                     if ((Entity)this.cig != (Entity)null && this.cig.Exists())
  1454.                     {
  1455.                         int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
  1456.                         if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)Game.Player.Character))
  1457.                         {
  1458.                             if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") > 0.109999999403954)
  1459.                                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num2, (InputArgument)0.017, (InputArgument)(-0.01), (InputArgument)0.0, (InputArgument)0.0, (InputArgument)(-120.0), (InputArgument)(-90.0), (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1460.                         }
  1461.                         else if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") > 0.109999999403954)
  1462.                             Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num2, (InputArgument)0.017, (InputArgument)(-0.01), (InputArgument)0.0, (InputArgument)0.0, (InputArgument)0.0, (InputArgument)(-90.0), (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1463.                     }
  1464.                     break;
  1465.                 case 2:
  1466.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)"idle_a", (InputArgument)3))
  1467.                     {
  1468.                         int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
  1469.                         Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num2, (InputArgument)0.017, (InputArgument)(-0.01), (InputArgument)0.0, (InputArgument)0.0, (InputArgument)(-120.0), (InputArgument)(-90.0), (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1470.                         Game.Player.Character.Task.PlayAnimation("amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", "idle_a", 1f, -1, AnimationFlags.Loop | AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation | AnimationFlags.CancelableWithMovement);
  1471.                     }
  1472.                     break;
  1473.             }
  1474.         }
  1475.  
  1476.         private void PauseSmokeFunc(Ped ped, int type)
  1477.         {
  1478.             if (type == 1)
  1479.             {
  1480.                 if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)ped))
  1481.                 {
  1482.                     if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") > 0.6)
  1483.                     {
  1484.                         double num1 = (double)Function.Call<float>(Hash._0x4487C259F0F70977, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)0.3f);
  1485.                         if (ped.Model.Hash != this.GetHashKey("PLAYER_ZERO") && ped.Model.Hash != this.GetHashKey("PLAYER_ONE") && ped.Model.Hash != this.GetHashKey("PLAYER_TWO"))
  1486.                         {
  1487.                             int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)47419);
  1488.                             Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num2, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1489.                             Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num2, (InputArgument)0.0f, (InputArgument)0.0f, (InputArgument)0.01f, (InputArgument)55f, (InputArgument)85f, (InputArgument)0.0f, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1490.                         }
  1491.                         else
  1492.                         {
  1493.                             int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)65068);
  1494.                             Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num2, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1495.                             Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num2, (InputArgument)0.02f, (InputArgument)(-0.05f), (InputArgument)0.1f, (InputArgument)30f, (InputArgument)85f, (InputArgument)0.0f, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1496.                         }
  1497.                         Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"idle_a", (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)3);
  1498.                         this.playCigAndSmokeAnim = false;
  1499.                         this.smoking = false;
  1500.                     }
  1501.                     else
  1502.                     {
  1503.                         int num1;
  1504.                         if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") < 0.5)
  1505.                             num1 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") > 0.3 ? 1 : 0;
  1506.                         else
  1507.                             num1 = 0;
  1508.                         if (num1 == 0)
  1509.                             return;
  1510.                         if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
  1511.                         {
  1512.                             Model model = ped.Model;
  1513.                             int num2;
  1514.                             if (model.Hash != this.GetHashKey("PLAYER_ZERO"))
  1515.                             {
  1516.                                 model = ped.Model;
  1517.                                 if (model.Hash != this.GetHashKey("PLAYER_ONE"))
  1518.                                 {
  1519.                                     model = ped.Model;
  1520.                                     num2 = model.Hash != this.GetHashKey("PLAYER_TWO") ? 1 : 0;
  1521.                                     goto label_16;
  1522.                                 }
  1523.                             }
  1524.                             num2 = 0;
  1525.                         label_16:
  1526.                             if (num2 != 0)
  1527.                             {
  1528.                                 int num3 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)47419);
  1529.                                 Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num3, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1530.                                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num3, (InputArgument)(1f / 1000f), (InputArgument)0.0f, (InputArgument)0.01f, (InputArgument)55f, (InputArgument)85f, (InputArgument)0.0f, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1531.                             }
  1532.                             else
  1533.                             {
  1534.                                 int num3 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)65068);
  1535.                                 Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num3, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1536.                                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num3, (InputArgument)0.02f, (InputArgument)(-0.05f), (InputArgument)0.1f, (InputArgument)30f, (InputArgument)85f, (InputArgument)0.0f, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1537.                             }
  1538.                             Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"idle_a", (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)3);
  1539.                             this.playCigAndSmokeAnim = false;
  1540.                             this.smoking = false;
  1541.                         }
  1542.                     }
  1543.                 }
  1544.                 else if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") > 0.6)
  1545.                 {
  1546.                     double num1 = (double)Function.Call<float>(Hash._0x4487C259F0F70977, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)0.3f);
  1547.                     if (ped.Model.Hash != this.GetHashKey("PLAYER_ZERO") && ped.Model.Hash != this.GetHashKey("PLAYER_ONE") && ped.Model.Hash != this.GetHashKey("PLAYER_TWO"))
  1548.                     {
  1549.                         int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)47419);
  1550.                         Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num2, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1551.                         Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num2, (InputArgument)0.0f, (InputArgument)0.0f, (InputArgument)0.01f, (InputArgument)0, (InputArgument)0, (InputArgument)45f, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1552.                     }
  1553.                     Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"idle_b", (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)3);
  1554.                     this.playCigAndSmokeAnim = false;
  1555.                     this.smoking = false;
  1556.                 }
  1557.                 else
  1558.                 {
  1559.                     int num1;
  1560.                     if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") < 0.5)
  1561.                         num1 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") > 0.1 ? 1 : 0;
  1562.                     else
  1563.                         num1 = 0;
  1564.                     if (num1 != 0)
  1565.                     {
  1566.                         if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
  1567.                         {
  1568.                             Model model = ped.Model;
  1569.                             int num2;
  1570.                             if (model.Hash != this.GetHashKey("PLAYER_ZERO"))
  1571.                             {
  1572.                                 model = ped.Model;
  1573.                                 if (model.Hash != this.GetHashKey("PLAYER_ONE"))
  1574.                                 {
  1575.                                     model = ped.Model;
  1576.                                     num2 = model.Hash != this.GetHashKey("PLAYER_TWO") ? 1 : 0;
  1577.                                     goto label_34;
  1578.                                 }
  1579.                             }
  1580.                             num2 = 0;
  1581.                         label_34:
  1582.                             if (num2 != 0)
  1583.                             {
  1584.                                 int num3 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)47419);
  1585.                                 Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num3, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1586.                                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num3, (InputArgument)(1f / 1000f), (InputArgument)0.0f, (InputArgument)0.01f, (InputArgument)0, (InputArgument)0, (InputArgument)55f, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1587.                             }
  1588.                             Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"idle_b", (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)3);
  1589.                             this.playCigAndSmokeAnim = false;
  1590.                             this.smoking = false;
  1591.                         }
  1592.                     }
  1593.                 }
  1594.             }
  1595.             else
  1596.             {
  1597.                 this.flame = false;
  1598.                 this.smoking = false;
  1599.                 if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)"idle_a", (InputArgument)3))
  1600.                 {
  1601.                     Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"idle_a", (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)3);
  1602.                     this.playCigAndSmokeAnim = false;
  1603.                 }
  1604.             }
  1605.         }
  1606.  
  1607.         private void StopSmokeFunc(Ped ped, int type)
  1608.         {
  1609.             if (type == 1)
  1610.             {
  1611.                 int num1;
  1612.                 if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
  1613.                     num1 = !Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)ped) ? 1 : 0;
  1614.                 else
  1615.                     num1 = 0;
  1616.                 if (num1 == 0 || !((Entity)this.cig != (Entity)null))
  1617.                     return;
  1618.                 if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)ped))
  1619.                 {
  1620.                     if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
  1621.                     {
  1622.                         int num2;
  1623.                         if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") >= 0.300000011920929)
  1624.                             num2 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") < 0.600000023841858 ? 1 : 0;
  1625.                         else
  1626.                             num2 = 0;
  1627.                         if (num2 != 0)
  1628.                             Function.Call(Hash._0x4487C259F0F70977, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)0.6);
  1629.                     }
  1630.                 }
  1631.                 else if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
  1632.                 {
  1633.                     int num2;
  1634.                     if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") >= 0.300000011920929)
  1635.                         num2 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") < 0.600000023841858 ? 1 : 0;
  1636.                     else
  1637.                         num2 = 0;
  1638.                     if (num2 != 0)
  1639.                         Function.Call(Hash._0x4487C259F0F70977, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)0.6);
  1640.                 }
  1641.                 int num3 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
  1642.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num3, (InputArgument)0.017, (InputArgument)(-0.01), (InputArgument)0.0, (InputArgument)0.0, (InputArgument)(-120.0), (InputArgument)(-90.0), (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1643.                 if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)ped))
  1644.                 {
  1645.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  1646.                     {
  1647.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@exit", (InputArgument)"exit", (InputArgument)3))
  1648.                             Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@exit", (InputArgument)"exit", (InputArgument)3f, (InputArgument)(-3f), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1649.                         else if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@exit", (InputArgument)"exit") >= 0.5)
  1650.                         {
  1651.                             this.cigsAndPillsCountDown = false;
  1652.                             this.smoke = -1;
  1653.                             this.startSmoke = true;
  1654.                             this.flame = false;
  1655.                             if ((Entity)this.cig != (Entity)null)
  1656.                             {
  1657.                                 Function.Call(Hash._0x961AC54BF0613F5D, (InputArgument)this.cig, (InputArgument)true, (InputArgument)true);
  1658.                                 this.cig.MarkAsNoLongerNeeded();
  1659.                                 this.cig = (Prop)null;
  1660.                             }
  1661.                         }
  1662.                     }
  1663.                 }
  1664.                 else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  1665.                 {
  1666.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@exit", (InputArgument)"exit", (InputArgument)3))
  1667.                         Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@exit", (InputArgument)"exit", (InputArgument)3f, (InputArgument)(-3f), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1668.                     else if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@exit", (InputArgument)"exit") >= 0.5)
  1669.                     {
  1670.                         this.smoke = -1;
  1671.                         this.startSmoke = true;
  1672.                         this.flame = false;
  1673.                         this.cigsAndPillsCountDown = false;
  1674.                         if ((Entity)this.cig != (Entity)null)
  1675.                         {
  1676.                             Function.Call(Hash._0x961AC54BF0613F5D, (InputArgument)this.cig, (InputArgument)true, (InputArgument)true);
  1677.                             this.cig.MarkAsNoLongerNeeded();
  1678.                             this.cig = (Prop)null;
  1679.                         }
  1680.                     }
  1681.                 }
  1682.             }
  1683.             else
  1684.             {
  1685.                 int num1;
  1686.                 if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)ped))
  1687.                 {
  1688.                     if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
  1689.                     {
  1690.                         if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)ped))
  1691.                         {
  1692.                             num1 = (Entity)this.cig != (Entity)null ? 1 : 0;
  1693.                             goto label_48;
  1694.                         }
  1695.                     }
  1696.                 }
  1697.                 num1 = 0;
  1698.             label_48:
  1699.                 if (num1 != 0)
  1700.                 {
  1701.                     int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
  1702.                     Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num2, (InputArgument)0.017, (InputArgument)(-0.01), (InputArgument)0.0, (InputArgument)0.0, (InputArgument)(-120.0), (InputArgument)(-90.0), (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1703.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)"exit", (InputArgument)3))
  1704.                     {
  1705.                         this.cigsAndPillsCountDown = true;
  1706.                         this.cigsAndPillsCounter = 1;
  1707.                         Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)"exit", (InputArgument)3f, (InputArgument)(-3f), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1708.                     }
  1709.                     if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)"exit", (InputArgument)3) && this.cigsAndPillsCounter <= 1)
  1710.                     {
  1711.                         this.cigsAndPillsCountDown = false;
  1712.                         this.smoke = -1;
  1713.                         this.startSmoke = true;
  1714.                         if ((Entity)this.cig != (Entity)null)
  1715.                         {
  1716.                             this.cig.Delete();
  1717.                             this.cig = (Prop)null;
  1718.                         }
  1719.                     }
  1720.                     if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)"idle_a", (InputArgument)3))
  1721.                         Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"exit", (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)3);
  1722.                 }
  1723.             }
  1724.         }
  1725.  
  1726.         private void StartSmokeFunc(Ped ped, int type)
  1727.         {
  1728.             this.smoking = true;
  1729.             if (!((Entity)this.cig != (Entity)null))
  1730.                 return;
  1731.             if (type == 1)
  1732.             {
  1733.                 int num1 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)18905);
  1734.                 Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num1, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1735.                 Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
  1736.                 int num2;
  1737.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  1738.                     num2 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter", (InputArgument)3) ? 1 : 0;
  1739.                 else
  1740.                     num2 = 0;
  1741.                 if (num2 != 0)
  1742.                     Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter", (InputArgument)1f, (InputArgument)(-1f), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1743.                 if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter", (InputArgument)3))
  1744.                 {
  1745.                     int num3;
  1746.                     if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter") >= 0.100000001490116)
  1747.                         num3 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter") < 0.200000002980232 ? 1 : 0;
  1748.                     else
  1749.                         num3 = 0;
  1750.                     if (num3 != 0)
  1751.                     {
  1752.                         this.cigsAndPillsCountDown = true;
  1753.                         this.cigsAndPillsCounter = 9;
  1754.                         this.cig.IsVisible = true;
  1755.                     }
  1756.                     if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter") < 0.6)
  1757.                     {
  1758.                         int num4;
  1759.                         if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter") < 0.200000002980232)
  1760.                             num4 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter") > 0.131999999284744 ? 1 : 0;
  1761.                         else
  1762.                             num4 = 0;
  1763.                         if (num4 != 0 && this.cig.Exists())
  1764.                         {
  1765.                             int num5;
  1766.                             if (ped.Model.Hash != this.GetHashKey("PLAYER_ZERO"))
  1767.                             {
  1768.                                 Model model = ped.Model;
  1769.                                 if (model.Hash != this.GetHashKey("PLAYER_ONE"))
  1770.                                 {
  1771.                                     model = ped.Model;
  1772.                                     num5 = model.Hash != this.GetHashKey("PLAYER_TWO") ? 1 : 0;
  1773.                                     goto label_22;
  1774.                                 }
  1775.                             }
  1776.                             num5 = 0;
  1777.                         label_22:
  1778.                             if (num5 != 0)
  1779.                             {
  1780.                                 int num6 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)47419);
  1781.                                 Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num6, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1782.                                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num6, (InputArgument)0.0f, (InputArgument)0.0f, (InputArgument)0.01f, (InputArgument)0, (InputArgument)0, (InputArgument)55f, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1783.                             }
  1784.                             else
  1785.                             {
  1786.                                 int num6 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)65068);
  1787.                                 Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num6, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1788.                                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)ped, (InputArgument)num6, (InputArgument)0.02f, (InputArgument)(-0.05f), (InputArgument)0.1f, (InputArgument)45f, (InputArgument)90f, (InputArgument)0.0f, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1789.                             }
  1790.                         }
  1791.                         if (this.cigsAndPillsCounter == 6)
  1792.                         {
  1793.                             this.LighterSoundFX(ped);
  1794.                             int num5 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
  1795.                             Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num5, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1796.                             Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
  1797.                             Function.Call(Hash._0x0D53A3B8DA0809D2, (InputArgument)"scr_sh_lighter_flame", (InputArgument)this.cig, (InputArgument)(-0.075f), (InputArgument)(1f / 500f), (InputArgument)0.0f, (InputArgument)this.cig.Rotation.X, (InputArgument)this.cig.Rotation.Y, (InputArgument)this.cig.Rotation.Z, (InputArgument)0.11, (InputArgument)true, (InputArgument)true, (InputArgument)true);
  1798.                         }
  1799.                         if (this.cigsAndPillsCounter <= 0)
  1800.                         {
  1801.                             this.startSmoke = false;
  1802.                             this.cigsAndPillsCountDown = false;
  1803.                             this.cig_durability = this.max_cig_durability;
  1804.                             --this.cigsCount;
  1805.                             Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
  1806.                             UI.Notify("Cigs left: ~r~" + this.cigsCount.ToString(), true);
  1807.                         }
  1808.                     }
  1809.                     else
  1810.                     {
  1811.                         this.startSmoke = false;
  1812.                         this.cigsAndPillsCountDown = false;
  1813.                         this.cig_durability = this.max_cig_durability;
  1814.                         --this.cigsCount;
  1815.                         Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
  1816.                         UI.Notify("Cigs left: ~r~" + this.cigsCount.ToString(), true);
  1817.                     }
  1818.                 }
  1819.             }
  1820.             else if ((Entity)this.cig != (Entity)null)
  1821.             {
  1822.                 int num1 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)18905);
  1823.                 Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num1, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1824.                 int num2;
  1825.                 if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)ped))
  1826.                 {
  1827.                     if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
  1828.                     {
  1829.                         num2 = !Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)ped) ? 1 : 0;
  1830.                         goto label_38;
  1831.                     }
  1832.                 }
  1833.                 num2 = 0;
  1834.             label_38:
  1835.                 if (num2 != 0)
  1836.                 {
  1837.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ps@base", (InputArgument)"idle_c", (InputArgument)3))
  1838.                     {
  1839.                         Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ps@base", (InputArgument)"idle_c", (InputArgument)3f, (InputArgument)(-3f), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1840.                         this.cig.IsVisible = true;
  1841.                     }
  1842.                     else if (!this.cigsAndPillsCountDown)
  1843.                     {
  1844.                         this.LighterSoundFX(ped);
  1845.                         Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
  1846.                         Function.Call(Hash._0x0D53A3B8DA0809D2, (InputArgument)"scr_sh_lighter_flame", (InputArgument)this.cig, (InputArgument)(-0.075f), (InputArgument)(1f / 500f), (InputArgument)0.0f, (InputArgument)this.cig.Rotation.X, (InputArgument)this.cig.Rotation.Y, (InputArgument)this.cig.Rotation.Z, (InputArgument)0.11, (InputArgument)true, (InputArgument)true, (InputArgument)true);
  1847.                         this.cigsAndPillsCountDown = true;
  1848.                         this.cigsAndPillsCounter = 3;
  1849.                     }
  1850.                 }
  1851.                 if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ps@base", (InputArgument)"idle_c") > 0.25)
  1852.                 {
  1853.                     this.startSmoke = false;
  1854.                     this.cigsAndPillsCountDown = false;
  1855.                     this.cig_durability = this.max_cig_durability;
  1856.                     --this.cigsCount;
  1857.                     Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
  1858.                     UI.Notify("Cigs left: ~r~" + this.cigsCount.ToString(), true);
  1859.                 }
  1860.             }
  1861.         }
  1862.  
  1863.         private void LighterSoundFX(Ped ped)
  1864.         {
  1865.             this.soundFX(ped, "lighter.wav");
  1866.             Script.Wait(500);
  1867.             this.soundFX(ped, "puff.wav");
  1868.             int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
  1869.             Vector3 vector3 = Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1870.             Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
  1871.             Function.Call(Hash._0x25129531F77B9ED3, (InputArgument)"scr_sh_lighter_sparks", (InputArgument)vector3.X, (InputArgument)vector3.Y, (InputArgument)vector3.Z, (InputArgument)ped.Rotation.X, (InputArgument)ped.Rotation.Y, (InputArgument)ped.Rotation.Z, (InputArgument)1.5, (InputArgument)true, (InputArgument)false, (InputArgument)false);
  1872.             Script.Wait(1000);
  1873.             this.soundFX(ped, "sizzle.wav");
  1874.         }
  1875.  
  1876.         private void stopSmokingFunc(Ped ped)
  1877.         {
  1878.             if ((Entity)this.cig != (Entity)null)
  1879.             {
  1880.                 if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey(this.smokeType), (InputArgument)true, (InputArgument)false, (InputArgument)false)))
  1881.                     Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey(this.smokeType), (InputArgument)true, (InputArgument)false, (InputArgument)false).Delete();
  1882.             }
  1883.             else
  1884.                 this.cig.Delete();
  1885.             this.smoke = -1;
  1886.             this.startSmoke = true;
  1887.             if (this.playCigAndSmokeAnim)
  1888.                 this.playCigAndSmokeAnim = false;
  1889.             this.cig = (Prop)null;
  1890.         }
  1891.  
  1892.         private void SwallowPillsFunction(Ped ped)
  1893.         {
  1894.             Function.Call(Hash._0xDE2EF5DA284CC8DF, Array.Empty<InputArgument>());
  1895.             Function.Call(Hash._0xADFF1B2A555F5FBA, Array.Empty<InputArgument>());
  1896.             Function.Call(Hash._0x5A4F9EDF1673F704, (InputArgument)0);
  1897.             Function.Call(Hash._0xAC253D7842768F48, (InputArgument)0);
  1898.             string animDict = "friends@frl@ig_1";
  1899.             string animName = "drink_lamar";
  1900.             if (this.cigsAndPillsCounter > 15)
  1901.                 return;
  1902.             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName, (InputArgument)3))
  1903.             {
  1904.                 Function.Call(Hash._0x88CBB5CEB96B7BD2, (InputArgument)ped, (InputArgument)false, (InputArgument)0);
  1905.                 Function.Call(Hash._0xD75ACCF5E0FB5367, (InputArgument)ped, (InputArgument)false, (InputArgument)0);
  1906.                 if (ped.IsInCover())
  1907.                     ped.Task.ClearAllImmediately();
  1908.                 ped.Task.PlayAnimation(animDict, animName, 32f, 12000, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  1909.                 Function.Call(Hash._0x4487C259F0F70977, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName, (InputArgument)0.15f);
  1910.             }
  1911.             if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName, (InputArgument)3))
  1912.             {
  1913.                 if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) < 0.150000005960464)
  1914.                     Function.Call(Hash._0x4487C259F0F70977, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName, (InputArgument)0.15f);
  1915.                 int num1;
  1916.                 if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) >= 0.189999997615814)
  1917.                     num1 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) < 0.19149999320507 ? 1 : 0;
  1918.                 else
  1919.                     num1 = 0;
  1920.                 if (num1 != 0)
  1921.                 {
  1922.                     int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)4090);
  1923.                     Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num2, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  1924.                     int num3;
  1925.                     if ((Entity)this.pillsJar == (Entity)null)
  1926.                         num3 = Function.Call<bool>(Hash._0xBFA48E2FF417213F, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_cs_pills"), (InputArgument)0) ? 1 : 0;
  1927.                     else
  1928.                         num3 = 0;
  1929.                     if (num3 != 0)
  1930.                     {
  1931.                         Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_cs_pills"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  1932.                         if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped) && (Entity)this.pillsJar == (Entity)null)
  1933.                             this.pillsJar = prop;
  1934.                     }
  1935.                     else
  1936.                     {
  1937.                         this.pillsJar = World.CreateProp((Model)"prop_cs_pills", ped.Position, true, false);
  1938.                         Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.pillsJar, (InputArgument)ped, (InputArgument)true);
  1939.                     }
  1940.                     if (Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_cs_pills"), (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  1941.                     {
  1942.                         Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_cs_pills"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  1943.                         int num4;
  1944.                         if ((Entity)prop != (Entity)this.pillsJar)
  1945.                             num4 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped) ? 1 : 0;
  1946.                         else
  1947.                             num4 = 0;
  1948.                         if (num4 != 0 && prop.Exists())
  1949.                             prop.Delete();
  1950.                     }
  1951.                     Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.pillsJar, (InputArgument)ped, (InputArgument)num2, (InputArgument)(-0.01), (InputArgument)(-0.03), (InputArgument)(-0.02), (InputArgument)(-150.0), (InputArgument)40.0, (InputArgument)0.0, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  1952.                     this.soundFX(ped, "shakeJar.wav");
  1953.                 }
  1954.                 int num5;
  1955.                 if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) >= 0.270000010728836)
  1956.                     num5 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) < 0.271299988031387 ? 1 : 0;
  1957.                 else
  1958.                     num5 = 0;
  1959.                 if (num5 != 0)
  1960.                     this.soundFX(ped, "openJar.wav");
  1961.                 int num6;
  1962.                 if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) >= 0.550000011920929)
  1963.                     num6 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) < 0.551500022411346 ? 1 : 0;
  1964.                 else
  1965.                     num6 = 0;
  1966.                 if (num6 != 0)
  1967.                     this.soundFX(ped, "swallow.wav");
  1968.                 int num7;
  1969.                 if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) >= 0.649999976158142)
  1970.                     num7 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) < 0.65149998664856 ? 1 : 0;
  1971.                 else
  1972.                     num7 = 0;
  1973.                 if (num7 != 0)
  1974.                     this.soundFX(ped, "openJar.wav");
  1975.                 if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) >= 0.85)
  1976.                 {
  1977.                     this.soundFX(ped, "shakeJar.wav");
  1978.                     this.inProcessCigsAndPills = false;
  1979.                     this.cigsAndPillsCounter = 0;
  1980.                     this.play_swallow_pills_anim = false;
  1981.                     ped.Task.ClearAll();
  1982.                     if ((Entity)this.pillsJar != (Entity)null && this.pillsJar.Exists())
  1983.                     {
  1984.                         if (this.pillsCount <= 0)
  1985.                         {
  1986.                             Function.Call(Hash._0x961AC54BF0613F5D, (InputArgument)this.pillsJar, (InputArgument)true, (InputArgument)false);
  1987.                             this.pillsJar.MarkAsNoLongerNeeded();
  1988.                             this.pillsJar = (Prop)null;
  1989.                         }
  1990.                         else
  1991.                         {
  1992.                             this.pillsJar.Delete();
  1993.                             this.pillsJar = (Prop)null;
  1994.                         }
  1995.                     }
  1996.                     Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 3f, (Model)this.GetHashKey("prop_cs_pills"));
  1997.                     if ((uint)nearbyProps.Length > 0U)
  1998.                     {
  1999.                         foreach (Entity entity in nearbyProps)
  2000.                             entity.Delete();
  2001.                     }
  2002.                     else if (Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_cs_pills"), (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  2003.                     {
  2004.                         Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)ped.Position.X, (InputArgument)ped.Position.Y, (InputArgument)ped.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_cs_pills"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  2005.                         if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped) && prop.Exists())
  2006.                             prop.Delete();
  2007.                     }
  2008.                     Function.Call(Hash._0xB8BEC0CA6F0EDB0F, (InputArgument)ped);
  2009.                     Function.Call(Hash._0xB9EFD5C25018725A, (InputArgument)"AllowAmbientSpeechInSlowMo", (InputArgument)true);
  2010.                     Function.Call(Hash._0xBAF20C5432058024, (InputArgument)ped, (InputArgument)false);
  2011.                     Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)ped, (InputArgument)"GENERIC_DRINK", (InputArgument)"SPEECH_PARAMS_FORCE_SHOUTED");
  2012.                     if (!this.extraEffects)
  2013.                         ped.Health = ped.MaxHealth;
  2014.                     this.pillsCount -= this.rnd.Next(1, 4);
  2015.                     this.extraEffectsTimer = this.extraFXDuration;
  2016.                     this.extraEffectsStat = true;
  2017.                     this.slowMoScale = 1f;
  2018.                     Function.Call(Hash._0xBAF20C5432058024, (InputArgument)ped, (InputArgument)true);
  2019.                     Function.Call(Hash._0x67C540AA08E4A6F5, (InputArgument)(-1), (InputArgument)"FocusIn", (InputArgument)"HintCamSounds");
  2020.                     if (this.screenFX && !this.extraEffects)
  2021.                     {
  2022.                         if (!Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusIn"))
  2023.                             Function.Call(Hash._0x2206BF9A37B7F724, (InputArgument)"FocusIn", (InputArgument)100, (InputArgument)false);
  2024.                     }
  2025.                     if (!this.screenFX && this.extraEffects)
  2026.                     {
  2027.                         if (!Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusIn"))
  2028.                             Function.Call(Hash._0x2206BF9A37B7F724, (InputArgument)"FocusIn", (InputArgument)100, (InputArgument)false);
  2029.                     }
  2030.                     this.blockKeys = false;
  2031.                 }
  2032.             }
  2033.         }
  2034.  
  2035.         private void saveDoc()
  2036.         {
  2037.             this.doc.Save("scripts\\Expansion\\WeaponStash.xml");
  2038.         }
  2039.  
  2040.         private void ContactAnsweredDate(iFruitContact contact)
  2041.         {
  2042.             this.soundFX(Game.Player.Character, "beep.wav");
  2043.             this.update_inventory_status(Game.Player.Character);
  2044.             this._iFruit.Close(0);
  2045.             this.callContact.EndCall();
  2046.             if (this.deal && !this.payed)
  2047.             {
  2048.                 if (!((Entity)this.seller != (Entity)null) || (double)this.seller.Position.DistanceTo(Game.Player.Character.Position) >= 15.0 || this.payed)
  2049.                     return;
  2050.                 this.payed = true;
  2051.             }
  2052.             else
  2053.                 this.findSellerOption = true;
  2054.         }
  2055.  
  2056.         private void Setup(Ped ped)
  2057.         {
  2058.             this.modMenuPool = new MenuPool();
  2059.             this.mainMenu = new UIMenu("Inventory Menu", "Select option");
  2060.             this.modMenuPool.Add(this.mainMenu);
  2061.             this.mainMenu.OnMenuClose += new MenuCloseEvent(this.onMenuClose);
  2062.             UIMenu uiMenu1 = new UIMenu("Stash weapon", "Select Weapon");
  2063.             UIMenu uiMenu2 = new UIMenu("Take weapon", "Select Weapon");
  2064.             UIMenuColoredItem StashItem = new UIMenuColoredItem("Stash", this.btnColor1, this.btnColor2);
  2065.             StashItem.SetRightBadge(UIMenuItem.BadgeStyle.Ammo);
  2066.             StashItem.TextColor = this.btnTextColor1;
  2067.             StashItem.HighlightedTextColor = this.btnTextColor2;
  2068.             UIMenuColoredItem TakeItem = new UIMenuColoredItem("Take", this.btnColor1, this.btnColor2);
  2069.             TakeItem.SetRightBadge(UIMenuItem.BadgeStyle.Ammo);
  2070.             TakeItem.TextColor = this.btnTextColor1;
  2071.             TakeItem.HighlightedTextColor = this.btnTextColor2;
  2072.             UIMenuColoredItem RemoveBag = new UIMenuColoredItem("Take Bag off", this.btnColor1, this.btnColor2);
  2073.             UIMenuColoredItem ChangeBagPosition = new UIMenuColoredItem("Change Bag Position", this.btnColor1, this.btnColor2);
  2074.             UIMenuColoredItem SaveOutfit = new UIMenuColoredItem("Save outfit", this.btnColor1, this.btnColor2);
  2075.             UIMenuColoredItem LoadOutfit = new UIMenuColoredItem("Load outfit", this.btnColor1, this.btnColor2);
  2076.             UIMenuColoredItem CloseMenu = new UIMenuColoredItem("Exit", Color.Transparent, Color.GhostWhite);
  2077.             SaveOutfit.SetRightBadge(UIMenuItem.BadgeStyle.Clothes);
  2078.             SaveOutfit.TextColor = this.btnTextColor1;
  2079.             SaveOutfit.HighlightedTextColor = this.btnTextColor2;
  2080.             LoadOutfit.SetRightBadge(UIMenuItem.BadgeStyle.Clothes);
  2081.             LoadOutfit.TextColor = this.btnTextColor1;
  2082.             LoadOutfit.HighlightedTextColor = this.btnTextColor2;
  2083.             RemoveBag.SetRightBadge(UIMenuItem.BadgeStyle.Tick);
  2084.             CloseMenu.SetRightBadge(UIMenuItem.BadgeStyle.Lock);
  2085.             CloseMenu.TextColor = this.btnTextColor1;
  2086.             CloseMenu.HighlightedTextColor = this.btnTextColor2;
  2087.             ChangeBagPosition.SetRightBadge(UIMenuItem.BadgeStyle.Makeup);
  2088.             ChangeBagPosition.TextColor = this.btnTextColor1;
  2089.             ChangeBagPosition.HighlightedTextColor = this.btnTextColor2;
  2090.             RemoveBag.SetRightBadge(UIMenuItem.BadgeStyle.Clothes);
  2091.             RemoveBag.TextColor = this.btnTextColor1;
  2092.             RemoveBag.HighlightedTextColor = this.btnTextColor2;
  2093.             bool flag1 = false;
  2094.             string character = "";
  2095.             foreach (PedHash allPedHash in this.allPedHashes)
  2096.             {
  2097.                 if (ped.Model == (Model)allPedHash)
  2098.                 {
  2099.                     character = allPedHash.ToString();
  2100.                     flag1 = true;
  2101.                 }
  2102.             }
  2103.             if (!flag1)
  2104.                 character = ped.Model.ToString();
  2105.             if (this.doc.Element((XName)"WeaponList").Element((XName)character) == null)
  2106.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)character));
  2107.             if (!this.mainMenuListString.Contains((object)uiMenu2))
  2108.             {
  2109.                 this.mainMenuListString.Add((object)uiMenu2);
  2110.                 UIMenu uiMenu3 = this.modMenuPool.AddSubMenu(this.mainMenu, "Take Weapons");
  2111.                 this.mainMenu.CurrentSelection = 0;
  2112.                 if (this.doc.Element((XName)"WeaponList").Element((XName)character) != null && this.doc.Element((XName)"WeaponList").Element((XName)character).Elements() != null)
  2113.                 {
  2114.                     foreach (XElement element in this.doc.Element((XName)"WeaponList").Element((XName)character).Elements())
  2115.                     {
  2116.                         foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
  2117.                         {
  2118.                             int num;
  2119.                             if (element.Name.ToString() == allWeaponHash.ToString())
  2120.                             {
  2121.                                 XName name1 = element.Name;
  2122.                                 WeaponHash weaponHash = WeaponHash.Unarmed;
  2123.                                 XName xname1 = (XName)weaponHash.ToString();
  2124.                                 if (name1 != xname1)
  2125.                                 {
  2126.                                     XName name2 = element.Name;
  2127.                                     weaponHash = WeaponHash.Parachute;
  2128.                                     XName xname2 = (XName)weaponHash.ToString();
  2129.                                     num = name2 != xname2 ? 1 : 0;
  2130.                                     goto label_18;
  2131.                                 }
  2132.                             }
  2133.                             num = 0;
  2134.                         label_18:
  2135.                             if (num != 0)
  2136.                             {
  2137.                                 UIMenuCheckboxItem menuCheckboxItem = new UIMenuCheckboxItem(element.Name.ToString(), false);
  2138.                                 if (!uiMenu3.MenuItems.Contains((UIMenuItem)menuCheckboxItem))
  2139.                                     uiMenu3.AddItem((UIMenuItem)menuCheckboxItem);
  2140.                             }
  2141.                         }
  2142.                     }
  2143.                 }
  2144.                 if (!uiMenu3.MenuItems.Contains((UIMenuItem)TakeItem))
  2145.                     uiMenu3.AddItem((UIMenuItem)TakeItem);
  2146.                 uiMenu3.OnItemSelect += (ItemSelectEvent)((sender, item, index) =>
  2147.                 {
  2148.                     if (item != TakeItem)
  2149.                         return;
  2150.                     foreach (WeaponHash stashedWeapon in this.stashedWeapons)
  2151.                     {
  2152.                         if (this.doc.Element((XName)"WeaponList").Element((XName)character) != null && this.doc.Element((XName)"WeaponList").Element((XName)character).Elements() != null)
  2153.                         {
  2154.                             foreach (XElement element in this.doc.Element((XName)"WeaponList").Element((XName)character).Elements())
  2155.                             {
  2156.                                 if (element.Element((XName)"AMMO") != null)
  2157.                                 {
  2158.                                     if (element.Name == (XName)stashedWeapon.ToString())
  2159.                                     {
  2160.                                         ped.Weapons.Give(stashedWeapon, (int)element.Element((XName)"AMMO"), false, false);
  2161.                                         foreach (WeaponComponent allComponentsHash in this.allComponentsHashes)
  2162.                                         {
  2163.                                             bool flag2 = Function.Call<bool>(Hash._0x5CEE3DF569CECAB0, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allComponentsHash));
  2164.                                             if (element.Element((XName)allComponentsHash.ToString()) != null & flag2)
  2165.                                                 Function.Call(Hash._0xD966D51AA5B28BB9, (InputArgument)ped, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allComponentsHash));
  2166.                                         }
  2167.                                         foreach (WeaponTint allTintHash in this.allTintHashes)
  2168.                                         {
  2169.                                             if (element.Attribute((XName)"tint") != null && element.Attribute((XName)"tint").Value == allTintHash.ToString())
  2170.                                                 Function.Call(Hash._0x50969B9B89ED5738, (InputArgument)ped, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allTintHash));
  2171.                                         }
  2172.                                         element.Remove();
  2173.                                         this.saveDoc();
  2174.                                     }
  2175.                                 }
  2176.                                 else if (element.Name == (XName)stashedWeapon.ToString())
  2177.                                 {
  2178.                                     ped.Weapons.Give(stashedWeapon, 0, false, false);
  2179.                                     foreach (WeaponComponent allComponentsHash in this.allComponentsHashes)
  2180.                                     {
  2181.                                         bool flag2 = Function.Call<bool>(Hash._0x5CEE3DF569CECAB0, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allComponentsHash));
  2182.                                         if (element.Element((XName)allComponentsHash.ToString()) != null & flag2)
  2183.                                             Function.Call(Hash._0xD966D51AA5B28BB9, (InputArgument)ped, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allComponentsHash));
  2184.                                     }
  2185.                                     foreach (WeaponTint allTintHash in this.allTintHashes)
  2186.                                     {
  2187.                                         if (element.Attribute((XName)"tint") != null && element.Attribute((XName)"tint").Value == allTintHash.ToString())
  2188.                                             Function.Call(Hash._0x50969B9B89ED5738, (InputArgument)ped, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allTintHash));
  2189.                                     }
  2190.                                     element.Remove();
  2191.                                     this.saveDoc();
  2192.                                 }
  2193.                             }
  2194.                         }
  2195.                     }
  2196.                     this.modMenuPool.CloseAllMenus();
  2197.                     this.inMenu = false;
  2198.                     if ((Entity)this.bagModelReturn(ped) != (Entity)null)
  2199.                         this.weaponInventoryAnim(this.bagModelReturn(ped), ped);
  2200.                 });
  2201.                 uiMenu3.OnCheckboxChange += (CheckboxChangeEvent)((sender, item, index) =>
  2202.                 {
  2203.                     if (item.Checked)
  2204.                     {
  2205.                         foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
  2206.                         {
  2207.                             if (item.Text.ToString() == allWeaponHash.ToString() && !this.stashedWeapons.Contains(allWeaponHash))
  2208.                                 this.stashedWeapons.Add(allWeaponHash);
  2209.                         }
  2210.                     }
  2211.                     else
  2212.                     {
  2213.                         foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
  2214.                         {
  2215.                             if (item.Text.ToString() == allWeaponHash.ToString() && this.stashedWeapons.Contains(allWeaponHash))
  2216.                                 this.stashedWeapons.Remove(allWeaponHash);
  2217.                         }
  2218.                     }
  2219.                 });
  2220.             }
  2221.             if (!this.mainMenuListString.Contains((object)uiMenu1))
  2222.             {
  2223.                 this.mainMenuListString.Add((object)uiMenu1);
  2224.                 UIMenu uiMenu3 = this.modMenuPool.AddSubMenu(this.mainMenu, "Stash Weapons");
  2225.                 this.mainMenu.CurrentSelection = 0;
  2226.                 foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
  2227.                 {
  2228.                     if (ped.Weapons.HasWeapon(allWeaponHash))
  2229.                     {
  2230.                         UIMenuCheckboxItem menuCheckboxItem = new UIMenuCheckboxItem(allWeaponHash.ToString(), false);
  2231.                         if (!uiMenu3.MenuItems.Contains((UIMenuItem)menuCheckboxItem) && (allWeaponHash != WeaponHash.Unarmed && allWeaponHash != WeaponHash.Parachute))
  2232.                             uiMenu3.AddItem((UIMenuItem)menuCheckboxItem);
  2233.                     }
  2234.                 }
  2235.                 if (!uiMenu3.MenuItems.Contains((UIMenuItem)StashItem))
  2236.                     uiMenu3.AddItem((UIMenuItem)StashItem);
  2237.                 uiMenu3.OnItemSelect += (ItemSelectEvent)((sender, item, index) =>
  2238.                 {
  2239.                     if (item != StashItem)
  2240.                         return;
  2241.                     foreach (WeaponHash characterWeapon in this.characterWeapons)
  2242.                     {
  2243.                         XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)character);
  2244.                         int num1 = Function.Call<int>(Hash._0x015A522136D7F951, (InputArgument)ped, (InputArgument)((int)characterWeapon));
  2245.                         int num2;
  2246.                         if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)characterWeapon)) != 2685387236U)
  2247.                             num2 = Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)characterWeapon)) != 3566412244U ? 1 : 0;
  2248.                         else
  2249.                             num2 = 0;
  2250.                         if (num2 != 0)
  2251.                         {
  2252.                             if (xelement.Element((XName)characterWeapon.ToString()) == null)
  2253.                             {
  2254.                                 if (characterWeapon != WeaponHash.Unarmed)
  2255.                                 {
  2256.                                     xelement.Add((object)new XElement((XName)characterWeapon.ToString(), (object)new XElement((XName)"AMMO", (object)num1)));
  2257.                                     this.saveDoc();
  2258.                                     foreach (WeaponComponent allComponentsHash in this.allComponentsHashes)
  2259.                                     {
  2260.                                         bool flag2 = Function.Call<bool>(Hash._0xC593212475FAE340, (InputArgument)ped, (InputArgument)((int)characterWeapon), (InputArgument)((int)allComponentsHash));
  2261.                                         if (xelement.Element((XName)characterWeapon.ToString()).Element((XName)allComponentsHash.ToString()) == null & flag2)
  2262.                                         {
  2263.                                             xelement.Element((XName)characterWeapon.ToString()).Add((object)new XElement((XName)allComponentsHash.ToString()));
  2264.                                             this.saveDoc();
  2265.                                         }
  2266.                                     }
  2267.                                     foreach (WeaponTint allTintHash in this.allTintHashes)
  2268.                                     {
  2269.                                         int num3 = Function.Call<int>(Hash._0x2B9EEDC07BD06B9F, (InputArgument)ped, (InputArgument)((int)characterWeapon));
  2270.                                         if (allTintHash == (WeaponTint)num3)
  2271.                                         {
  2272.                                             if (xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint") == null)
  2273.                                             {
  2274.                                                 xelement.Element((XName)characterWeapon.ToString()).Add((object)new XAttribute((XName)"tint", (object)allTintHash.ToString()));
  2275.                                                 this.saveDoc();
  2276.                                             }
  2277.                                             else
  2278.                                             {
  2279.                                                 xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint").Value = allTintHash.ToString();
  2280.                                                 this.saveDoc();
  2281.                                             }
  2282.                                         }
  2283.                                     }
  2284.                                     if (characterWeapon != WeaponHash.Unarmed)
  2285.                                         Function.Call(Hash._0x4899CB088EDF59B8, (InputArgument)ped, (InputArgument)((int)characterWeapon));
  2286.                                 }
  2287.                             }
  2288.                             else if (xelement.Element((XName)characterWeapon.ToString()).Element((XName)"AMMO") == null)
  2289.                             {
  2290.                                 xelement.Element((XName)characterWeapon.ToString()).Add((object)new XElement((XName)"AMMO", (object)num1));
  2291.                                 this.saveDoc();
  2292.                                 foreach (WeaponComponent allComponentsHash in this.allComponentsHashes)
  2293.                                 {
  2294.                                     bool flag2 = Function.Call<bool>(Hash._0xC593212475FAE340, (InputArgument)ped, (InputArgument)((int)characterWeapon), (InputArgument)((int)allComponentsHash));
  2295.                                     if (xelement.Element((XName)characterWeapon.ToString()).Element((XName)allComponentsHash.ToString()) == null & flag2)
  2296.                                     {
  2297.                                         xelement.Element((XName)characterWeapon.ToString()).Add((object)new XElement((XName)allComponentsHash.ToString()));
  2298.                                         this.saveDoc();
  2299.                                     }
  2300.                                 }
  2301.                                 foreach (WeaponTint allTintHash in this.allTintHashes)
  2302.                                 {
  2303.                                     int num3 = Function.Call<int>(Hash._0x2B9EEDC07BD06B9F, (InputArgument)ped, (InputArgument)((int)characterWeapon));
  2304.                                     if (allTintHash == (WeaponTint)num3)
  2305.                                     {
  2306.                                         if (xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint") == null)
  2307.                                         {
  2308.                                             xelement.Element((XName)characterWeapon.ToString()).Add((object)new XAttribute((XName)"tint", (object)allTintHash.ToString()));
  2309.                                             this.saveDoc();
  2310.                                         }
  2311.                                         else
  2312.                                         {
  2313.                                             xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint").Value = allTintHash.ToString();
  2314.                                             this.saveDoc();
  2315.                                         }
  2316.                                     }
  2317.                                 }
  2318.                                 if (characterWeapon != WeaponHash.Unarmed)
  2319.                                     Function.Call(Hash._0x4899CB088EDF59B8, (InputArgument)ped, (InputArgument)((int)characterWeapon));
  2320.                             }
  2321.                             else
  2322.                             {
  2323.                                 int num3 = int.Parse(xelement.Element((XName)characterWeapon.ToString()).Element((XName)"AMMO").Value) + num1;
  2324.                                 xelement.Element((XName)characterWeapon.ToString()).Element((XName)"AMMO").Value = num3.ToString();
  2325.                                 this.saveDoc();
  2326.                                 foreach (WeaponComponent allComponentsHash in this.allComponentsHashes)
  2327.                                 {
  2328.                                     bool flag2 = Function.Call<bool>(Hash._0xC593212475FAE340, (InputArgument)ped, (InputArgument)((int)characterWeapon), (InputArgument)((int)allComponentsHash));
  2329.                                     if (xelement.Element((XName)characterWeapon.ToString()).Element((XName)allComponentsHash.ToString()) == null & flag2)
  2330.                                     {
  2331.                                         xelement.Element((XName)characterWeapon.ToString()).Add((object)new XElement((XName)allComponentsHash.ToString()));
  2332.                                         this.saveDoc();
  2333.                                     }
  2334.                                 }
  2335.                                 foreach (WeaponTint allTintHash in this.allTintHashes)
  2336.                                 {
  2337.                                     int num4 = Function.Call<int>(Hash._0x2B9EEDC07BD06B9F, (InputArgument)ped, (InputArgument)((int)characterWeapon));
  2338.                                     if (allTintHash == (WeaponTint)num4)
  2339.                                     {
  2340.                                         if (xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint") == null)
  2341.                                         {
  2342.                                             xelement.Element((XName)characterWeapon.ToString()).Add((object)new XAttribute((XName)"tint", (object)allTintHash.ToString()));
  2343.                                             this.saveDoc();
  2344.                                         }
  2345.                                         else
  2346.                                         {
  2347.                                             xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint").Value = allTintHash.ToString();
  2348.                                             this.saveDoc();
  2349.                                         }
  2350.                                     }
  2351.                                 }
  2352.                                 if (characterWeapon != WeaponHash.Unarmed)
  2353.                                     Function.Call(Hash._0x4899CB088EDF59B8, (InputArgument)ped, (InputArgument)((int)characterWeapon));
  2354.                             }
  2355.                         }
  2356.                         else
  2357.                         {
  2358.                             if (xelement.Element((XName)characterWeapon.ToString()) == null)
  2359.                             {
  2360.                                 xelement.Add((object)new XElement((XName)characterWeapon.ToString()));
  2361.                                 this.saveDoc();
  2362.                             }
  2363.                             foreach (WeaponTint allTintHash in this.allTintHashes)
  2364.                             {
  2365.                                 int num3 = Function.Call<int>(Hash._0x2B9EEDC07BD06B9F, (InputArgument)ped, (InputArgument)((int)characterWeapon));
  2366.                                 if (allTintHash == (WeaponTint)num3)
  2367.                                 {
  2368.                                     if (xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint") == null)
  2369.                                     {
  2370.                                         xelement.Element((XName)characterWeapon.ToString()).Add((object)new XAttribute((XName)"tint", (object)allTintHash.ToString()));
  2371.                                         this.saveDoc();
  2372.                                     }
  2373.                                     else
  2374.                                     {
  2375.                                         xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint").Value = allTintHash.ToString();
  2376.                                         this.saveDoc();
  2377.                                     }
  2378.                                 }
  2379.                             }
  2380.                             if (characterWeapon != WeaponHash.Unarmed)
  2381.                                 Function.Call(Hash._0x4899CB088EDF59B8, (InputArgument)ped, (InputArgument)((int)characterWeapon));
  2382.                         }
  2383.                     }
  2384.                     this.modMenuPool.CloseAllMenus();
  2385.                     this.inMenu = false;
  2386.                     if ((Entity)this.bagModelReturn(ped) != (Entity)null)
  2387.                         this.weaponInventoryAnim(this.bagModelReturn(ped), ped);
  2388.                 });
  2389.                 uiMenu3.OnCheckboxChange += (CheckboxChangeEvent)((sender, item, index) =>
  2390.                 {
  2391.                     if (item.Checked)
  2392.                     {
  2393.                         foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
  2394.                         {
  2395.                             if (ped.Weapons.HasWeapon(allWeaponHash) && item.Text.ToString() == allWeaponHash.ToString() && !this.characterWeapons.Contains(allWeaponHash))
  2396.                                 this.characterWeapons.Add(allWeaponHash);
  2397.                         }
  2398.                     }
  2399.                     else
  2400.                     {
  2401.                         foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
  2402.                         {
  2403.                             if (ped.Weapons.HasWeapon(allWeaponHash) && item.Text.ToString() == allWeaponHash.ToString() && this.characterWeapons.Contains(allWeaponHash))
  2404.                                 this.characterWeapons.Remove(allWeaponHash);
  2405.                         }
  2406.                     }
  2407.                 });
  2408.             }
  2409.             if ((Entity)this.bagModelReturn(ped) != (Entity)null)
  2410.             {
  2411.                 if (!this.mainMenu.MenuItems.Contains((UIMenuItem)RemoveBag))
  2412.                     this.mainMenu.AddItem((UIMenuItem)RemoveBag);
  2413.                 if (!this.mainMenu.MenuItems.Contains((UIMenuItem)SaveOutfit))
  2414.                     this.mainMenu.AddItem((UIMenuItem)SaveOutfit);
  2415.                 if (!this.mainMenu.MenuItems.Contains((UIMenuItem)LoadOutfit))
  2416.                     this.mainMenu.AddItem((UIMenuItem)LoadOutfit);
  2417.                 if (!this.mainMenu.MenuItems.Contains((UIMenuItem)ChangeBagPosition))
  2418.                     this.mainMenu.AddItem((UIMenuItem)ChangeBagPosition);
  2419.                 if (!this.mainMenu.MenuItems.Contains((UIMenuItem)CloseMenu))
  2420.                     this.mainMenu.AddItem((UIMenuItem)CloseMenu);
  2421.             }
  2422.             this.mainMenu.OnItemSelect += (ItemSelectEvent)((sender, item, index) =>
  2423.             {
  2424.                 if (item == RemoveBag && (Entity)this.bagModelReturn(ped) != (Entity)null)
  2425.                 {
  2426.                     this.inMenu = false;
  2427.                     Game.Player.Character.Task.ClearAll();
  2428.                     this.bagRemove(this.bagModelReturn(ped), ped);
  2429.                 }
  2430.                 if (item == SaveOutfit && (Entity)this.bagModelReturn(ped) != (Entity)null)
  2431.                 {
  2432.                     this.SaveOutfitFunc(ped);
  2433.                     this.modMenuPool.CloseAllMenus();
  2434.                     this.inMenu = false;
  2435.                 }
  2436.                 if (item == LoadOutfit && (Entity)this.bagModelReturn(ped) != (Entity)null)
  2437.                 {
  2438.                     this.LoadOutfitFunc(ped);
  2439.                     this.modMenuPool.CloseAllMenus();
  2440.                     this.inMenu = false;
  2441.                 }
  2442.                 if (item == ChangeBagPosition && (Entity)this.bagModelReturn(ped) != (Entity)null)
  2443.                 {
  2444.                     this.changedPosition = !this.changedPosition;
  2445.                     this.modMenuPool.CloseAllMenus();
  2446.                     this.inMenu = false;
  2447.                     Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
  2448.                     if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() <= 0)
  2449.                     {
  2450.                         foreach (Prop prop2 in nearbyProps)
  2451.                         {
  2452.                             if ((Entity)prop2 == (Entity)null && !changedPosition)
  2453.                             {
  2454.  
  2455.                                 prop2.IsVisible = true;
  2456.                             }
  2457.                         }
  2458.                     }
  2459.                 }
  2460.                 if (item != CloseMenu || !((Entity)this.bagModelReturn(ped) != (Entity)null))
  2461.                     return;
  2462.                 this.mainMenuListString.Clear();
  2463.                 this.stashedWeapons.Clear();
  2464.                 this.inMenu = false;
  2465.                 this.weaponInventoryAnim(this.bagModelReturn(Game.Player.Character), Game.Player.Character);
  2466.             });
  2467.         }
  2468.  
  2469.         private void onMenuClose(UIMenu sender)
  2470.         {
  2471.             if (this.modMenuPool.IsAnyMenuOpen())
  2472.                 return;
  2473.             this.modMenuPool.CloseAllMenus();
  2474.             this.inMenu = false;
  2475.         }
  2476.  
  2477.         private void UsePhoneFunc(Ped ped)
  2478.         {
  2479.             this.DisableControlsFunc(false);
  2480.             Function.Call(Hash._0xC4E2813898C97A4B, (InputArgument)false);
  2481.             Function.Call(Hash._0x015C49A93E3E086E, (InputArgument)true);
  2482.             if (Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)ped))
  2483.                 return;
  2484.             if (ped.Model == (Model)PedHash.Michael)
  2485.                 Function.Call(Hash._0xA4E8E696C532FBC7, (InputArgument)0);
  2486.             if (ped.Model == (Model)PedHash.Franklin)
  2487.                 Function.Call(Hash._0xA4E8E696C532FBC7, (InputArgument)2);
  2488.             if (ped.Model == (Model)PedHash.Trevor)
  2489.                 Function.Call(Hash._0xA4E8E696C532FBC7, (InputArgument)1);
  2490.             if (ped.Model != (Model)PedHash.Michael && ped.Model != (Model)PedHash.Franklin && ped.Model != (Model)PedHash.Trevor)
  2491.                 Function.Call(Hash._0xA4E8E696C532FBC7, (InputArgument)0);
  2492.         }
  2493.  
  2494.         private void ClosePhoneFunc(Ped ped, int ms, int ifruitCloseMS)
  2495.         {
  2496.             Script.Wait(ms);
  2497.             this._iFruit.Close(ifruitCloseMS);
  2498.             Function.Call(Hash._0x3BC861DF703E5097, Array.Empty<InputArgument>());
  2499.             ped.Task.ClearSecondary();
  2500.         }
  2501.  
  2502.         private void clearScriptFunction()
  2503.         {
  2504.             this.deal = false;
  2505.             this.greeting = false;
  2506.             this.greetingFinished = false;
  2507.             this.followCamera = false;
  2508.             this.canceled = false;
  2509.             this.sellerAvailableItems = 0;
  2510.             if ((Entity)this.seller != (Entity)null && this.seller.Exists())
  2511.             {
  2512.                 this.blipHandle(false, (Entity)this.seller, this.sellerBlip, "", 0.0f, 0, false, false);
  2513.                 Prop[] nearbyProps = World.GetNearbyProps(this.seller.Position, 10f, (Model)this.GetHashKey(this.bagModel));
  2514.                 if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
  2515.                 {
  2516.                     foreach (Prop prop in nearbyProps)
  2517.                     {
  2518.                         if (prop.IsAttachedTo((Entity)this.seller))
  2519.                             prop.Delete();
  2520.                     }
  2521.                 }
  2522.                 this.seller.MarkAsNoLongerNeeded();
  2523.                 this.seller = (Ped)null;
  2524.             }
  2525.             this.payed = false;
  2526.             Game.Pause(false);
  2527.             Game.Player.CanControlCharacter = true;
  2528.             Game.Player.Character.Task.ClearAll();
  2529.             World.RenderingCamera = (Camera)null;
  2530.         }
  2531.  
  2532.         private void sellerDialogFunc(
  2533.           int counter,
  2534.           bool holster_purchase,
  2535.           bool bag_purchase,
  2536.           bool supplies_purchase,
  2537.           Ped dealer)
  2538.         {
  2539.             if (this.payed)
  2540.             {
  2541.                 Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GENERIC_THANKS", (InputArgument)"SPEECH_PARAMS_FORCE");
  2542.                 Script.Wait(1000);
  2543.                 Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)dealer, (InputArgument)"GENERIC_BYE", (InputArgument)"SPEECH_PARAMS_FORCE");
  2544.                 if (this.TotalPrice + this.TotalPrice / 100 * 5 > 0)
  2545.                 {
  2546.                     this.Notify("MAZE", (this.TotalPrice + this.TotalPrice / 100 * 5).ToString() + "~g~ $ ~w~Transaction ~g~successfully ~w~completed", (int)byte.MaxValue, 0, 0, "CHAR_BANK_MAZE");
  2547.                     Game.Player.Money -= this.TotalPrice + this.TotalPrice / 100 * 5;
  2548.                     this.Notify("MAZE", "Payment transaction ~o~5%~w~ has been discharged", (int)byte.MaxValue, 0, 0, "CHAR_BANK_MAZE");
  2549.                     this.Notify("MAZE", "Thank you for using our service!", (int)byte.MaxValue, 0, 0, "CHAR_BANK_MAZE");
  2550.                 }
  2551.                 Function.Call(Hash._0xB138AAB8A70D3C69, (InputArgument)"TREVOR_SMALL_01");
  2552.                 if (bag_purchase)
  2553.                 {
  2554.                     this.ClearInventoryData(Game.Player.Character);
  2555.                     this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
  2556.                     Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  2557.                     UI.Notify("Dufflebag has benn ~g~purchased", true);
  2558.                 }
  2559.                 if (supplies_purchase)
  2560.                 {
  2561.                     int num1 = this.maxPills - this.pillsCount;
  2562.                     int num2 = this.maxCigs - this.cigsCount;
  2563.                     if (this.pillsCount < this.maxPills)
  2564.                     {
  2565.                         Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  2566.                         this.pillsCount = this.maxPills;
  2567.                         UI.Notify("~g~+" + num1.ToString() + " ~w~Pills", true);
  2568.                     }
  2569.                     if (this.cigsCount < this.maxCigs)
  2570.                     {
  2571.                         Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  2572.                         this.cigsCount = this.maxCigs;
  2573.                         UI.Notify("~g~+" + num2.ToString() + " ~w~Cigs", true);
  2574.                     }
  2575.                 }
  2576.                 if (holster_purchase)
  2577.                 {
  2578.                     this.SaveHolster(Game.Player.Character);
  2579.                     Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  2580.                     UI.Notify("Holster has benn ~g~purchased", true);
  2581.                 }
  2582.             }
  2583.             this.clearScriptFunction();
  2584.             Game.Player.Character.Task.ClearAll();
  2585.             this.buyBag = false;
  2586.             this.buyHolster = false;
  2587.             this.buySupplies = false;
  2588.         }
  2589.  
  2590.  
  2591.  
  2592.         private void CreateSeller(Vector3 location)
  2593.         {
  2594.             Ped[] nearbyPeds = World.GetNearbyPeds(location, 125f, (Model)PedHash.Dealer01SMY);
  2595.             this.seller = (Ped)null;
  2596.             bool flag1 = false;
  2597.             if (((IEnumerable<Ped>)nearbyPeds).Count<Ped>() > 0)
  2598.             {
  2599.                 foreach (Ped ped in nearbyPeds)
  2600.                 {
  2601.                     if ((Entity)ped != (Entity)null && ped.IsAlive && ped.Exists())
  2602.                     {
  2603.                         this.seller = ped;
  2604.                         flag1 = true;
  2605.                         break;
  2606.                     }
  2607.                 }
  2608.             }
  2609.             if (!flag1)
  2610.                 this.seller = World.CreatePed((Model)PedHash.Dealer01SMY, location);
  2611.             if (!((Entity)this.seller != (Entity)null))
  2612.                 return;
  2613.             this.blipHandle(true, (Entity)this.seller, this.sellerBlip, "Dealer", 0.9f, 220, true, true);
  2614.             DisplayHelpTextThisFrame("~BLIP_INFO_ICON~ The closest ~g~Dealer's ~w~location has been ~y~marked on your ~p~Map");
  2615.             Function.Call(Hash._0xAD738C3085FE7E11, (InputArgument)this.seller, (InputArgument)true);
  2616.             this.greeting = false;
  2617.             this.greetingFinished = false;
  2618.             this.deal = false;
  2619.             this.payed = false;
  2620.             this.buyBag = false;
  2621.             this.buyHolster = false;
  2622.             this.buySupplies = false;
  2623.             Prop[] nearbyProps = World.GetNearbyProps(location, 2.5f, (Model)this.GetHashKey(this.bagModel));
  2624.             Prop prop1 = (Prop)null;
  2625.             bool flag2 = false;
  2626.             this.sellerDialogCounter = 3;
  2627.             if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
  2628.             {
  2629.                 foreach (Prop prop2 in nearbyProps)
  2630.                 {
  2631.                     if (!prop2.IsAttached() && !prop2.IsAttachedTo((Entity)this.seller) && !prop2.IsAttachedTo((Entity)Game.Player.Character))
  2632.                     {
  2633.                         prop1 = prop2;
  2634.                         flag2 = true;
  2635.                     }
  2636.                 }
  2637.             }
  2638.             if (!flag2)
  2639.                 prop1 = World.CreateProp((Model)this.GetHashKey(this.bagModel), location, true, true);
  2640.             if ((Entity)prop1 != (Entity)null && (!prop1.IsAttached() && !prop1.IsAttachedTo((Entity)this.seller) && !prop1.IsAttachedTo((Entity)Game.Player.Character)))
  2641.             {
  2642.                 int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)this.seller, (InputArgument)57005);
  2643.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)prop1, (InputArgument)this.seller, (InputArgument)num, (InputArgument)0.35f, (InputArgument)0.13f, (InputArgument)(-0.18f), (InputArgument)45.8999f, (InputArgument)84.6992f, (InputArgument)180.1992f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)true, (InputArgument)2, (InputArgument)true);
  2644.             }
  2645.  
  2646.             void DisplayHelpTextThisFrame(string text)
  2647.             {
  2648.                 Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
  2649.                 Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
  2650.                 Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
  2651.             }
  2652.         }
  2653.  
  2654.         private void blipsRemove(BlipSprite sprite)
  2655.         {
  2656.             Blip[] activeBlips = World.GetActiveBlips();
  2657.             if (activeBlips == null || (uint)activeBlips.Length <= 0U)
  2658.                 return;
  2659.             foreach (Blip blip in activeBlips)
  2660.             {
  2661.                 if (blip.Sprite == sprite)
  2662.                     blip.Remove();
  2663.             }
  2664.         }
  2665.  
  2666.         private void checkBagVisibility(Ped ped)
  2667.         {
  2668.             if (!((Entity)this.bagModelReturn(ped) != (Entity)null))
  2669.                 return;
  2670.             if (ped.IsVisible)
  2671.             {
  2672.                 if (!this.bagModelReturn(ped).IsVisible)
  2673.                 {
  2674.                     this.bagModelReturn(ped).IsVisible = true;
  2675.                     Prop prop1 = this.bagModelReturn(ped);
  2676.                     if (this.drawStrap)
  2677.                     {
  2678.                         Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
  2679.                         if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
  2680.                         {
  2681.                             foreach (Prop prop2 in nearbyProps)
  2682.                             {
  2683.                                 if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)prop1) && !this.changedPosition)
  2684.                                     prop2.IsVisible = true;
  2685.                             }
  2686.                         }
  2687.                     }
  2688.                 }
  2689.             }
  2690.             else if (this.bagModelReturn(ped).IsVisible)
  2691.             {
  2692.                 this.bagModelReturn(ped).IsVisible = false;
  2693.                 Prop prop1 = this.bagModelReturn(ped);
  2694.                 if (this.drawStrap)
  2695.                 {
  2696.                     Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
  2697.                     if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
  2698.                     {
  2699.                         foreach (Prop prop2 in nearbyProps)
  2700.                         {
  2701.                             if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)prop1))
  2702.                                 prop2.IsVisible = false;
  2703.                         }
  2704.                     }
  2705.                 }
  2706.             }
  2707.         }
  2708.  
  2709.         private bool IsCurrentWeaponBig(WeaponHash weapon)
  2710.         {
  2711.             int num;
  2712.             if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 970310034U)
  2713.             {
  2714.                 if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 2725924767U)
  2715.                 {
  2716.                     if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 1159398588U)
  2717.                     {
  2718.                         if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 1595662460U)
  2719.                         {
  2720.                             if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 860033945U)
  2721.                             {
  2722.                                 if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 3337201093U)
  2723.                                 {
  2724.                                     if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 3082541095U)
  2725.                                     {
  2726.                                         num = Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) == 1548507267U ? 1 : 0;
  2727.                                         goto label_9;
  2728.                                     }
  2729.                                 }
  2730.                             }
  2731.                         }
  2732.                     }
  2733.                 }
  2734.             }
  2735.             num = 1;
  2736.         label_9:
  2737.             return num != 0;
  2738.         }
  2739.  
  2740.         private bool DoesPedHasBigWeapons(Ped ped)
  2741.         {
  2742.             bool flag = false;
  2743.             foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
  2744.             {
  2745.                 if (ped.Weapons.HasWeapon(allWeaponHash) && this.IsCurrentWeaponBig(allWeaponHash))
  2746.                     flag = true;
  2747.             }
  2748.             return flag;
  2749.         }
  2750.  
  2751.         private void blipHandle(
  2752.           bool add,
  2753.           Entity entity,
  2754.           BlipSprite sprite,
  2755.           string name,
  2756.           float scale,
  2757.           int alpha,
  2758.           bool flashing,
  2759.           bool showRoute)
  2760.         {
  2761.             if (!(entity != (Entity)null) || !entity.Exists())
  2762.                 return;
  2763.             if (add)
  2764.             {
  2765.                 if (!entity.CurrentBlip.Exists())
  2766.                     entity.AddBlip();
  2767.                 if (entity.CurrentBlip.Exists())
  2768.                 {
  2769.                     entity.CurrentBlip.Sprite = sprite;
  2770.                     entity.CurrentBlip.Name = name;
  2771.                     entity.CurrentBlip.Scale = scale;
  2772.                     entity.CurrentBlip.Alpha = alpha;
  2773.                     entity.CurrentBlip.IsFlashing = flashing;
  2774.                     entity.CurrentBlip.ShowRoute = showRoute;
  2775.                 }
  2776.             }
  2777.             else if (entity.CurrentBlip.Exists())
  2778.                 entity.CurrentBlip.Remove();
  2779.         }
  2780.  
  2781.         private bool DoesDroppedBagExist(Ped ped)
  2782.         {
  2783.             bool flag1 = false;
  2784.             if (this.getDroppedBag(ped) != (Entity)null)
  2785.             {
  2786.                 flag1 = true;
  2787.             }
  2788.             else
  2789.             {
  2790.                 bool flag2 = false;
  2791.                 string str = "";
  2792.                 foreach (PedHash allPedHash in this.allPedHashes)
  2793.                 {
  2794.                     if (ped.Model == (Model)allPedHash)
  2795.                     {
  2796.                         str = allPedHash.ToString();
  2797.                         flag2 = true;
  2798.                     }
  2799.                 }
  2800.                 if (!flag2)
  2801.                     str = ped.Model.ToString();
  2802.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  2803.                     this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  2804.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"bag") != null && (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place") != null && this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place").Element((XName)"Vehicle") != null))
  2805.                 {
  2806.                     XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place").Element((XName)"Vehicle");
  2807.                     foreach (Vehicle allVehicle in World.GetAllVehicles())
  2808.                     {
  2809.                         Function.Call<string>(Hash._0x7CE1CCB9B293020E, (InputArgument)allVehicle);
  2810.                         Function.Call<string>(Hash._0xB215AAC32D25D019, (InputArgument)allVehicle);
  2811.                         if (allVehicle.DisplayName == xelement.Attribute((XName)"Name").Value && allVehicle.NumberPlate == xelement.Attribute((XName)"Plate").Value)
  2812.                         {
  2813.                             this.blipHandle(true, (Entity)allVehicle, BlipSprite.Information, "Dufflebag", 0.85f, 200, true, false);
  2814.                             flag1 = true;
  2815.                             break;
  2816.                         }
  2817.                     }
  2818.                 }
  2819.             }
  2820.             return flag1;
  2821.         }
  2822.  
  2823.         private Entity getDroppedBag(Ped ped)
  2824.         {
  2825.             Entity entity = (Entity)null;
  2826.             bool flag = false;
  2827.             string str = "";
  2828.             foreach (PedHash allPedHash in this.allPedHashes)
  2829.             {
  2830.                 if (ped.Model == (Model)allPedHash)
  2831.                 {
  2832.                     str = allPedHash.ToString();
  2833.                     flag = true;
  2834.                 }
  2835.             }
  2836.             if (!flag)
  2837.                 str = ped.Model.ToString();
  2838.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  2839.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  2840.             XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str);
  2841.             if (xelement.Attribute((XName)"bag") != null && xelement.Element((XName)"place") != null)
  2842.             {
  2843.                 if (xelement.Element((XName)"place").Element((XName)"Location") != null)
  2844.                 {
  2845.                     if (xelement.Element((XName)"place").Element((XName)"Location").Attribute((XName)"X") != null && xelement.Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y") != null && xelement.Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z") != null)
  2846.                     {
  2847.                         float result1;
  2848.                         float.TryParse(xelement.Element((XName)"place").Element((XName)"Location").Attribute((XName)"X").Value, NumberStyles.Float, (IFormatProvider)new CultureInfo("en-US"), out result1);
  2849.                         float result2;
  2850.                         float.TryParse(xelement.Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y").Value, NumberStyles.Float, (IFormatProvider)new CultureInfo("en-US"), out result2);
  2851.                         float result3;
  2852.                         float.TryParse(xelement.Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z").Value, NumberStyles.Float, (IFormatProvider)new CultureInfo("en-US"), out result3);
  2853.                         Vector3 position = new Vector3(result1, result2, result3);
  2854.                         Prop[] nearbyProps = World.GetNearbyProps(position, 2f, (Model)this.stashedBagModel);
  2855.                         if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
  2856.                         {
  2857.                             foreach (Prop prop in nearbyProps)
  2858.                             {
  2859.                                 if (!prop.IsAttached())
  2860.                                 {
  2861.                                     entity = (Entity)prop;
  2862.                                     break;
  2863.                                 }
  2864.                             }
  2865.                         }
  2866.                         else
  2867.                             entity = (Entity)World.CreateProp((Model)this.stashedBagModel, new Vector3(position.X, position.Y, position.Z - 1f), true, false);
  2868.                     }
  2869.                 }
  2870.                 else if (xelement.Element((XName)"place").Element((XName)"Vehicle") != null)
  2871.                 {
  2872.                     foreach (Vehicle allVehicle in World.GetAllVehicles())
  2873.                     {
  2874.                         Function.Call<string>(Hash._0x7CE1CCB9B293020E, (InputArgument)allVehicle);
  2875.                         Function.Call<string>(Hash._0xB215AAC32D25D019, (InputArgument)allVehicle);
  2876.                         if (allVehicle.DisplayName == xelement.Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name").Value && allVehicle.NumberPlate == xelement.Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate").Value)
  2877.                         {
  2878.                             entity = (Entity)allVehicle;
  2879.                             break;
  2880.                         }
  2881.                     }
  2882.                 }
  2883.             }
  2884.             return entity;
  2885.         }
  2886.  
  2887.         private void clearTrash()
  2888.         {
  2889.             Prop[] allProps1 = World.GetAllProps((Model)this.bagModel);
  2890.             Prop[] allProps2 = World.GetAllProps((Model)this.bagModelFull);
  2891.             Prop[] allProps3 = World.GetAllProps((Model)this.stashedBagModel);
  2892.             if (((IEnumerable<Prop>)allProps1).Count<Prop>() > 0)
  2893.             {
  2894.                 foreach (Prop prop in allProps1)
  2895.                 {
  2896.                     int num;
  2897.                     if (!prop.IsAttached())
  2898.                         num = !Function.Call<bool>(Hash._0x0A7B270912999B3C, (InputArgument)prop) ? 1 : 0;
  2899.                     else
  2900.                         num = 0;
  2901.                     if (num != 0)
  2902.                         prop.Delete();
  2903.                     else if (((IEnumerable<Prop>)allProps1).Count<Prop>() > 1)
  2904.                         prop.Delete();
  2905.                 }
  2906.             }
  2907.             if (((IEnumerable<Prop>)allProps2).Count<Prop>() > 0)
  2908.             {
  2909.                 foreach (Prop prop in allProps2)
  2910.                 {
  2911.                     int num;
  2912.                     if (!prop.IsAttached())
  2913.                         num = !Function.Call<bool>(Hash._0x0A7B270912999B3C, (InputArgument)prop) ? 1 : 0;
  2914.                     else
  2915.                         num = 0;
  2916.                     if (num != 0)
  2917.                         prop.Delete();
  2918.                     else if (((IEnumerable<Prop>)allProps1).Count<Prop>() > 1)
  2919.                         prop.Delete();
  2920.                 }
  2921.             }
  2922.             if (((IEnumerable<Prop>)allProps3).Count<Prop>() > 0)
  2923.             {
  2924.                 foreach (Prop prop in allProps3)
  2925.                 {
  2926.                     int num;
  2927.                     if (!prop.IsAttached())
  2928.                         num = !Function.Call<bool>(Hash._0x0A7B270912999B3C, (InputArgument)prop) ? 1 : 0;
  2929.                     else
  2930.                         num = 0;
  2931.                     if (num != 0)
  2932.                         prop.Delete();
  2933.                     else if (((IEnumerable<Prop>)allProps1).Count<Prop>() > 1)
  2934.                         prop.Delete();
  2935.                 }
  2936.             }
  2937.             if (!this.drawStrap)
  2938.                 return;
  2939.             Prop[] allProps4 = World.GetAllProps((Model)"prop_cs_heist_bag_strap_01");
  2940.             if (((IEnumerable<Prop>)allProps4).Count<Prop>() > 0)
  2941.             {
  2942.                 foreach (Prop prop in allProps4)
  2943.                 {
  2944.                     int num;
  2945.                     if (!prop.IsAttached())
  2946.                         num = !Function.Call<bool>(Hash._0x0A7B270912999B3C, (InputArgument)prop) ? 1 : 0;
  2947.                     else
  2948.                         num = 0;
  2949.                     if (num != 0)
  2950.                         prop.Delete();
  2951.                 }
  2952.             }
  2953.         }
  2954.  
  2955.         private void ClearInventoryData(Ped ped)
  2956.         {
  2957.             bool flag = false;
  2958.             string str = "";
  2959.             foreach (PedHash allPedHash in this.allPedHashes)
  2960.             {
  2961.                 if (ped.Model == (Model)allPedHash)
  2962.                 {
  2963.                     str = allPedHash.ToString();
  2964.                     flag = true;
  2965.                 }
  2966.             }
  2967.             if (!flag)
  2968.                 str = ped.Model.ToString();
  2969.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  2970.                 return;
  2971.             this.doc.Element((XName)"WeaponList").Element((XName)str).Descendants().Remove<XElement>();
  2972.         }
  2973.  
  2974.         private bool doesPedHasInventoryBag(Ped ped)
  2975.         {
  2976.             bool flag = false;
  2977.             string str = "";
  2978.             foreach (PedHash allPedHash in this.allPedHashes)
  2979.             {
  2980.                 if (ped.Model == (Model)allPedHash)
  2981.                 {
  2982.                     str = allPedHash.ToString();
  2983.                     flag = true;
  2984.                 }
  2985.             }
  2986.             if (!flag)
  2987.                 str = ped.Model.ToString();
  2988.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  2989.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  2990.             XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str);
  2991.             return xelement.Attribute((XName)"bag") != null && xelement.Attribute((XName)"bag").Value == "true";
  2992.         }
  2993.  
  2994.         private string bagModelCheck(Ped ped)
  2995.         {
  2996.             List<WeaponHash> weaponHashList = new List<WeaponHash>();
  2997.             bool flag = false;
  2998.             string str = "";
  2999.             foreach (PedHash allPedHash in this.allPedHashes)
  3000.             {
  3001.                 if (ped.Model == (Model)allPedHash)
  3002.                 {
  3003.                     str = allPedHash.ToString();
  3004.                     flag = true;
  3005.                 }
  3006.             }
  3007.             if (!flag)
  3008.                 str = ped.Model.ToString();
  3009.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  3010.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  3011.             XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str);
  3012.             if (xelement.Elements() != null)
  3013.             {
  3014.                 foreach (XElement element in xelement.Elements())
  3015.                 {
  3016.                     foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
  3017.                     {
  3018.                         if (allWeaponHash.ToString() == element.Name.ToString() && this.IsCurrentWeaponBig(allWeaponHash) && !weaponHashList.Contains(allWeaponHash))
  3019.                             weaponHashList.Add(allWeaponHash);
  3020.                     }
  3021.                 }
  3022.             }
  3023.             return weaponHashList.Count <= 3 ? this.bagModel : this.bagModelFull;
  3024.         }
  3025.  
  3026.         private bool doesPedWearingBag(Ped ped)
  3027.         {
  3028.             return (Entity)this.bagModelReturn(ped) != (Entity)null;
  3029.         }
  3030.  
  3031.         private void outfit_XML_Element_Handle_Func(
  3032.           Ped ped,
  3033.           string elem,
  3034.           int id,
  3035.           int model,
  3036.           int texture,
  3037.           bool isProp)
  3038.         {
  3039.             bool flag = false;
  3040.             string str = "";
  3041.             XElement xelement = (XElement)null;
  3042.             foreach (PedHash allPedHash in this.allPedHashes)
  3043.             {
  3044.                 if (ped.Model == (Model)allPedHash)
  3045.                 {
  3046.                     str = allPedHash.ToString();
  3047.                     flag = true;
  3048.                 }
  3049.             }
  3050.             if (!flag)
  3051.                 str = ped.Model.ToString();
  3052.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  3053.             {
  3054.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  3055.                 this.saveDoc();
  3056.             }
  3057.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) != null)
  3058.             {
  3059.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit") == null)
  3060.                 {
  3061.                     this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XElement((XName)"Outfit"));
  3062.                     this.saveDoc();
  3063.                     xelement = this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit");
  3064.                 }
  3065.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit") != null)
  3066.                     xelement = this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit");
  3067.             }
  3068.             if (xelement == null)
  3069.                 return;
  3070.             if (xelement.Element((XName)elem) == null)
  3071.             {
  3072.                 xelement.Add((object)new XElement((XName)elem, (object)new XElement((XName)"ID", (object)id)));
  3073.                 xelement.Element((XName)elem).Add((object)new XElement((XName)"Model", (object)model));
  3074.                 xelement.Element((XName)elem).Add((object)new XElement((XName)"Variation", (object)texture));
  3075.                 if (xelement.Element((XName)elem).Attribute((XName)nameof(isProp)) == null)
  3076.                 {
  3077.                     xelement.Element((XName)elem).Add((object)new XAttribute((XName)nameof(isProp), (object)isProp));
  3078.                     this.saveDoc();
  3079.                 }
  3080.                 else
  3081.                 {
  3082.                     xelement.Element((XName)elem).Attribute((XName)nameof(isProp)).SetValue((object)isProp);
  3083.                     this.saveDoc();
  3084.                 }
  3085.                 this.saveDoc();
  3086.             }
  3087.             else
  3088.             {
  3089.                 if (xelement.Element((XName)elem).Attribute((XName)nameof(isProp)) == null)
  3090.                 {
  3091.                     xelement.Element((XName)elem).Add((object)new XAttribute((XName)nameof(isProp), (object)isProp));
  3092.                     this.saveDoc();
  3093.                 }
  3094.                 else
  3095.                 {
  3096.                     xelement.Element((XName)elem).Attribute((XName)nameof(isProp)).SetValue((object)isProp);
  3097.                     this.saveDoc();
  3098.                 }
  3099.                 if (xelement.Element((XName)elem).Element((XName)"ID") == null)
  3100.                 {
  3101.                     xelement.Element((XName)elem).Add((object)new XElement((XName)"ID", (object)id));
  3102.                     this.saveDoc();
  3103.                 }
  3104.                 else
  3105.                 {
  3106.                     xelement.Element((XName)elem).Element((XName)"Model").SetValue((object)model);
  3107.                     this.saveDoc();
  3108.                 }
  3109.                 if (xelement.Element((XName)elem).Element((XName)"Model") == null)
  3110.                 {
  3111.                     xelement.Element((XName)elem).Add((object)new XElement((XName)"Model", (object)model));
  3112.                     this.saveDoc();
  3113.                 }
  3114.                 else
  3115.                 {
  3116.                     xelement.Element((XName)elem).Element((XName)"Variation").SetValue((object)texture);
  3117.                     this.saveDoc();
  3118.                 }
  3119.                 if (xelement.Element((XName)elem).Element((XName)"Variation") == null)
  3120.                 {
  3121.                     xelement.Element((XName)elem).Add((object)new XElement((XName)"Variation", (object)texture));
  3122.                     this.saveDoc();
  3123.                 }
  3124.                 else
  3125.                 {
  3126.                     xelement.Element((XName)elem).Element((XName)"Variation").SetValue((object)texture);
  3127.                     this.saveDoc();
  3128.                 }
  3129.             }
  3130.         }
  3131.  
  3132.         private void read_XML_element_outfit_func(Ped ped, string elem, int id, bool isProp)
  3133.         {
  3134.             bool flag = false;
  3135.             string str = "";
  3136.             XElement xelement = (XElement)null;
  3137.             foreach (PedHash allPedHash in this.allPedHashes)
  3138.             {
  3139.                 if (ped.Model == (Model)allPedHash)
  3140.                 {
  3141.                     str = allPedHash.ToString();
  3142.                     flag = true;
  3143.                 }
  3144.             }
  3145.             if (!flag)
  3146.                 str = ped.Model.ToString();
  3147.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  3148.             {
  3149.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  3150.                 this.saveDoc();
  3151.             }
  3152.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) != null)
  3153.             {
  3154.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit") == null)
  3155.                 {
  3156.                     this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XElement((XName)"Outfit"));
  3157.                     this.saveDoc();
  3158.                     xelement = this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit");
  3159.                 }
  3160.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit") != null)
  3161.                     xelement = this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit");
  3162.             }
  3163.             if (xelement == null || xelement.Element((XName)elem) == null || (xelement.Element((XName)elem).Element((XName)"Model") == null || xelement.Element((XName)elem).Element((XName)"Variation") == null))
  3164.                 return;
  3165.             int int32_1 = Convert.ToInt32(xelement.Element((XName)elem).Element((XName)"Model").Value);
  3166.             int int32_2 = Convert.ToInt32(xelement.Element((XName)elem).Element((XName)"Variation").Value);
  3167.             if (!isProp)
  3168.             {
  3169.                 if (Function.Call<bool>(Hash._0xE825F6B6CEA7671D, (InputArgument)ped, (InputArgument)id, (InputArgument)int32_1, (InputArgument)int32_2))
  3170.                     Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)ped, (InputArgument)id, (InputArgument)int32_1, (InputArgument)int32_2);
  3171.             }
  3172.             else if (Function.Call<bool>(Hash._0x2B16A3BFF1FBCE49, (InputArgument)ped, (InputArgument)id, (InputArgument)int32_1, (InputArgument)int32_2))
  3173.             {
  3174.                 if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)id) != -1)
  3175.                     Function.Call(Hash._0x93376B65A266EB5F, (InputArgument)ped, (InputArgument)id, (InputArgument)int32_1, (InputArgument)int32_2);
  3176.             }
  3177.         }
  3178.  
  3179.         private void LoadOutfitFunc(Ped ped)
  3180.         {
  3181.             if (!Game.IsScreenFadedOut && Game.IsScreenFadedIn)
  3182.             {
  3183.                 Game.FadeScreenOut(1000);
  3184.                 Script.Wait(2500);
  3185.                 this.read_XML_element_outfit_func(ped, "Head", 0, true);
  3186.                 this.read_XML_element_outfit_func(ped, "Eyes", 1, true);
  3187.                 this.read_XML_element_outfit_func(ped, "Ears", 2, true);
  3188.                 this.read_XML_element_outfit_func(ped, "Torso", 3, false);
  3189.                 this.read_XML_element_outfit_func(ped, "Hands", 5, false);
  3190.                 this.read_XML_element_outfit_func(ped, "Legs", 4, false);
  3191.                 this.read_XML_element_outfit_func(ped, "Feet", 6, false);
  3192.                 this.read_XML_element_outfit_func(ped, "Unknown", 7, false);
  3193.                 this.read_XML_element_outfit_func(ped, "Accessories", 8, false);
  3194.                 this.read_XML_element_outfit_func(ped, "Accessories2", 9, false);
  3195.                 this.read_XML_element_outfit_func(ped, "Decals", 10, false);
  3196.                 this.read_XML_element_outfit_func(ped, "Jbib", 11, false);
  3197.                 Game.FadeScreenIn(1000);
  3198.                 this.soundFX(ped, "noise.wav");
  3199.             }
  3200.             Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  3201.             UI.Notify("Outfit has been ~g~Successfully~w~ Loaded", true);
  3202.         }
  3203.  
  3204.         private void SaveOutfitFunc(Ped ped)
  3205.         {
  3206.             int model1 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0);
  3207.             int texture1 = Function.Call<int>(Hash._0xE131A28626F81AB2, (InputArgument)ped, (InputArgument)0);
  3208.             int model2 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)1);
  3209.             int texture2 = Function.Call<int>(Hash._0xE131A28626F81AB2, (InputArgument)ped, (InputArgument)1);
  3210.             int model3 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)2);
  3211.             int texture3 = Function.Call<int>(Hash._0xE131A28626F81AB2, (InputArgument)ped, (InputArgument)2);
  3212.             int model4 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)3);
  3213.             int texture4 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)3);
  3214.             int model5 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)5);
  3215.             int texture5 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)5);
  3216.             int model6 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)4);
  3217.             int texture6 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)4);
  3218.             int model7 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)6);
  3219.             int texture7 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)6);
  3220.             int model8 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)7);
  3221.             int texture8 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)7);
  3222.             int model9 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8);
  3223.             int texture9 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)8);
  3224.             int model10 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9);
  3225.             int texture10 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)9);
  3226.             int model11 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)10);
  3227.             int texture11 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)10);
  3228.             int model12 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)11);
  3229.             int texture12 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)11);
  3230.             this.outfit_XML_Element_Handle_Func(ped, "Head", 0, model1, texture1, true);
  3231.             this.outfit_XML_Element_Handle_Func(ped, "Eyes", 1, model2, texture2, true);
  3232.             this.outfit_XML_Element_Handle_Func(ped, "Ears", 2, model3, texture3, true);
  3233.             this.outfit_XML_Element_Handle_Func(ped, "Torso", 3, model4, texture4, false);
  3234.             this.outfit_XML_Element_Handle_Func(ped, "Hands", 5, model5, texture5, false);
  3235.             this.outfit_XML_Element_Handle_Func(ped, "Legs", 4, model6, texture6, false);
  3236.             this.outfit_XML_Element_Handle_Func(ped, "Feet", 6, model7, texture7, false);
  3237.             this.outfit_XML_Element_Handle_Func(ped, "Unknown", 7, model8, texture8, false);
  3238.             this.outfit_XML_Element_Handle_Func(ped, "Accessories", 8, model9, texture9, false);
  3239.             this.outfit_XML_Element_Handle_Func(ped, "Accessories2", 9, model10, texture10, false);
  3240.             this.outfit_XML_Element_Handle_Func(ped, "Decals", 10, model11, texture11, false);
  3241.             this.outfit_XML_Element_Handle_Func(ped, "Jbib", 11, model12, texture12, false);
  3242.             Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  3243.             UI.Notify("Outfit has been ~g~Successfully~w~ Saved", true);
  3244.         }
  3245.  
  3246.         private Prop bagModelReturn(Ped ped)
  3247.         {
  3248.             Prop[] nearbyProps1 = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey(this.bagModel));
  3249.             Prop[] nearbyProps2 = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey(this.bagModelFull));
  3250.             Prop prop1 = (Prop)null;
  3251.             if (((IEnumerable<Prop>)nearbyProps1).Count<Prop>() > 0)
  3252.             {
  3253.                 foreach (Prop prop2 in nearbyProps1)
  3254.                 {
  3255.                     if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)ped))
  3256.                         prop1 = prop2;
  3257.                 }
  3258.             }
  3259.             else if (((IEnumerable<Prop>)nearbyProps2).Count<Prop>() > 0)
  3260.             {
  3261.                 foreach (Prop prop2 in nearbyProps2)
  3262.                 {
  3263.                     if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)ped))
  3264.                         prop1 = prop2;
  3265.                 }
  3266.             }
  3267.             else
  3268.                 prop1 = (Prop)null;
  3269.             return prop1;
  3270.         }
  3271.  
  3272.         private bool VehicleWithBag(Ped ped)
  3273.         {
  3274.             bool flag1 = false;
  3275.             bool flag2 = false;
  3276.             string str = "";
  3277.             foreach (PedHash allPedHash in this.allPedHashes)
  3278.             {
  3279.                 if (ped.Model == (Model)allPedHash)
  3280.                 {
  3281.                     str = allPedHash.ToString();
  3282.                     flag2 = true;
  3283.                 }
  3284.             }
  3285.             if (!flag2)
  3286.                 str = ped.Model.ToString();
  3287.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  3288.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  3289.             XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str);
  3290.             if ((Entity)ped.CurrentVehicle != (Entity)null)
  3291.             {
  3292.                 Function.Call<string>(Hash._0x7CE1CCB9B293020E, (InputArgument)ped.CurrentVehicle);
  3293.                 Function.Call<string>(Hash._0xB215AAC32D25D019, (InputArgument)ped.CurrentVehicle.Model);
  3294.                 if (xelement.Element((XName)"place") != null && xelement.Element((XName)"place").Element((XName)"Vehicle") != null && (xelement.Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name") != null && xelement.Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate") != null) && (ped.CurrentVehicle.DisplayName == xelement.Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name").Value && ped.CurrentVehicle.NumberPlate == xelement.Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate").Value))
  3295.                     flag1 = true;
  3296.             }
  3297.             return flag1;
  3298.         }
  3299.  
  3300.         private bool isStrapAttachedToPed(Prop bag, Ped ped)
  3301.         {
  3302.             bool flag = false;
  3303.             Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
  3304.             if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
  3305.             {
  3306.                 foreach (Prop prop in nearbyProps)
  3307.                 {
  3308.                     if ((Entity)prop != (Entity)null && prop.IsAttachedTo((Entity)bag))
  3309.                         flag = true;
  3310.                 }
  3311.             }
  3312.             return flag;
  3313.         }
  3314.  
  3315.         private void strapSet(Prop bag, Ped ped)
  3316.         {
  3317.             float num1 = -0.15f;
  3318.             float num2 = 0.14f;
  3319.             float num3 = 0.37f;
  3320.             float num4 = 60f;
  3321.             float num5 = -170f;
  3322.             float num6 = -60f;
  3323.             bool flag = false;
  3324.             Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
  3325.             if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
  3326.             {
  3327.                 foreach (Prop prop in nearbyProps)
  3328.                 {
  3329.                     if ((Entity)prop != (Entity)null && !prop.IsAttachedTo((Entity)bag) && !prop.IsAttached())
  3330.                     {
  3331.                         int num7 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)bag, (InputArgument)0);
  3332.                         bag.SetNoCollision((Entity)prop, false);
  3333.                         Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)prop, (InputArgument)bag, (InputArgument)num7, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3, (InputArgument)num4, (InputArgument)num5, (InputArgument)num6, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)0, (InputArgument)true);
  3334.                         flag = true;
  3335.                     }
  3336.                 }
  3337.                 if (flag)
  3338.                     return;
  3339.                 int num8 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)bag, (InputArgument)0);
  3340.                 Prop prop1 = World.CreateProp((Model)this.GetHashKey("prop_cs_heist_bag_strap_01"), bag.Position, bag.Rotation, true, true);
  3341.                 bag.SetNoCollision((Entity)prop1, false);
  3342.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)prop1, (InputArgument)bag, (InputArgument)num8, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3, (InputArgument)num4, (InputArgument)num5, (InputArgument)num6, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)0, (InputArgument)true);
  3343.             }
  3344.             else
  3345.             {
  3346.                 int num7 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)bag, (InputArgument)0);
  3347.                 Prop prop = World.CreateProp((Model)this.GetHashKey("prop_cs_heist_bag_strap_01"), bag.Position, bag.Rotation, true, true);
  3348.                 bag.SetNoCollision((Entity)prop, false);
  3349.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)prop, (InputArgument)bag, (InputArgument)num7, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3, (InputArgument)num4, (InputArgument)num5, (InputArgument)num6, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)0, (InputArgument)true);
  3350.             }
  3351.         }
  3352.  
  3353.         private void bagSet(string bagModelSend, Ped ped)
  3354.         {
  3355.             Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey(bagModelSend));
  3356.             Prop bag1 = this.bagModelReturn(ped);
  3357.             if (!((Entity)ped != (Entity)null))
  3358.                 return;
  3359.             if (!this.isOccupied(ped))
  3360.             {
  3361.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)"puton_parachute", (InputArgument)3))
  3362.                 {
  3363.                     Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)ped, (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)"puton_parachute", (InputArgument)45f, (InputArgument)(-12.0), (InputArgument)1000, (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  3364.                     this.soundFX(ped, "holdStrap.wav");
  3365.                     int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57005);
  3366.                     if ((Entity)this.bagModelReturn(ped) != (Entity)null)
  3367.                         Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)bag1, (InputArgument)ped, (InputArgument)num, (InputArgument)0.35f, (InputArgument)0.13f, (InputArgument)(-0.18f), (InputArgument)45.8999f, (InputArgument)84.6992f, (InputArgument)180.1992f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  3368.                 }
  3369.             }
  3370.             Script.Wait(1000);
  3371.             int num1;
  3372.             if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)"puton_parachute", (InputArgument)3))
  3373.                 num1 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)"puton_parachute") == 0.300000011920929 ? 1 : 0;
  3374.             else
  3375.                 num1 = 0;
  3376.             if (num1 != 0)
  3377.                 Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"puton_parachute", (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)3);
  3378.             if ((Entity)bag1 == (Entity)null)
  3379.             {
  3380.                 if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
  3381.                 {
  3382.                     foreach (Prop bag2 in nearbyProps)
  3383.                     {
  3384.                         if ((Entity)bag2 != (Entity)null && !bag2.IsAttachedTo((Entity)ped) && !bag2.IsAttached())
  3385.                         {
  3386.                             bag2.SetNoCollision((Entity)ped, false);
  3387.                             this.AttachBag(bag2, ped);
  3388.                             if (this.drawStrap)
  3389.                                 this.strapSet(bag2, ped);
  3390.                         }
  3391.                     }
  3392.                 }
  3393.                 else
  3394.                 {
  3395.                     Prop prop = World.CreateProp((Model)this.GetHashKey(bagModelSend), ped.Position, ped.Rotation, true, true);
  3396.                     if ((Entity)prop != (Entity)null)
  3397.                     {
  3398.                         prop.SetNoCollision((Entity)ped, false);
  3399.                         this.AttachBag(prop, ped);
  3400.                         if (this.drawStrap)
  3401.                             this.strapSet(prop, ped);
  3402.                     }
  3403.                 }
  3404.             }
  3405.             else
  3406.                 this.AttachBag(bag1, ped);
  3407.             bool flag = false;
  3408.             string str = "";
  3409.             foreach (PedHash allPedHash in this.allPedHashes)
  3410.             {
  3411.                 if (ped.Model == (Model)allPedHash)
  3412.                 {
  3413.                     str = allPedHash.ToString();
  3414.                     flag = true;
  3415.                 }
  3416.             }
  3417.             if (!flag)
  3418.                 str = ped.Model.ToString();
  3419.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  3420.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  3421.             if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"bag") == null)
  3422.             {
  3423.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XAttribute((XName)"bag", (object)true));
  3424.                 this.saveDoc();
  3425.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"bag").SetValue((object)true);
  3426.                 this.saveDoc();
  3427.             }
  3428.             else
  3429.             {
  3430.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"bag").SetValue((object)true);
  3431.                 this.saveDoc();
  3432.             }
  3433.             if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place") != null)
  3434.             {
  3435.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place").RemoveAll();
  3436.                 this.saveDoc();
  3437.             }
  3438.         }
  3439.         private void deleteStrap(Prop bag)
  3440.         {
  3441.             if (this.changedPosition)
  3442.             {
  3443.                 World.GetNearbyProps(Game.Player.Character.Position, 2f, bag.Model);
  3444.                 if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  3445.                 {
  3446.                     if (this.drawStrap)
  3447.                     {
  3448.                         Prop[] nearbyProps = World.GetNearbyProps(Game.Player.Character.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
  3449.                         if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
  3450.                         {
  3451.                             foreach (Prop prop in nearbyProps)
  3452.                             {
  3453.                                 if ((Entity)prop != (Entity)null && prop.IsAttachedTo((Entity)bag))
  3454.                                     prop.IsVisible = false;
  3455.                             }
  3456.                         }
  3457.                     }
  3458.                 }
  3459.             }
  3460.         }
  3461.         private void TakeOffBagInCar(Prop bag, Ped ped)
  3462.         {
  3463.             World.GetNearbyProps(ped.Position, 2f, bag.Model);
  3464.             if (!this.isOccupied(ped))
  3465.             {
  3466.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"enter", (InputArgument)3))
  3467.                 {
  3468.                     if (!ped.IsSittingInVehicle())
  3469.                         ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, 2000, AnimationFlags.None);
  3470.                     else
  3471.                         ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, 1000, AnimationFlags.UpperBodyOnly);
  3472.                     this.soundFX(ped, "holdStrap.wav");
  3473.                     int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57005);
  3474.                     bag = this.bagModelReturn(ped);
  3475.                     if ((Entity)this.bagModelReturn(ped) != (Entity)null)
  3476.                     {
  3477.                         Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)bag, (InputArgument)ped, (InputArgument)num, (InputArgument)0.35f, (InputArgument)0.13f, (InputArgument)(-0.18f), (InputArgument)45.8999f, (InputArgument)84.6992f, (InputArgument)180.1992f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  3478.                         if (this.drawStrap)
  3479.                         {
  3480.                             Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
  3481.                             if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
  3482.                             {
  3483.                                 foreach (Prop prop in nearbyProps)
  3484.                                 {
  3485.                                     if ((Entity)prop != (Entity)null && prop.IsAttachedTo((Entity)bag))
  3486.                                         prop.IsVisible = false;
  3487.                                 }
  3488.                             }
  3489.                         }
  3490.                     }
  3491.                     Script.Wait(700);
  3492.                     if (ped.IsSittingInVehicle())
  3493.                         bag.IsVisible = false;
  3494.                 }
  3495.             }
  3496.             this.canPutOnBagOnExit = true;
  3497.         }
  3498.  
  3499.         private void looseBagFunc(Ped ped, Prop bag)
  3500.         {
  3501.             bool flag = false;
  3502.             string str = "";
  3503.             foreach (PedHash allPedHash in this.allPedHashes)
  3504.             {
  3505.                 if (ped.Model == (Model)allPedHash)
  3506.                 {
  3507.                     str = allPedHash.ToString();
  3508.                     flag = true;
  3509.                 }
  3510.             }
  3511.             if (!flag)
  3512.                 str = ped.Model.ToString();
  3513.             if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
  3514.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
  3515.             if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)nameof(bag)) == null)
  3516.             {
  3517.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XAttribute((XName)nameof(bag), (object)false));
  3518.                 this.saveDoc();
  3519.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)nameof(bag)).SetValue((object)false);
  3520.                 this.saveDoc();
  3521.             }
  3522.             else
  3523.             {
  3524.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)nameof(bag)).SetValue((object)false);
  3525.                 this.saveDoc();
  3526.             }
  3527.             if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place") != null)
  3528.             {
  3529.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place").RemoveAll();
  3530.                 this.saveDoc();
  3531.             }
  3532.             if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster") == null)
  3533.             {
  3534.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XAttribute((XName)"holster", (object)false));
  3535.                 this.saveDoc();
  3536.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)false);
  3537.                 this.saveDoc();
  3538.             }
  3539.             else
  3540.             {
  3541.                 this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)false);
  3542.                 this.saveDoc();
  3543.             }
  3544.             this.ClearInventoryData(ped);
  3545.             DisplayHelpTextThisFrame("~BLIP_INFO_ICON~ ~r~You've lost~w~ your gear");
  3546.             Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
  3547.             UI.Notify("~r~You've lost your gear", true);
  3548.             if (!((Entity)bag != (Entity)null) || !bag.IsAttachedTo((Entity)Game.Player.Character))
  3549.                 return;
  3550.             bag.MarkAsNoLongerNeeded();
  3551.             bag.Detach();
  3552.             Function.Call(Hash._0xF25DF915FA38C5F3, (InputArgument)((Entity)Game.Player.Character), true);
  3553.             void DisplayHelpTextThisFrame(string text)
  3554.             {
  3555.                 Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
  3556.                 Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
  3557.                 Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
  3558.             }
  3559.         }
  3560.  
  3561.         private void DropBagFunc(Ped ped, Prop bag)
  3562.         {
  3563.             Prop[] nearbyProps1 = World.GetNearbyProps(ped.Position, 2f, bag.Model);
  3564.             if (((IEnumerable<Prop>)nearbyProps1).Count<Prop>() > 0)
  3565.             {
  3566.                 foreach (Prop prop1 in nearbyProps1)
  3567.                 {
  3568.                     if ((Entity)prop1 != (Entity)null && prop1.IsAttachedTo((Entity)ped))
  3569.                     {
  3570.                         if (this.drawStrap)
  3571.                         {
  3572.                             Prop[] nearbyProps2 = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
  3573.                             if (((IEnumerable<Prop>)nearbyProps2).Count<Prop>() > 0)
  3574.                             {
  3575.                                 foreach (Prop prop2 in nearbyProps2)
  3576.                                 {
  3577.                                     if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)bag))
  3578.                                         prop2.Delete();
  3579.                                 }
  3580.                             }
  3581.                         }
  3582.                         prop1.Delete();
  3583.                     }
  3584.                 }
  3585.             }
  3586.             Prop prop = World.CreateProp((Model)this.stashedBagModel, new Vector3(ped.Position.X, ped.Position.Y, ped.Position.Z + 3f), true, true);
  3587.             bool flag = false;
  3588.             string str1 = "";
  3589.             foreach (PedHash allPedHash in this.allPedHashes)
  3590.             {
  3591.                 if (ped.Model == (Model)allPedHash)
  3592.                 {
  3593.                     str1 = allPedHash.ToString();
  3594.                     flag = true;
  3595.                 }
  3596.             }
  3597.             if (!flag)
  3598.                 str1 = ped.Model.ToString();
  3599.             if (this.doc.Element((XName)"WeaponList").Element((XName)str1) == null)
  3600.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str1));
  3601.             if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)) == null)
  3602.             {
  3603.                 this.doc.Element((XName)"WeaponList").Element((XName)str1).Add((object)new XAttribute((XName)nameof(bag), (object)false));
  3604.                 this.saveDoc();
  3605.                 this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)).SetValue((object)false);
  3606.                 this.saveDoc();
  3607.             }
  3608.             else
  3609.             {
  3610.                 this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)).SetValue((object)false);
  3611.                 this.saveDoc();
  3612.             }
  3613.             if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place") == null)
  3614.             {
  3615.                 this.doc.Element((XName)"WeaponList").Element((XName)str1).Add((object)new XElement((XName)"place"));
  3616.                 this.saveDoc();
  3617.             }
  3618.             if (ped.IsSittingInVehicle())
  3619.             {
  3620.                 string str2 = Function.Call<string>(Hash._0x7CE1CCB9B293020E, (InputArgument)ped.CurrentVehicle);
  3621.                 string str3 = Function.Call<string>(Hash._0xB215AAC32D25D019, (InputArgument)ped.CurrentVehicle.Model);
  3622.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location") != null)
  3623.                 {
  3624.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Remove();
  3625.                     this.saveDoc();
  3626.                 }
  3627.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle") == null)
  3628.                 {
  3629.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Add((object)new XElement((XName)"Vehicle"));
  3630.                     this.saveDoc();
  3631.                 }
  3632.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name") == null)
  3633.                 {
  3634.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Add((object)new XAttribute((XName)"Name", (object)str3));
  3635.                     this.saveDoc();
  3636.                 }
  3637.                 else
  3638.                 {
  3639.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name").SetValue((object)str3);
  3640.                     this.saveDoc();
  3641.                 }
  3642.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate") == null)
  3643.                 {
  3644.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Add((object)new XAttribute((XName)"Plate", (object)str2));
  3645.                     this.saveDoc();
  3646.                 }
  3647.                 else
  3648.                 {
  3649.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate").SetValue((object)str2);
  3650.                     this.saveDoc();
  3651.                 }
  3652.                 if (!((Entity)prop != (Entity)null))
  3653.                     return;
  3654.                 this.blipHandle(true, (Entity)ped.CurrentVehicle, BlipSprite.Information, "DuffleBag", 0.85f, 200, false, false);
  3655.             }
  3656.             else
  3657.             {
  3658.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle") != null)
  3659.                 {
  3660.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").RemoveAll();
  3661.                     this.saveDoc();
  3662.                 }
  3663.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location") == null)
  3664.                 {
  3665.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Add((object)new XElement((XName)"Location"));
  3666.                     this.saveDoc();
  3667.                 }
  3668.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"X") == null)
  3669.                 {
  3670.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"X", (object)ped.Position.X));
  3671.                     this.saveDoc();
  3672.                 }
  3673.                 else
  3674.                 {
  3675.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"X").SetValue((object)ped.Position.X);
  3676.                     this.saveDoc();
  3677.                 }
  3678.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y") == null)
  3679.                 {
  3680.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"Y", (object)ped.Position.Y));
  3681.                     this.saveDoc();
  3682.                 }
  3683.                 else
  3684.                 {
  3685.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y").SetValue((object)ped.Position.Y);
  3686.                     this.saveDoc();
  3687.                 }
  3688.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z") == null)
  3689.                 {
  3690.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"Z", (object)ped.Position.Z));
  3691.                     this.saveDoc();
  3692.                 }
  3693.                 else
  3694.                 {
  3695.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z").SetValue((object)ped.Position.Z);
  3696.                     this.saveDoc();
  3697.                 }
  3698.                 if ((Entity)prop != (Entity)null)
  3699.                     this.blipHandle(true, (Entity)prop, BlipSprite.Information, "DuffleBag", 0.85f, 200, false, false);
  3700.             }
  3701.         }
  3702.  
  3703.         private void bagRemove(Prop bag, Ped ped)
  3704.         {
  3705.             Prop[] nearbyProps1 = World.GetNearbyProps(ped.Position, 2f, bag.Model);
  3706.             if (!this.isOccupied(ped))
  3707.             {
  3708.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"enter", (InputArgument)3))
  3709.                 {
  3710.                     if (ped.IsSittingInVehicle())
  3711.                     {
  3712.                         if (this.bagModelReturn(ped).IsVisible)
  3713.                             ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, 1000, AnimationFlags.UpperBodyOnly);
  3714.                         else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"veh@driveby@first_person@passenger_rear_right_handed@smg", (InputArgument)"outro_0", (InputArgument)3))
  3715.                             ped.Task.PlayAnimation("veh@driveby@first_person@passenger_rear_right_handed@smg", "outro_0", 8f, 1000, AnimationFlags.UpperBodyOnly);
  3716.                     }
  3717.                     this.soundFX(ped, "holdStrap.wav");
  3718.                     int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57005);
  3719.                     if ((Entity)this.bagModelReturn(ped) != (Entity)null)
  3720.                         Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.bagModelReturn(ped), (InputArgument)ped, (InputArgument)num, (InputArgument)0.35f, (InputArgument)0.13f, (InputArgument)(-0.18f), (InputArgument)45.8999f, (InputArgument)84.6992f, (InputArgument)180.1992f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  3721.                 }
  3722.             }
  3723.             if (((IEnumerable<Prop>)nearbyProps1).Count<Prop>() > 0)
  3724.             {
  3725.                 foreach (Prop prop1 in nearbyProps1)
  3726.                 {
  3727.                     if ((Entity)prop1 != (Entity)null && prop1.IsAttachedTo((Entity)ped))
  3728.                     {
  3729.                         if (this.drawStrap)
  3730.                         {
  3731.                             Prop[] nearbyProps2 = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
  3732.                             if (((IEnumerable<Prop>)nearbyProps2).Count<Prop>() > 0)
  3733.                             {
  3734.                                 foreach (Prop prop2 in nearbyProps2)
  3735.                                 {
  3736.                                     if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)bag))
  3737.                                         prop2.Delete();
  3738.                                 }
  3739.                             }
  3740.                         }
  3741.                         prop1.Delete();
  3742.                     }
  3743.                 }
  3744.             }
  3745.             Prop prop = World.CreateProp((Model)this.stashedBagModel, new Vector3(ped.Position.X, ped.Position.Y, ped.Position.Z - 1f), true, false);
  3746.             bool flag = false;
  3747.             string str1 = "";
  3748.             foreach (PedHash allPedHash in this.allPedHashes)
  3749.             {
  3750.                 if (ped.Model == (Model)allPedHash)
  3751.                 {
  3752.                     str1 = allPedHash.ToString();
  3753.                     flag = true;
  3754.                 }
  3755.             }
  3756.             if (!flag)
  3757.                 str1 = ped.Model.ToString();
  3758.             if (this.doc.Element((XName)"WeaponList").Element((XName)str1) == null)
  3759.                 this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str1));
  3760.             if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)) == null)
  3761.             {
  3762.                 this.doc.Element((XName)"WeaponList").Element((XName)str1).Add((object)new XAttribute((XName)nameof(bag), (object)false));
  3763.                 this.saveDoc();
  3764.                 this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)).SetValue((object)false);
  3765.                 this.saveDoc();
  3766.             }
  3767.             else
  3768.             {
  3769.                 this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)).SetValue((object)false);
  3770.                 this.saveDoc();
  3771.             }
  3772.             if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place") == null)
  3773.             {
  3774.                 this.doc.Element((XName)"WeaponList").Element((XName)str1).Add((object)new XElement((XName)"place"));
  3775.                 this.saveDoc();
  3776.             }
  3777.             if (ped.IsSittingInVehicle())
  3778.             {
  3779.                 string str2 = Function.Call<string>(Hash._0x7CE1CCB9B293020E, (InputArgument)ped.CurrentVehicle);
  3780.                 string str3 = Function.Call<string>(Hash._0xB215AAC32D25D019, (InputArgument)ped.CurrentVehicle.Model);
  3781.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location") != null)
  3782.                 {
  3783.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Remove();
  3784.                     this.saveDoc();
  3785.                 }
  3786.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle") == null)
  3787.                 {
  3788.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Add((object)new XElement((XName)"Vehicle"));
  3789.                     this.saveDoc();
  3790.                 }
  3791.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name") == null)
  3792.                 {
  3793.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Add((object)new XAttribute((XName)"Name", (object)str3));
  3794.                     this.saveDoc();
  3795.                 }
  3796.                 else
  3797.                 {
  3798.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name").SetValue((object)str3);
  3799.                     this.saveDoc();
  3800.                 }
  3801.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate") == null)
  3802.                 {
  3803.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Add((object)new XAttribute((XName)"Plate", (object)str2));
  3804.                     this.saveDoc();
  3805.                 }
  3806.                 else
  3807.                 {
  3808.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate").SetValue((object)str2);
  3809.                     this.saveDoc();
  3810.                 }
  3811.                 if (!((Entity)prop != (Entity)null))
  3812.                     return;
  3813.                 this.blipHandle(true, (Entity)ped.CurrentVehicle, BlipSprite.Information, "DuffleBag", 0.85f, 200, false, false);
  3814.             }
  3815.             else
  3816.             {
  3817.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle") != null)
  3818.                 {
  3819.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").RemoveAll();
  3820.                     this.saveDoc();
  3821.                 }
  3822.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location") == null)
  3823.                 {
  3824.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Add((object)new XElement((XName)"Location"));
  3825.                     this.saveDoc();
  3826.                 }
  3827.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"X") == null)
  3828.                 {
  3829.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"X", (object)ped.Position.X));
  3830.                     this.saveDoc();
  3831.                 }
  3832.                 else
  3833.                 {
  3834.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"X").SetValue((object)ped.Position.X);
  3835.                     this.saveDoc();
  3836.                 }
  3837.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y") == null)
  3838.                 {
  3839.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"Y", (object)ped.Position.Y));
  3840.                     this.saveDoc();
  3841.                 }
  3842.                 else
  3843.                 {
  3844.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y").SetValue((object)ped.Position.Y);
  3845.                     this.saveDoc();
  3846.                 }
  3847.                 if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z") == null)
  3848.                 {
  3849.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"Z", (object)ped.Position.Z));
  3850.                     this.saveDoc();
  3851.                 }
  3852.                 else
  3853.                 {
  3854.                     this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z").SetValue((object)ped.Position.Z);
  3855.                     this.saveDoc();
  3856.                 }
  3857.                 if ((Entity)prop != (Entity)null)
  3858.                     this.blipHandle(true, (Entity)prop, BlipSprite.Information, "DuffleBag", 0.85f, 200, false, false);
  3859.             }
  3860.         }
  3861.  
  3862.         private void AttachBag(Prop bag, Ped ped)
  3863.         {
  3864.             this.checkBagVisibility(ped);
  3865.             if (!((Entity)bag != (Entity)null) || !bag.Exists() || !((Entity)ped != (Entity)null) || !ped.Exists())
  3866.                 return;
  3867.             if ((Entity)ped.CurrentVehicle != (Entity)null)
  3868.                 Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)bag, (InputArgument)ped.CurrentVehicle, (InputArgument)true);
  3869.             int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  3870.             if (this.changedPosition)
  3871.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)bag, (InputArgument)ped, (InputArgument)num, (InputArgument)this.xdg, (InputArgument)this.ydg, (InputArgument)this.zdg, (InputArgument)this.xrdg, (InputArgument)this.yrdg, (InputArgument)this.zrdg, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)0, (InputArgument)true);
  3872.             else
  3873.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)bag, (InputArgument)ped, (InputArgument)num, (InputArgument)this.xd, (InputArgument)this.yd, (InputArgument)this.zd, (InputArgument)this.xrd, (InputArgument)this.yrd, (InputArgument)this.zrd, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  3874.         }
  3875.  
  3876.         private void skydive(Ped ped, Prop bag, bool skyDiving)
  3877.         {
  3878.             if (!((Entity)bag != (Entity)null) || !bag.Exists() || !bag.IsAttachedTo((Entity)ped))
  3879.                 return;
  3880.             if (skyDiving)
  3881.             {
  3882.                 if (this.drawStrap)
  3883.                 {
  3884.                     foreach (Prop nearbyProp in World.GetNearbyProps(ped.Position, 10f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01")))
  3885.                     {
  3886.                         if ((Entity)nearbyProp != (Entity)null && nearbyProp.IsAttachedTo((Entity)bag))
  3887.                             nearbyProp.IsVisible = false;
  3888.                     }
  3889.                 }
  3890.                 int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  3891.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)bag, (InputArgument)ped, (InputArgument)num, (InputArgument)this.xsdg, (InputArgument)this.ysdg, (InputArgument)this.zsdg, (InputArgument)this.xrsdg, (InputArgument)this.yrsdg, (InputArgument)this.zrsdg, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)0, (InputArgument)true);
  3892.             }
  3893.             else
  3894.             {
  3895.                 if (ped.IsOnFoot && !ped.IsRagdoll)
  3896.                 {
  3897.                     if (this.drawStrap)
  3898.                     {
  3899.                         foreach (Prop nearbyProp in World.GetNearbyProps(ped.Position, 10f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01")))
  3900.                         {
  3901.                             if ((Entity)nearbyProp != (Entity)null && nearbyProp.IsAttachedTo((Entity)bag))
  3902.                                 nearbyProp.IsVisible = true;
  3903.                         }
  3904.                     }
  3905.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"enter", (InputArgument)3))
  3906.                     {
  3907.                         ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, 500, AnimationFlags.UpperBodyOnly);
  3908.                         this.soundFX(ped, "holdStrap.wav");
  3909.                     }
  3910.                 }
  3911.                 int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  3912.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)bag, (InputArgument)ped, (InputArgument)num, (InputArgument)this.xd, (InputArgument)this.yd, (InputArgument)this.zd, (InputArgument)this.xrd, (InputArgument)this.yrd, (InputArgument)this.zrd, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  3913.             }
  3914.         }
  3915.  
  3916.         private void diving(Ped ped, Prop bag, bool wearingGear)
  3917.         {
  3918.             if (!((Entity)bag != (Entity)null) || !bag.Exists() || !bag.IsAttachedTo((Entity)ped))
  3919.                 return;
  3920.             if (wearingGear)
  3921.             {
  3922.                 if (this.drawStrap)
  3923.                 {
  3924.                     foreach (Prop nearbyProp in World.GetNearbyProps(ped.Position, 10f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01")))
  3925.                     {
  3926.                         if ((Entity)nearbyProp != (Entity)null && nearbyProp.IsAttachedTo((Entity)bag))
  3927.                             nearbyProp.IsVisible = false;
  3928.                     }
  3929.                 }
  3930.                 int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  3931.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)bag, (InputArgument)ped, (InputArgument)num, (InputArgument)this.xdg, (InputArgument)this.ydg, (InputArgument)this.zdg, (InputArgument)this.xrdg, (InputArgument)this.yrdg, (InputArgument)this.zrdg, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)0, (InputArgument)true);
  3932.             }
  3933.             else
  3934.             {
  3935.                 if (ped.IsOnFoot && !ped.IsRagdoll)
  3936.                 {
  3937.                     if (this.drawStrap)
  3938.                     {
  3939.                         foreach (Prop nearbyProp in World.GetNearbyProps(ped.Position, 10f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01")))
  3940.                         {
  3941.                             if ((Entity)nearbyProp != (Entity)null && nearbyProp.IsAttachedTo((Entity)bag))
  3942.                                 nearbyProp.IsVisible = true;
  3943.                         }
  3944.                     }
  3945.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"enter", (InputArgument)3))
  3946.                     {
  3947.                         AnimationFlags flags = AnimationFlags.UpperBodyOnly;
  3948.                         ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, 500, flags);
  3949.                         this.soundFX(ped, "holdStrap.wav");
  3950.                     }
  3951.                 }
  3952.                 int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  3953.                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)bag, (InputArgument)ped, (InputArgument)num, (InputArgument)this.xd, (InputArgument)this.yd, (InputArgument)this.zd, (InputArgument)this.xrd, (InputArgument)this.yrd, (InputArgument)this.zrd, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  3954.             }
  3955.         }
  3956.  
  3957.         private void WeaponSwitchAnim(Ped ped)
  3958.         {
  3959.             if (ped.IsGettingIntoAVehicle || ped.IsSittingInVehicle() || (ped.IsInCover() || Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>())) || (Game.IsScreenFadingIn || Game.IsScreenFadingOut) || Function.Call<bool>(Hash._0xD9D2CFFF49FAB35F, Array.Empty<InputArgument>()))
  3960.                 this.prevWeapon = Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)ped);
  3961.             if (this.isOccupied(ped))
  3962.             {
  3963.                 Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"cop_p1_rf_right_0", (InputArgument)"mp_arrest_paired", (InputArgument)3);
  3964.             }
  3965.             else
  3966.             {
  3967.                 foreach (WeaponHash weaponHash in Enum.GetValues(typeof(WeaponHash)))
  3968.                 {
  3969.                     int num;
  3970.                     if ((int)this.prevWeapon != (int)Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)ped))
  3971.                         num = (WeaponHash)Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)ped) == weaponHash ? 1 : 0;
  3972.                     else
  3973.                         num = 0;
  3974.                     if (num != 0)
  3975.                     {
  3976.                         this.prevWeapon = Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)ped);
  3977.                         ped.Task.PlayAnimation("mp_arrest_paired", "cop_p1_rf_right_0", 8f, 500, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  3978.                         this.soundFX(ped, "holdStrap.wav");
  3979.                     }
  3980.                 }
  3981.             }
  3982.         }
  3983.  
  3984.  
  3985.         private void WeaponCarryLimit()
  3986.         {
  3987.             Ped Player = Game.Player.Character;
  3988.             if (!this.hasBag)
  3989.             {
  3990.                 if (Utilities.GetBigWeaponCount(Player) >= 2)
  3991.                 {
  3992.                    
  3993.                 }
  3994.  
  3995.                 if (Utilities.GetSmallWeaponCount(Player) >= 2)
  3996.                 {
  3997.  
  3998.                 }
  3999.  
  4000.                 if (Utilities.GetExplosivesCount(Player) >= 2)
  4001.                 {
  4002.  
  4003.                 }
  4004.  
  4005.                 if (Utilities.GetMeleeCount(Player) >= 2)
  4006.                 {
  4007.  
  4008.                 }
  4009.  
  4010.                 if (Utilities.GetMiscCount(Player) >= 2)
  4011.                 {
  4012.  
  4013.                 }
  4014.             }
  4015.         }
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.         private void weaponInventoryAnim(Prop bag, Ped ped)
  4024.         {
  4025.             Prop prop = (Prop)null;
  4026.             if (!((Entity)bag != (Entity)null) || !bag.Exists() || !bag.IsAttachedTo((Entity)ped))
  4027.                 return;
  4028.             if (ped.IsOnFoot && this.drawStrap)
  4029.             {
  4030.                 foreach (Prop nearbyProp in World.GetNearbyProps(ped.Position, 10f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01")))
  4031.                 {
  4032.                     if ((Entity)nearbyProp != (Entity)null && nearbyProp.IsAttachedTo((Entity)bag))
  4033.                         prop = nearbyProp;
  4034.                 }
  4035.             }
  4036.             if (this.inMenu)
  4037.             {
  4038.                 if (this.drawStrap && ((Entity)prop != (Entity)null && prop.IsVisible))
  4039.                     prop.IsVisible = false;
  4040.                 if (Game.Player.Character.IsOnFoot)
  4041.                 {
  4042.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"enter", (InputArgument)3))
  4043.                     {
  4044.                         ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, -1, AnimationFlags.StayInEndFrame);
  4045.                         this.soundFX(ped, "holdStrap.wav");
  4046.                         int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57005);
  4047.                         Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)bag, (InputArgument)ped, (InputArgument)num, (InputArgument)0.35f, (InputArgument)0.13f, (InputArgument)(-0.18f), (InputArgument)45.8999f, (InputArgument)84.6992f, (InputArgument)180.1992f, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  4048.                     }
  4049.                 }
  4050.                 else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"veh@driveby@first_person@passenger_rear_right_handed@smg", (InputArgument)"outro_0", (InputArgument)3))
  4051.                 {
  4052.                     ped.Task.PlayAnimation("veh@driveby@first_person@passenger_rear_right_handed@smg", "outro_0", 8f, -1, AnimationFlags.UpperBodyOnly);
  4053.                     this.soundFX(ped, "holdStrap.wav");
  4054.                 }
  4055.                 if (!this.followCamera)
  4056.                     this.followCamera = true;
  4057.             }
  4058.             if (!this.inMenu)
  4059.             {
  4060.                 if (this.followCamera)
  4061.                     this.followCamera = false;
  4062.                 if (Game.Player.Character.IsOnFoot)
  4063.                 {
  4064.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"exit", (InputArgument)3))
  4065.                     {
  4066.                         ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "exit", 8f, -1, AnimationFlags.None);
  4067.                         int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
  4068.                         this.soundFX(ped, "holdStrap.wav");
  4069.                         if (this.drawStrap && ((Entity)prop != (Entity)null && !prop.IsVisible))
  4070.                             prop.IsVisible = true;
  4071.                         Script.Wait(2000);
  4072.                         if (!this.changedPosition)
  4073.                             Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)bag, (InputArgument)ped, (InputArgument)num, (InputArgument)this.xd, (InputArgument)this.yd, (InputArgument)this.zd, (InputArgument)this.xrd, (InputArgument)this.yrd, (InputArgument)this.zrd, (InputArgument)true, (InputArgument)true, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  4074.                         else
  4075.                             this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), this.changedPosition);
  4076.                         ped.CanSwitchWeapons = true;
  4077.                     }
  4078.                     if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"loop", (InputArgument)3))
  4079.                         ped.Task.ClearAnimation("anim@heists@money_grab@duffel", "loop");
  4080.                 }
  4081.                 else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"veh@driveby@first_person@passenger_rear_right_handed@smg", (InputArgument)"outro_0", (InputArgument)3))
  4082.                 {
  4083.                     ped.Task.PlayAnimation("veh@driveby@first_person@passenger_rear_right_handed@smg", "outro_0", 8f, -1, AnimationFlags.UpperBodyOnly);
  4084.                     this.soundFX(ped, "holdStrap.wav");
  4085.                 }
  4086.                 ped.CanSwitchWeapons = true;
  4087.             }
  4088.         }
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.         public GTAExpansion()
  4095.         {
  4096.             this.Tick += new EventHandler(this.OnTick);
  4097.             this._iFruit = new CustomiFruit();
  4098.             this.callContact = new iFruitContact("Inventory menu");
  4099.             this.callContact.Answered += new ContactAnsweredEvent(this.ContactAnsweredDate);
  4100.             this.callContact.DialTimeout = 3;
  4101.             this.callContact.Active = true;
  4102.             this.callContact.Icon = ContactIcon.Ammunation;
  4103.             this.callContact.Bold = false;
  4104.             this._iFruit.Contacts.Add(this.callContact);
  4105.         }
  4106.  
  4107.         private void OnTick(object sender, EventArgs e)
  4108.         {
  4109.             if (!this.loaded)
  4110.             {
  4111.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"skydive@parachute@");
  4112.                 while (true)
  4113.                 {
  4114.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"skydive@parachute@"))
  4115.                         Script.Wait(10);
  4116.                     else
  4117.                         break;
  4118.                 }
  4119.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"mp_arrest_paired");
  4120.                 while (true)
  4121.                 {
  4122.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"mp_arrest_paired"))
  4123.                         Script.Wait(10);
  4124.                     else
  4125.                         break;
  4126.                 }
  4127.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"veh@driveby@first_person@passenger_rear_right_handed@smg");
  4128.                 while (true)
  4129.                 {
  4130.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"veh@driveby@first_person@passenger_rear_right_handed@smg"))
  4131.                         Script.Wait(10);
  4132.                     else
  4133.                         break;
  4134.                 }
  4135.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"anim@heists@money_grab@duffel");
  4136.                 while (true)
  4137.                 {
  4138.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"anim@heists@money_grab@duffel"))
  4139.                         Script.Wait(10);
  4140.                     else
  4141.                         break;
  4142.                 }
  4143.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"oddjobs@basejump@ig_15");
  4144.                 while (true)
  4145.                 {
  4146.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"oddjobs@basejump@ig_15"))
  4147.                         Script.Wait(10);
  4148.                     else
  4149.                         break;
  4150.                 }
  4151.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"oddjobs@assassinate@construction@");
  4152.                 while (true)
  4153.                 {
  4154.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"oddjobs@assassinate@construction@"))
  4155.                         Script.Wait(10);
  4156.                     else
  4157.                         break;
  4158.                 }
  4159.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"friends@frl@ig_1");
  4160.                 while (true)
  4161.                 {
  4162.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"friends@frl@ig_1"))
  4163.                         Script.Wait(10);
  4164.                     else
  4165.                         break;
  4166.                 }
  4167.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a");
  4168.                 while (true)
  4169.                 {
  4170.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a"))
  4171.                         Script.Wait(10);
  4172.                     else
  4173.                         break;
  4174.                 }
  4175.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a");
  4176.                 while (true)
  4177.                 {
  4178.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a"))
  4179.                         Script.Wait(10);
  4180.                     else
  4181.                         break;
  4182.                 }
  4183.                 Function.Call(Hash._0xB80D8756B4668AB6, (InputArgument)"scr_safehouse");
  4184.                 while (true)
  4185.                 {
  4186.                     if (!Function.Call<bool>(Hash._0x8702416E512EC454, (InputArgument)"scr_safehouse"))
  4187.                         Script.Wait(10);
  4188.                     else
  4189.                         break;
  4190.                 }
  4191.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a");
  4192.                 while (true)
  4193.                 {
  4194.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a"))
  4195.                         Script.Wait(10);
  4196.                     else
  4197.                         break;
  4198.                 }
  4199.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a");
  4200.                 while (true)
  4201.                 {
  4202.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a"))
  4203.                         Script.Wait(10);
  4204.                     else
  4205.                         break;
  4206.                 }
  4207.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_smoking@male@male_a@exit");
  4208.                 while (true)
  4209.                 {
  4210.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_smoking@male@male_a@exit"))
  4211.                         Script.Wait(10);
  4212.                     else
  4213.                         break;
  4214.                 }
  4215.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_leaning@female@smoke@exit");
  4216.                 while (true)
  4217.                 {
  4218.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_leaning@female@smoke@exit"))
  4219.                         Script.Wait(10);
  4220.                     else
  4221.                         break;
  4222.                 }
  4223.                 Function.Call(Hash._0xB80D8756B4668AB6, (InputArgument)"scr_safehouse");
  4224.                 while (true)
  4225.                 {
  4226.                     if (!Function.Call<bool>(Hash._0x8702416E512EC454, (InputArgument)"scr_safehouse"))
  4227.                         Script.Wait(10);
  4228.                     else
  4229.                         break;
  4230.                 }
  4231.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_smoking@male@male_a@enter");
  4232.                 while (true)
  4233.                 {
  4234.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_smoking@male@male_a@enter"))
  4235.                         Script.Wait(10);
  4236.                     else
  4237.                         break;
  4238.                 }
  4239.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ps@base");
  4240.                 while (true)
  4241.                 {
  4242.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ps@base"))
  4243.                         Script.Wait(10);
  4244.                     else
  4245.                         break;
  4246.                 }
  4247.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"mp_arrest_paired");
  4248.                 while (true)
  4249.                 {
  4250.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"mp_arrest_paired"))
  4251.                         Script.Wait(10);
  4252.                     else
  4253.                         break;
  4254.                 }
  4255.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base");
  4256.                 while (true)
  4257.                 {
  4258.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base"))
  4259.                         Script.Wait(10);
  4260.                     else
  4261.                         break;
  4262.                 }
  4263.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base");
  4264.                 while (true)
  4265.                 {
  4266.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base"))
  4267.                         Script.Wait(10);
  4268.                     else
  4269.                         break;
  4270.                 }
  4271.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"anim@amb@board_room@supervising@");
  4272.                 while (true)
  4273.                 {
  4274.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"anim@amb@board_room@supervising@"))
  4275.                         Script.Wait(10);
  4276.                     else
  4277.                         break;
  4278.                 }
  4279.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"anim@cellphone@in_car@ds");
  4280.                 while (true)
  4281.                 {
  4282.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"anim@cellphone@in_car@ds"))
  4283.                         Script.Wait(10);
  4284.                     else
  4285.                         break;
  4286.                 }
  4287.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"clothingspecs");
  4288.                 while (true)
  4289.                 {
  4290.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"clothingspecs"))
  4291.                         Script.Wait(10);
  4292.                     else
  4293.                         break;
  4294.                 }
  4295.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"anim@mp_player_intupperface_palm");
  4296.                 while (true)
  4297.                 {
  4298.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"anim@mp_player_intupperface_palm"))
  4299.                         Script.Wait(10);
  4300.                     else
  4301.                         break;
  4302.                 }
  4303.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"oddjobs@basejump@ig_15");
  4304.                 while (true)
  4305.                 {
  4306.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"oddjobs@basejump@ig_15"))
  4307.                         Script.Wait(10);
  4308.                     else
  4309.                         break;
  4310.                 }
  4311.                 Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"move_m@intimidation@cop@unarmed");
  4312.                 while (true)
  4313.                 {
  4314.                     if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"move_m@intimidation@cop@unarmed"))
  4315.                         Script.Wait(10);
  4316.                     else
  4317.                         break;
  4318.                 }
  4319.                 this.blipsRemove(BlipSprite.Information);
  4320.                 if ((Entity)Game.Player.Character != (Entity)null)
  4321.                     this.prevWeapon = Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)Game.Player.Character);
  4322.                 if (this.doesPedHasInventoryBag(Game.Player.Character) && (!Game.Player.Character.IsSittingInVehicle() && !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) && Game.IsScreenFadedIn && Game.Player.Character.IsStopped && (Entity)this.bagModelReturn(Game.Player.Character) == (Entity)null))
  4323.                     this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
  4324.                 if (!this.useHipHolster)
  4325.                 {
  4326.                     int num;
  4327.                     if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_pistol_holster")))
  4328.                         num = !Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_pistol_holster")) ? 1 : 0;
  4329.                     else
  4330.                         num = 0;
  4331.                     if (num != 0)
  4332.                         Function.Call(Hash._0x963D27A58DF860AC, (InputArgument)this.GetHashKey("prop_pistol_holster"));
  4333.                 }
  4334.                 else
  4335.                 {
  4336.                     int num;
  4337.                     if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_holster_01")))
  4338.                         num = !Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_holster_01")) ? 1 : 0;
  4339.                     else
  4340.                         num = 0;
  4341.                     if (num != 0)
  4342.                         Function.Call(Hash._0x963D27A58DF860AC, (InputArgument)this.GetHashKey("prop_holster_01"));
  4343.                 }
  4344.                 this.loaded = true;
  4345.             }
  4346.             if (this.GameTimeRef < Game.GameTime)
  4347.             {
  4348.                 this.GameTimeRef = Game.GameTime + 1000;
  4349.                 this.main_menu_btn = !Game.Player.Character.IsSittingInVehicle() ? this.main_menu_btn_on_foot : this.main_menu_btn_in_vehicle;
  4350.                 if (this.inProcessCigsAndPills)
  4351.                 {
  4352.                     if (this.cigsAndPillsCounter > 0)
  4353.                     {
  4354.                         this.play_swallow_pills_anim = true;
  4355.                         --this.cigsAndPillsCounter;
  4356.                     }
  4357.                     else
  4358.                     {
  4359.                         this.play_swallow_pills_anim = false;
  4360.                         this.cigsAndPillsCounter = 0;
  4361.                     }
  4362.                 }
  4363.                 else if (this.cigsAndPillsCountDown)
  4364.                 {
  4365.                     if (this.cigsAndPillsCounter > 0)
  4366.                         --this.cigsAndPillsCounter;
  4367.                     else
  4368.                         this.cigsAndPillsCounter = 0;
  4369.                 }
  4370.                 int num1;
  4371.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_a@idle_a", (InputArgument)"idle_c", (InputArgument)3))
  4372.                 {
  4373.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
  4374.                     {
  4375.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3) && this.smoke != -1)
  4376.                         {
  4377.                             num1 = !this.startSmoke ? 1 : 0;
  4378.                             goto label_112;
  4379.                         }
  4380.                     }
  4381.                 }
  4382.                 num1 = 0;
  4383.             label_112:
  4384.                 if (num1 != 0 && 0 + 1 > 100)
  4385.                 {
  4386.                     this.smoke = -1;
  4387.                     this.startSmoke = true;
  4388.                     if ((Entity)this.cig != (Entity)null)
  4389.                     {
  4390.                         this.cig.MarkAsNoLongerNeeded();
  4391.                         this.cig = (Prop)null;
  4392.                     }
  4393.                 }
  4394.                 if (this.smoke != 1)
  4395.                 {
  4396.                     int num2;
  4397.                     if ((Entity)this.cig == (Entity)null)
  4398.                         num2 = Function.Call<bool>(Hash._0xBFA48E2FF417213F, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey(this.smokeType), (InputArgument)0) ? 1 : 0;
  4399.                     else
  4400.                         num2 = 0;
  4401.                     if (num2 != 0)
  4402.                     {
  4403.                         Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey(this.smokeType), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  4404.                         if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character))
  4405.                         {
  4406.                             if ((Entity)this.cig == (Entity)null)
  4407.                                 this.cig = prop;
  4408.                             this.smoke = 1;
  4409.                             this.startSmoke = false;
  4410.                         }
  4411.                     }
  4412.                 }
  4413.                 if (Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey(this.smokeType), (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  4414.                 {
  4415.                     Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey(this.smokeType), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  4416.                     int num2;
  4417.                     if ((Entity)prop != (Entity)this.cig)
  4418.                         num2 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) ? 1 : 0;
  4419.                     else
  4420.                         num2 = 0;
  4421.                     if (num2 != 0 && prop.Exists())
  4422.                         prop.Delete();
  4423.                 }
  4424.                 if (!Game.Player.Character.IsSittingInVehicle())
  4425.                 {
  4426.                     if (this.smoke == 1 && Game.Player.Character.IsAlive)
  4427.                     {
  4428.                         if ((Entity)this.cig == (Entity)null)
  4429.                         {
  4430.                             this.cig = World.CreateProp((Model)this.smokeType, Game.Player.Character.Position, true, false);
  4431.                             if ((Entity)this.cig != (Entity)null)
  4432.                                 this.cig.IsVisible = false;
  4433.                             Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.cig, (InputArgument)Game.Player.Character, (InputArgument)true);
  4434.                             Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.cig, (InputArgument)Game.Player.Character.CurrentVehicle, (InputArgument)true);
  4435.                             int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)64017);
  4436.                             if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)Game.Player.Character))
  4437.                                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)Game.Player.Character, (InputArgument)num2, (InputArgument)0.017, (InputArgument)(-0.01), (InputArgument)0.0, (InputArgument)0.0, (InputArgument)(-120.0), (InputArgument)(-90.0), (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  4438.                             else
  4439.                                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)Game.Player.Character, (InputArgument)num2, (InputArgument)0.017, (InputArgument)(-0.01), (InputArgument)0.0, (InputArgument)0.0, (InputArgument)0.0, (InputArgument)(-90.0), (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  4440.                         }
  4441.                         if (this.startSmoke)
  4442.                             this.StartSmokeFunc(Game.Player.Character, 1);
  4443.                         if ((Entity)this.cig != (Entity)null && !this.startSmoke)
  4444.                         {
  4445.                             if (this.cig_durability > 0)
  4446.                             {
  4447.                                 int num2;
  4448.                                 if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
  4449.                                     num2 = !Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character) ? 1 : 0;
  4450.                                 else
  4451.                                     num2 = 0;
  4452.                                 if (num2 != 0)
  4453.                                 {
  4454.                                     int num3;
  4455.                                     if (!Game.Player.Character.IsWalking && !Game.Player.Character.IsRunning && (!Game.Player.Character.IsSwimming && !Game.Player.Character.IsSprinting) && (!Game.Player.Character.IsInCover() && !Game.Player.Character.IsSwimmingUnderWater))
  4456.                                     {
  4457.                                         if (!Function.Call<bool>(Hash._0xBB062B2B5722478E, (InputArgument)Game.Player.Character) && !Game.Player.Character.IsDucking && (!Game.Player.Character.IsProne && !Game.Player.Character.IsInCombat))
  4458.                                         {
  4459.                                             if (!Function.Call<bool>(Hash._0x7C2AC9CA66575FBF, (InputArgument)Game.Player.Character))
  4460.                                             {
  4461.                                                 if (!Function.Call<bool>(Hash._0x00E73468D085F745, (InputArgument)Game.Player.Character))
  4462.                                                 {
  4463.                                                     num3 = !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) ? 1 : 0;
  4464.                                                     goto label_157;
  4465.                                                 }
  4466.                                             }
  4467.                                         }
  4468.                                     }
  4469.                                     num3 = 0;
  4470.                                 label_157:
  4471.                                     if (num3 != 0)
  4472.                                         this.SmokeLoopFunc(Game.Player.Character, 1);
  4473.                                     else
  4474.                                         this.PauseSmokeFunc(Game.Player.Character, 1);
  4475.                                 }
  4476.                                 this.SmokeProceEffectsFunc(Game.Player.Character, 1);
  4477.                             }
  4478.                             else
  4479.                                 this.StopSmokeFunc(Game.Player.Character, 1);
  4480.                         }
  4481.                     }
  4482.                     else if (this.smoke == 0)
  4483.                         this.StopSmokeFunc(Game.Player.Character, 1);
  4484.                 }
  4485.                 if (Game.Player.Character.IsSittingInVehicle())
  4486.                 {
  4487.                     if (this.smoke == 1 && Game.Player.Character.IsAlive && Game.Player.Character.IsSittingInVehicle())
  4488.                     {
  4489.                         if ((Entity)this.cig == (Entity)null)
  4490.                         {
  4491.                             this.cig = World.CreateProp((Model)this.smokeType, Game.Player.Character.Position, true, false);
  4492.                             if ((Entity)this.cig != (Entity)null)
  4493.                                 this.cig.IsVisible = false;
  4494.                             Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.cig, (InputArgument)Game.Player.Character, (InputArgument)true);
  4495.                             Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.cig, (InputArgument)Game.Player.Character.CurrentVehicle, (InputArgument)true);
  4496.                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  4497.                                 Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)7f, (InputArgument)(-12.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  4498.                             Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.cig, (InputArgument)Game.Player.Character, (InputArgument)Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)64017), (InputArgument)0.017, (InputArgument)(-0.01), (InputArgument)0.0, (InputArgument)0.0, (InputArgument)(-120.0), (InputArgument)(-90.0), (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)2, (InputArgument)true);
  4499.                         }
  4500.                         if (this.startSmoke)
  4501.                             this.StartSmokeFunc(Game.Player.Character, 2);
  4502.                         if ((Entity)this.cig != (Entity)null && !this.startSmoke)
  4503.                         {
  4504.                             if (this.cig_durability > 0)
  4505.                             {
  4506.                                 int num2;
  4507.                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"weapon@w_sp_jerrycan", (InputArgument)"unholster", (InputArgument)3))
  4508.                                 {
  4509.                                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"veh@driveby@first_person@driver@1h", (InputArgument)"outro_90l", (InputArgument)3))
  4510.                                     {
  4511.                                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"veh@driveby@first_person@driver@1h", (InputArgument)"outro_0", (InputArgument)3))
  4512.                                         {
  4513.                                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"cellphone@in_car@low@ds", (InputArgument)"cellphone_text_out", (InputArgument)3))
  4514.                                             {
  4515.                                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)"idle_a", (InputArgument)3))
  4516.                                                 {
  4517.                                                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"veh@driveby@first_person@passenger_left_handed@1h", (InputArgument)"outro_0", (InputArgument)3))
  4518.                                                     {
  4519.                                                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@veh@bike@police@front@base", (InputArgument)"horn_outro", (InputArgument)3))
  4520.                                                         {
  4521.                                                             if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)Game.Player.Character))
  4522.                                                             {
  4523.                                                                 if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
  4524.                                                                 {
  4525.                                                                     if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character) && !Game.IsDisabledControlPressed(2, Control.VehicleHandbrake) && !Game.IsDisabledControlPressed(2, Control.VehicleHorn))
  4526.                                                                     {
  4527.                                                                         num2 = !Game.IsDisabledControlPressed(2, Control.VehicleHeadlight) ? 1 : 0;
  4528.                                                                         goto label_191;
  4529.                                                                     }
  4530.                                                                 }
  4531.                                                             }
  4532.                                                         }
  4533.                                                     }
  4534.                                                 }
  4535.                                             }
  4536.                                         }
  4537.                                     }
  4538.                                 }
  4539.                                 num2 = 0;
  4540.                             label_191:
  4541.                                 if (num2 != 0)
  4542.                                     this.SmokeLoopFunc(Game.Player.Character, 2);
  4543.                                 this.SmokeProceEffectsFunc(Game.Player.Character, 2);
  4544.                             }
  4545.                             else
  4546.                                 this.StopSmokeFunc(Game.Player.Character, 2);
  4547.                         }
  4548.                     }
  4549.                     else if (this.smoke == 0)
  4550.                         this.StopSmokeFunc(Game.Player.Character, 2);
  4551.                 }
  4552.                 if ((Entity)this.cig != (Entity)null)
  4553.                 {
  4554.                     int num2;
  4555.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
  4556.                     {
  4557.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter", (InputArgument)3))
  4558.                         {
  4559.                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_a@exit", (InputArgument)"exit", (InputArgument)3))
  4560.                             {
  4561.                                 num2 = this.smoking ? 1 : 0;
  4562.                                 goto label_205;
  4563.                             }
  4564.                         }
  4565.                     }
  4566.                     num2 = 1;
  4567.                 label_205:
  4568.                     if (num2 != 0 && Game.Player.Character.Weapons.Current.Hash != WeaponHash.Unarmed)
  4569.                         Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  4570.                 }
  4571.                 if (Function.Call<bool>(Hash._0xBFA48E2FF417213F, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)1.3f, (InputArgument)this.GetHashKey(this.medbagObject), (InputArgument)false))
  4572.                 {
  4573.                     this.medbag = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)1.3f, (InputArgument)this.GetHashKey(this.medbagObject), (InputArgument)false, (InputArgument)false, (InputArgument)false);
  4574.                     if ((Entity)this.medbag != (Entity)null)
  4575.                         this.canRefill = true;
  4576.                 }
  4577.                 else
  4578.                 {
  4579.                     this.medbag = (Prop)null;
  4580.                     this.canRefill = false;
  4581.                 }
  4582.                 if (this.sellerDialogCounter > 0)
  4583.                     --this.sellerDialogCounter;
  4584.                 if (Game.Player.Character.IsDead)
  4585.                 {
  4586.                     if (this.doesPedHasInventoryBag(Game.Player.Character))
  4587.                         this.looseBagFunc(Game.Player.Character, this.bagModelReturn(Game.Player.Character));
  4588.                 }
  4589.             }
  4590.             if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.main_menu_btn) && !this.inMenu && (!this.inProcessWallet && !this.intimidation) && !this.deal && !this.findSellerOption)
  4591.                 this.update_inventory_status(Game.Player.Character);
  4592.             Model model;
  4593.             if (Function.Call<bool>(Hash._0xE2587F8CBBD87B1D, (InputArgument)0, (InputArgument)this.main_menu_btn) && !this.inMenu && (!this.inProcessWallet && !this.intimidation) && !this.deal && !this.findSellerOption)
  4594.             {
  4595.                 this.DisableControlsFunc(false);
  4596.                 this.Draw(4, this.hasBag, this.canTakeBagFromVehicle, this.hasHolster, this.isBagBought, this.isBagDropped);
  4597.                 if (this.hasBag)
  4598.                 {
  4599.                     if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.bag_menu_btn))
  4600.                         this.inMenu = true;
  4601.                 }
  4602.                 else if (this.canTakeBagFromVehicle)
  4603.                 {
  4604.                     if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.bag_menu_btn))
  4605.                         this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
  4606.                 }
  4607.                 if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.glasses_toggle_btn))
  4608.                 {
  4609.                     Game.Player.Character.Task.ClearAll();
  4610.                     Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  4611.                     this.soundFX(Game.Player.Character, "noise.wav");
  4612.                     if (Game.Player.Character.Model.Hash == this.GetHashKey("PLAYER_ZERO"))
  4613.                     {
  4614.                         if (!this.glasses0)
  4615.                         {
  4616.                             if (!Game.Player.Character.IsSittingInVehicle())
  4617.                             {
  4618.                                 Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_a", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4619.                                 this.PropsControlFunc(Game.Player.Character, "", true, "MICHAELES GLASSES", 2);
  4620.                                 this.glasses0 = true;
  4621.                                 Script.Wait(2000);
  4622.                                 Game.Player.CanControlCharacter = true;
  4623.                                 Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_a");
  4624.                             }
  4625.                             else
  4626.                             {
  4627.                                 Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4628.                                 Script.Wait(500);
  4629.                                 this.PropsControlFunc(Game.Player.Character, "", true, "MICHAELES GLASSES", 2);
  4630.                                 this.glasses0 = true;
  4631.                             }
  4632.                         }
  4633.                         else if (!Game.Player.Character.IsSittingInVehicle())
  4634.                         {
  4635.                             Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_d", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4636.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MICHAELES GLASSES", 2);
  4637.                             this.glasses0 = false;
  4638.                             Script.Wait(1300);
  4639.                             Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_d");
  4640.                             Game.Player.CanControlCharacter = true;
  4641.                         }
  4642.                         else
  4643.                         {
  4644.                             Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4645.                             Script.Wait(500);
  4646.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MICHAELES GLASSES", 2);
  4647.                             this.glasses0 = false;
  4648.                         }
  4649.                     }
  4650.                     if (Game.Player.Character.Model.Hash == this.GetHashKey("PLAYER_ONE"))
  4651.                     {
  4652.                         if (!this.glasses1)
  4653.                         {
  4654.                             if (!Game.Player.Character.IsSittingInVehicle())
  4655.                             {
  4656.                                 Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_a", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4657.                                 this.PropsControlFunc(Game.Player.Character, "", true, "FRANKLINS GLASSES", 2);
  4658.                                 this.glasses1 = true;
  4659.                                 Script.Wait(2000);
  4660.                                 Game.Player.CanControlCharacter = true;
  4661.                                 Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_a");
  4662.                             }
  4663.                             else
  4664.                             {
  4665.                                 Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4666.                                 Script.Wait(500);
  4667.                                 this.PropsControlFunc(Game.Player.Character, "", true, "FRANKLINS GLASSES", 2);
  4668.                                 this.glasses1 = true;
  4669.                             }
  4670.                         }
  4671.                         else if (!Game.Player.Character.IsSittingInVehicle())
  4672.                         {
  4673.                             Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_d", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4674.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "FRANKLINS GLASSES", 2);
  4675.                             this.glasses1 = false;
  4676.                             Script.Wait(1300);
  4677.                             Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_d");
  4678.                             Game.Player.CanControlCharacter = true;
  4679.                         }
  4680.                         else
  4681.                         {
  4682.                             Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4683.                             Script.Wait(500);
  4684.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "FRANKLINS GLASSES", 2);
  4685.                             this.glasses1 = false;
  4686.                         }
  4687.                     }
  4688.                     if (Game.Player.Character.Model.Hash == this.GetHashKey("PLAYER_TWO"))
  4689.                     {
  4690.                         if (!this.glasses2)
  4691.                         {
  4692.                             if (!Game.Player.Character.IsSittingInVehicle())
  4693.                             {
  4694.                                 Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_a", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4695.                                 this.PropsControlFunc(Game.Player.Character, "", true, "TREVORS GLASSES", 2);
  4696.                                 this.glasses2 = true;
  4697.                                 Script.Wait(2000);
  4698.                                 Game.Player.CanControlCharacter = true;
  4699.                                 Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_a");
  4700.                             }
  4701.                             else
  4702.                             {
  4703.                                 Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4704.                                 Script.Wait(500);
  4705.                                 this.PropsControlFunc(Game.Player.Character, "", true, "TREVORS GLASSES", 2);
  4706.                                 this.glasses2 = true;
  4707.                             }
  4708.                         }
  4709.                         else if (!Game.Player.Character.IsSittingInVehicle())
  4710.                         {
  4711.                             Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_d", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4712.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "TREVORS GLASSES", 2);
  4713.                             this.glasses2 = false;
  4714.                             Script.Wait(1300);
  4715.                             Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_d");
  4716.                             Game.Player.CanControlCharacter = true;
  4717.                         }
  4718.                         else
  4719.                         {
  4720.                             Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4721.                             Script.Wait(500);
  4722.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "TREVORS GLASSES", 2);
  4723.                             this.glasses2 = false;
  4724.                         }
  4725.                     }
  4726.                     if (Game.Player.Character.Model.Hash == this.GetHashKey("mp_m_freemode_01"))
  4727.                     {
  4728.                         if (!this.glasses3)
  4729.                         {
  4730.                             if (!Game.Player.Character.IsSittingInVehicle())
  4731.                             {
  4732.                                 Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_a", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4733.                                 this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLASSES", 2);
  4734.                                 this.glasses3 = true;
  4735.                                 Script.Wait(2000);
  4736.                                 Game.Player.CanControlCharacter = true;
  4737.                                 Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_a");
  4738.                             }
  4739.                             else
  4740.                             {
  4741.                                 Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4742.                                 Script.Wait(500);
  4743.                                 this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLASSES", 2);
  4744.                                 this.glasses3 = true;
  4745.                             }
  4746.                         }
  4747.                         else if (!Game.Player.Character.IsSittingInVehicle())
  4748.                         {
  4749.                             Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_d", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4750.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLASSES", 2);
  4751.                             this.glasses3 = false;
  4752.                             Script.Wait(1300);
  4753.                             Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_d");
  4754.                             Game.Player.CanControlCharacter = true;
  4755.                         }
  4756.                         else
  4757.                         {
  4758.                             Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4759.                             Script.Wait(500);
  4760.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLASSES", 2);
  4761.                             this.glasses3 = false;
  4762.                         }
  4763.                     }
  4764.                     if (Game.Player.Character.Model.Hash == this.GetHashKey("mp_f_freemode_01"))
  4765.                     {
  4766.                         if (!this.glasses4)
  4767.                         {
  4768.                             if (!Game.Player.Character.IsSittingInVehicle())
  4769.                             {
  4770.                                 Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_a", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4771.                                 this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLASSES", 2);
  4772.                                 this.glasses3 = true;
  4773.                                 Script.Wait(2000);
  4774.                                 Game.Player.CanControlCharacter = true;
  4775.                                 Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_a");
  4776.                             }
  4777.                             else
  4778.                             {
  4779.                                 Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4780.                                 Script.Wait(500);
  4781.                                 this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLASSES", 2);
  4782.                                 this.glasses3 = true;
  4783.                             }
  4784.                         }
  4785.                         else if (!Game.Player.Character.IsSittingInVehicle())
  4786.                         {
  4787.                             Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_d", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4788.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLASSES", 2);
  4789.                             this.glasses3 = false;
  4790.                             Script.Wait(1300);
  4791.                             Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_d");
  4792.                             Game.Player.CanControlCharacter = true;
  4793.                         }
  4794.                         else
  4795.                         {
  4796.                             Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4797.                             Script.Wait(500);
  4798.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLASSES", 2);
  4799.                             this.glasses3 = false;
  4800.                         }
  4801.                     }
  4802.                 }
  4803.                 if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.gloves_toggle_btn))
  4804.                 {
  4805.                     Game.Player.Character.Task.ClearAll();
  4806.                     Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  4807.                     Script.Wait(100);
  4808.                     Game.Player.Character.Task.PlayAnimation("switch@michael@closet", "closet_c", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4809.                     this.soundFX(Game.Player.Character, "noise.wav");
  4810.                     model = Game.Player.Character.Model;
  4811.                     if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
  4812.                     {
  4813.                         if (!this.gloves0)
  4814.                         {
  4815.                             this.PropsControlFunc(Game.Player.Character, "", true, "MICHAELES GLOVES", 1);
  4816.                             this.gloves0 = true;
  4817.                         }
  4818.                         else
  4819.                         {
  4820.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MICHAELES GLOVES", 1);
  4821.                             this.gloves0 = false;
  4822.                         }
  4823.                     }
  4824.                     model = Game.Player.Character.Model;
  4825.                     if (model.Hash == this.GetHashKey("PLAYER_ONE"))
  4826.                     {
  4827.                         if (!this.gloves1)
  4828.                         {
  4829.                             this.PropsControlFunc(Game.Player.Character, "", true, "FRANKLINS GLOVES", 1);
  4830.                             this.gloves1 = true;
  4831.                         }
  4832.                         else
  4833.                         {
  4834.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "FRANKLINS GLOVES", 1);
  4835.                             this.gloves1 = false;
  4836.                         }
  4837.                     }
  4838.                     model = Game.Player.Character.Model;
  4839.                     if (model.Hash == this.GetHashKey("PLAYER_TWO"))
  4840.                     {
  4841.                         if (!this.gloves2)
  4842.                         {
  4843.                             this.PropsControlFunc(Game.Player.Character, "", true, "TREVORS GLOVES", 1);
  4844.                             this.gloves2 = true;
  4845.                         }
  4846.                         else
  4847.                         {
  4848.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "TREVORS GLOVES", 1);
  4849.                             this.gloves2 = false;
  4850.                         }
  4851.                     }
  4852.                     model = Game.Player.Character.Model;
  4853.                     if (model.Hash == this.GetHashKey("mp_m_freemode_01"))
  4854.                     {
  4855.                         if (!this.gloves3)
  4856.                         {
  4857.                             this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLOVES", 1);
  4858.                             this.gloves3 = true;
  4859.                         }
  4860.                         else
  4861.                         {
  4862.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLOVES", 1);
  4863.                             this.gloves3 = false;
  4864.                         }
  4865.                     }
  4866.                     model = Game.Player.Character.Model;
  4867.                     if (model.Hash == this.GetHashKey("mp_f_freemode_01"))
  4868.                     {
  4869.                         if (!this.gloves4)
  4870.                         {
  4871.                             this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLOVES", 1);
  4872.                             this.gloves4 = true;
  4873.                         }
  4874.                         else
  4875.                         {
  4876.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLOVES", 1);
  4877.                             this.gloves4 = false;
  4878.                         }
  4879.                     }
  4880.                     Script.Wait(2000);
  4881.                     Game.Player.Character.Task.ClearAnimation("switch@michael@closet", "closet_c");
  4882.                 }
  4883.                 if (Function.Call<bool>(Hash._0x580417101DDB492F, (InputArgument)0, (InputArgument)this.mask_toggle_btn))
  4884.                 {
  4885.                     Game.Player.Character.Task.ClearAll();
  4886.                     Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  4887.                     Script.Wait(100);
  4888.                     int num;
  4889.                     if (Game.Player.Character.IsSittingInVehicle())
  4890.                     {
  4891.                         if (!Function.Call<bool>(Hash._0x39DAC362EE65FA28, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
  4892.                         {
  4893.                             if (!Function.Call<bool>(Hash._0xBF94DD42F63BDED2, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
  4894.                             {
  4895.                                 num = !Function.Call<bool>(Hash._0x94495889E22C6479, (InputArgument)Game.Player.Character) ? 1 : 0;
  4896.                                 goto label_323;
  4897.                             }
  4898.                         }
  4899.                     }
  4900.                     num = 0;
  4901.                 label_323:
  4902.                     if (num != 0)
  4903.                         Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4904.                     else if (!Game.Player.Character.IsSittingInVehicle())
  4905.                         Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  4906.                     this.soundFX(Game.Player.Character, "noise.wav");
  4907.                     model = Game.Player.Character.Model;
  4908.                     if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
  4909.                     {
  4910.                         if (!this.mask0)
  4911.                         {
  4912.                             this.PropsControlFunc(Game.Player.Character, "", true, "MICHAELES MASK", 1);
  4913.                             this.mask0 = true;
  4914.                         }
  4915.                         else
  4916.                         {
  4917.                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MICHAELES MASK", 1);
  4918.                             this.mask0 = false;
  4919.                         }
  4920.                     }
  4921.                     else
  4922.                     {
  4923.                         model = Game.Player.Character.Model;
  4924.                         if (model.Hash == this.GetHashKey("PLAYER_ONE"))
  4925.                         {
  4926.                             if (!this.mask1)
  4927.                             {
  4928.                                 this.PropsControlFunc(Game.Player.Character, "", true, "FRANKLINS MASK", 1);
  4929.                                 this.mask1 = true;
  4930.                             }
  4931.                             else
  4932.                             {
  4933.                                 this.PropsControlFunc(Game.Player.Character, "OFF", false, "FRANKLINS MASK", 1);
  4934.                                 this.mask1 = false;
  4935.                             }
  4936.                         }
  4937.                         else
  4938.                         {
  4939.                             model = Game.Player.Character.Model;
  4940.                             if (model.Hash == this.GetHashKey("PLAYER_TWO"))
  4941.                             {
  4942.                                 if (!this.mask2)
  4943.                                 {
  4944.                                     this.PropsControlFunc(Game.Player.Character, "", true, "TREVORS MASK", 1);
  4945.                                     this.mask2 = true;
  4946.                                 }
  4947.                                 else
  4948.                                 {
  4949.                                     this.PropsControlFunc(Game.Player.Character, "OFF", false, "TREVORS MASK", 1);
  4950.                                     this.mask2 = false;
  4951.                                 }
  4952.                             }
  4953.                             else
  4954.                             {
  4955.                                 model = Game.Player.Character.Model;
  4956.                                 if (model.Hash == this.GetHashKey("mp_m_freemode_01"))
  4957.                                 {
  4958.                                     if (!this.mask3)
  4959.                                     {
  4960.                                         this.PropsControlFunc(Game.Player.Character, "", true, "MPS MASK", 1);
  4961.                                         this.mask3 = true;
  4962.                                     }
  4963.                                     else
  4964.                                     {
  4965.                                         this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS MASK", 1);
  4966.                                         this.mask3 = false;
  4967.                                     }
  4968.                                 }
  4969.                                 else
  4970.                                 {
  4971.                                     model = Game.Player.Character.Model;
  4972.                                     if (model.Hash == this.GetHashKey("mp_f_freemode_01"))
  4973.                                     {
  4974.                                         if (!this.mask4)
  4975.                                         {
  4976.                                             this.PropsControlFunc(Game.Player.Character, "", true, "MPS MASK", 1);
  4977.                                             this.mask4 = true;
  4978.                                         }
  4979.                                         else
  4980.                                         {
  4981.                                             this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS MASK", 1);
  4982.                                             this.mask4 = false;
  4983.                                         }
  4984.                                     }
  4985.                                 }
  4986.                             }
  4987.                         }
  4988.                     }
  4989.                 }
  4990.                 int num1;
  4991.                 if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
  4992.                 {
  4993.                     if (!Function.Call<bool>(Hash._0xE3B6097CC25AA69E, (InputArgument)Game.Player.Character))
  4994.                     {
  4995.                         if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)Game.Player.Character))
  4996.                         {
  4997.                             num1 = !Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player) ? 1 : 0;
  4998.                             goto label_354;
  4999.                         }
  5000.                     }
  5001.                 }
  5002.                 num1 = 0;
  5003.             label_354:
  5004.                 if (num1 != 0)
  5005.                 {
  5006.                     model = Game.Player.Character.Model;
  5007.                     int num2;
  5008.                     if (model.Hash != this.GetHashKey("mp_m_freemode_01"))
  5009.                     {
  5010.                         model = Game.Player.Character.Model;
  5011.                         if (model.Hash != this.GetHashKey("mp_f_freemode_01"))
  5012.                         {
  5013.                             model = Game.Player.Character.Model;
  5014.                             if (model.Hash != this.GetHashKey("PLAYER_ZERO"))
  5015.                             {
  5016.                                 model = Game.Player.Character.Model;
  5017.                                 if (model.Hash != this.GetHashKey("PLAYER_ONE"))
  5018.                                 {
  5019.                                     model = Game.Player.Character.Model;
  5020.                                     num2 = model.Hash == this.GetHashKey("PLAYER_TWO") ? 1 : 0;
  5021.                                     goto label_361;
  5022.                                 }
  5023.                             }
  5024.                         }
  5025.                     }
  5026.                     num2 = 1;
  5027.                 label_361:
  5028.                     if (num2 != 0)
  5029.                         this.headset = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)Game.Player.Character, (InputArgument)2) == 0;
  5030.                     if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.earphone_toggle_btn))
  5031.                     {
  5032.                         Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  5033.                         Script.Wait(100);
  5034.                         int num3;
  5035.                         if (Game.Player.Character.IsSittingInVehicle())
  5036.                         {
  5037.                             if (!Function.Call<bool>(Hash._0x39DAC362EE65FA28, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
  5038.                             {
  5039.                                 if (!Function.Call<bool>(Hash._0xBF94DD42F63BDED2, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
  5040.                                 {
  5041.                                     num3 = !Function.Call<bool>(Hash._0x94495889E22C6479, (InputArgument)Game.Player.Character) ? 1 : 0;
  5042.                                     goto label_369;
  5043.                                 }
  5044.                             }
  5045.                         }
  5046.                         num3 = 0;
  5047.                     label_369:
  5048.                         if (num3 != 0)
  5049.                         {
  5050.                             Game.Player.Character.Task.ClearAll();
  5051.                             Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)45f, (InputArgument)(-12.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  5052.                         }
  5053.                         else if (!Game.Player.Character.IsSittingInVehicle())
  5054.                         {
  5055.                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)3))
  5056.                                 Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)45f, (InputArgument)(-12.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  5057.                         }
  5058.                         this.soundFX(Game.Player.Character, "beep.wav");
  5059.                         if (!this.headset)
  5060.                         {
  5061.                             Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  5062.                             UI.Notify("Mobile radio is ~g~available", true);
  5063.                             if (Function.Call<bool>(Hash._0x2B16A3BFF1FBCE49, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)0, (InputArgument)0))
  5064.                                 Function.Call(Hash._0x93376B65A266EB5F, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)0, (InputArgument)0);
  5065.                             else
  5066.                                 UI.Notify("Invalid Prop number", true);
  5067.                             this.headset = true;
  5068.                             if (this.headset && !Function.Call<bool>(Hash._0xB35CE999E8EF317E, Array.Empty<InputArgument>()))
  5069.                             {
  5070.                                 Function.Call(Hash._0x1098355A16064BB3, (InputArgument)true);
  5071.                                 Function.Call(Hash._0xA619B168B8A8570F, (InputArgument)((int)byte.MaxValue));
  5072.                             }
  5073.                         }
  5074.                         else
  5075.                         {
  5076.                             Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
  5077.                             UI.Notify("Mobile radio is ~o~unavailable", true);
  5078.                             Function.Call(Hash._0x0943E5B8E078E76E, (InputArgument)Game.Player.Character, (InputArgument)2);
  5079.                             this.headset = false;
  5080.                             Function.Call(Hash._0xC69EDA28699D5107, (InputArgument)"OFF");
  5081.                             Function.Call(Hash._0x1098355A16064BB3, (InputArgument)false);
  5082.                         }
  5083.                     }
  5084.                     int num4;
  5085.                     if (this.headset)
  5086.                     {
  5087.                         if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.readio_off_btn))
  5088.                         {
  5089.                             if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
  5090.                             {
  5091.                                 if (!Function.Call<bool>(Hash._0xE3B6097CC25AA69E, (InputArgument)Game.Player.Character))
  5092.                                 {
  5093.                                     if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)Game.Player.Character))
  5094.                                     {
  5095.                                         num4 = !Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player) ? 1 : 0;
  5096.                                         goto label_390;
  5097.                                     }
  5098.                                 }
  5099.                             }
  5100.                         }
  5101.                     }
  5102.                     num4 = 0;
  5103.                 label_390:
  5104.                     if (num4 != 0)
  5105.                     {
  5106.                         int num3;
  5107.                         if (Game.Player.Character.IsSittingInVehicle())
  5108.                         {
  5109.                             if (!Function.Call<bool>(Hash._0x39DAC362EE65FA28, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
  5110.                             {
  5111.                                 if (!Function.Call<bool>(Hash._0xBF94DD42F63BDED2, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
  5112.                                 {
  5113.                                     num3 = !Function.Call<bool>(Hash._0x94495889E22C6479, (InputArgument)Game.Player.Character) ? 1 : 0;
  5114.                                     goto label_396;
  5115.                                 }
  5116.                             }
  5117.                         }
  5118.                         num3 = 0;
  5119.                     label_396:
  5120.                         if (num3 != 0)
  5121.                         {
  5122.                             Game.Player.Character.Task.ClearAll();
  5123.                             Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)45f, (InputArgument)(-12.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  5124.                         }
  5125.                         else if (!Game.Player.Character.IsSittingInVehicle())
  5126.                         {
  5127.                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)3))
  5128.                                 Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)45f, (InputArgument)(-12.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  5129.                         }
  5130.                         if (!Function.Call<bool>(Hash._0xB35CE999E8EF317E, Array.Empty<InputArgument>()))
  5131.                         {
  5132.                             Function.Call(Hash._0x1098355A16064BB3, (InputArgument)true);
  5133.                             if (this.prevStation != (int)byte.MaxValue)
  5134.                                 Function.Call(Hash._0xA619B168B8A8570F, (InputArgument)this.prevStation);
  5135.                             else
  5136.                                 Function.Call(Hash._0xA619B168B8A8570F, (InputArgument)0);
  5137.                             this.soundFX(Game.Player.Character, "beep.wav");
  5138.                         }
  5139.                         else
  5140.                         {
  5141.                             this.soundFX(Game.Player.Character, "beep.wav");
  5142.                             this.prevStation = Function.Call<int>(Hash._0xE8AF77C4C06ADC93, Array.Empty<InputArgument>());
  5143.                             Function.Call(Hash._0xA619B168B8A8570F, (InputArgument)((int)byte.MaxValue));
  5144.                             Function.Call(Hash._0x1098355A16064BB3, (InputArgument)false);
  5145.                         }
  5146.                     }
  5147.                 }
  5148.                 int num5;
  5149.                 if (Function.Call<bool>(Hash._0xE2587F8CBBD87B1D, (InputArgument)0, (InputArgument)this.wallet_btn))
  5150.                 {
  5151.                     if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character) && Game.Player.Character.IsOnFoot && !Game.Player.Character.IsRagdoll)
  5152.                     {
  5153.                         num5 = !this.smoking ? 1 : 0;
  5154.                         goto label_414;
  5155.                     }
  5156.                 }
  5157.                 num5 = 0;
  5158.             label_414:
  5159.                 if (num5 != 0)
  5160.                 {
  5161.                     int num2;
  5162.                     if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
  5163.                     {
  5164.                         if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player.Character))
  5165.                         {
  5166.                             num2 = !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) ? 1 : 0;
  5167.                             goto label_419;
  5168.                         }
  5169.                     }
  5170.                     num2 = 0;
  5171.                 label_419:
  5172.                     if (num2 != 0 && (!Game.Player.Character.IsSittingInVehicle() && !Game.Player.Character.IsSwimming && (!Game.Player.Character.IsSwimmingUnderWater && !Game.Player.Character.IsJumping) && (!Game.Player.Character.IsRagdoll && !Game.Player.Character.IsBeingStunned && (!Game.Player.Character.IsClimbing && !Game.Player.Character.IsDiving)) && (!Game.Player.Character.IsFalling && !Game.Player.Character.IsGettingIntoAVehicle && (!Game.Player.Character.IsInAir && Game.Player.Character.IsOnFoot)) && Game.Player.Character.IsIdle))
  5173.                     {
  5174.                         this.inProcessWallet = true;
  5175.                         this.walletCount = false;
  5176.                         Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  5177.                         Function.Call(Hash._0xBAF20C5432058024, (InputArgument)Game.Player.Character, (InputArgument)false);
  5178.                         int num3;
  5179.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_a@idle_a", (InputArgument)"idle_c", (InputArgument)3))
  5180.                         {
  5181.                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
  5182.                             {
  5183.                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
  5184.                                 {
  5185.                                     num3 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_player_inteat@pnq", (InputArgument)"loop_fp", (InputArgument)3) ? 1 : 0;
  5186.                                     goto label_425;
  5187.                                 }
  5188.                             }
  5189.                         }
  5190.                         num3 = 0;
  5191.                     label_425:
  5192.                         if (num3 != 0)
  5193.                         {
  5194.                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  5195.                             {
  5196.                                 Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)4f, (InputArgument)(-4f), (InputArgument)(-1), (InputArgument)50, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  5197.                                 Script.Wait(500);
  5198.                                 if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  5199.                                     Game.Player.Character.Task.ClearAnimation("mp_arrest_paired", "cop_p1_rf_right_0");
  5200.                             }
  5201.                             this.soundFX(Game.Player.Character, "grab.wav");
  5202.                             this.wallet = World.CreateProp((Model)"prop_ld_wallet_02", Game.Player.Character.Position, true, false);
  5203.                             this.walletOpened = World.CreateProp((Model)"prop_ld_wallet_pickup", Game.Player.Character.Position, true, false);
  5204.                             Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.wallet, (InputArgument)Game.Player.Character, (InputArgument)true);
  5205.                             int num4 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)36029);
  5206.                             int num6 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)6286);
  5207.                             int num7;
  5208.                             if ((Entity)this.wallet == (Entity)null)
  5209.                                 num7 = Function.Call<bool>(Hash._0xBFA48E2FF417213F, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_02"), (InputArgument)0) ? 1 : 0;
  5210.                             else
  5211.                                 num7 = 0;
  5212.                             if (num7 != 0)
  5213.                             {
  5214.                                 Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_02"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  5215.                                 if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) && (Entity)this.wallet == (Entity)null)
  5216.                                     this.wallet = prop;
  5217.                             }
  5218.                             int num8;
  5219.                             if ((Entity)this.walletOpened == (Entity)null)
  5220.                                 num8 = Function.Call<bool>(Hash._0xBFA48E2FF417213F, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_pickup"), (InputArgument)0) ? 1 : 0;
  5221.                             else
  5222.                                 num8 = 0;
  5223.                             if (num8 != 0)
  5224.                             {
  5225.                                 Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_pickup"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  5226.                                 if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) && (Entity)this.walletOpened == (Entity)null)
  5227.                                     this.walletOpened = prop;
  5228.                             }
  5229.                             if (Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_02"), (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  5230.                             {
  5231.                                 Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_02"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  5232.                                 int num9;
  5233.                                 if ((Entity)prop != (Entity)this.wallet)
  5234.                                     num9 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) ? 1 : 0;
  5235.                                 else
  5236.                                     num9 = 0;
  5237.                                 if (num9 != 0 && prop.Exists())
  5238.                                     prop.Delete();
  5239.                             }
  5240.                             if (Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_pickup"), (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  5241.                             {
  5242.                                 Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_pickup"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  5243.                                 int num9;
  5244.                                 if ((Entity)prop != (Entity)this.walletOpened)
  5245.                                     num9 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) ? 1 : 0;
  5246.                                 else
  5247.                                     num9 = 0;
  5248.                                 if (num9 != 0 && prop.Exists())
  5249.                                     prop.Delete();
  5250.                             }
  5251.                             if ((Entity)this.wallet != (Entity)null && this.wallet.Exists())
  5252.                             {
  5253.                                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.wallet, (InputArgument)Game.Player.Character, (InputArgument)num6, (InputArgument)0.1, (InputArgument)0.015, (InputArgument)(-0.025), (InputArgument)115.0, (InputArgument)20.0, (InputArgument)0.0, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)0, (InputArgument)true);
  5254.                                 this.wallet.IsVisible = true;
  5255.                             }
  5256.                             if ((Entity)this.walletOpened != (Entity)null && this.wallet.Exists())
  5257.                             {
  5258.                                 Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.walletOpened, (InputArgument)Game.Player.Character, (InputArgument)num4, (InputArgument)0.15, (InputArgument)0.025, (InputArgument)0.1, (InputArgument)(-85.0), (InputArgument)(-45.0), (InputArgument)(-10.0), (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)0, (InputArgument)true);
  5259.                                 this.walletOpened.IsVisible = false;
  5260.                             }
  5261.                             Script.Wait(700);
  5262.                             this.walletCount = true;
  5263.                         }
  5264.                     }
  5265.                 }
  5266.                 if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.smokeBTN) && !this.inProcessCigsAndPills)
  5267.                 {
  5268.                     if (this.cigsCount > 0)
  5269.                     {
  5270.                         this.checkMask(Game.Player.Character);
  5271.                         if (!this.MaskIsOn && !Game.Player.Character.IsWearingHelmet)
  5272.                         {
  5273.                             Game.Player.Character.Task.ClearAll();
  5274.                             Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  5275.                             if (this.smoke == -1 || this.smoke == 0)
  5276.                             {
  5277.                                 Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  5278.                                 if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey(this.smokeType), (InputArgument)true, (InputArgument)false, (InputArgument)false)))
  5279.                                     Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey(this.smokeType), (InputArgument)true, (InputArgument)false, (InputArgument)false).Delete();
  5280.                                 if (!this.MaskIsOn)
  5281.                                 {
  5282.                                     this.smoke = 1;
  5283.                                     this.startSmoke = true;
  5284.                                     this.cigsAndPillsCounter = 9;
  5285.                                     if (!this.playCigAndSmokeAnim)
  5286.                                         this.playCigAndSmokeAnim = true;
  5287.                                 }
  5288.                             }
  5289.                             else if (this.smoke == 1)
  5290.                                 this.smoke = 0;
  5291.                         }
  5292.                         else
  5293.                         {
  5294.                             Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
  5295.                             UI.Notify("~o~Put off your mask or helmet first", true);
  5296.                         }
  5297.                     }
  5298.                     else
  5299.                     {
  5300.                         Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
  5301.                         UI.Notify("Cigs: ~r~0", true);
  5302.                     }
  5303.                 }
  5304.                 if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.swallowBTN) && !this.inProcessCigsAndPills)
  5305.                 {
  5306.                     if (this.pillsCount > 0)
  5307.                     {
  5308.                         this.checkMask(Game.Player.Character);
  5309.                         if (!this.MaskIsOn && !Game.Player.Character.IsWearingHelmet)
  5310.                         {
  5311.                             int num2;
  5312.                             if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
  5313.                             {
  5314.                                 if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player.Character))
  5315.                                 {
  5316.                                     num2 = !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) ? 1 : 0;
  5317.                                     goto label_487;
  5318.                                 }
  5319.                             }
  5320.                             num2 = 0;
  5321.                         label_487:
  5322.                             if (num2 != 0)
  5323.                             {
  5324.                                 int num3;
  5325.                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_a@idle_a", (InputArgument)"idle_c", (InputArgument)3))
  5326.                                 {
  5327.                                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
  5328.                                     {
  5329.                                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
  5330.                                         {
  5331.                                             num3 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_player_inteat@pnq", (InputArgument)"loop_fp", (InputArgument)3) ? 1 : 0;
  5332.                                             goto label_493;
  5333.                                         }
  5334.                                     }
  5335.                                 }
  5336.                                 num3 = 0;
  5337.                             label_493:
  5338.                                 if (num3 != 0)
  5339.                                 {
  5340.                                     Function.Call(Hash._0xBAF20C5432058024, (InputArgument)Game.Player.Character, (InputArgument)false);
  5341.                                     Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  5342.                                     if (Game.Player.Character.IsSittingInVehicle())
  5343.                                     {
  5344.                                         int num4;
  5345.                                         if (Game.Player.Character.IsSittingInVehicle())
  5346.                                         {
  5347.                                             if (Function.Call<bool>(Hash._0x7F6DB52EEFC96DF8, (InputArgument)Game.Player.Character.CurrentVehicle.Model))
  5348.                                             {
  5349.                                                 num4 = !Game.Player.Character.IsDoingDriveBy ? 1 : 0;
  5350.                                                 goto label_499;
  5351.                                             }
  5352.                                         }
  5353.                                         num4 = 0;
  5354.                                     label_499:
  5355.                                         if (num4 != 0)
  5356.                                         {
  5357.                                             Game.Player.Character.Task.ClearAll();
  5358.                                             this.inProcessCigsAndPills = true;
  5359.                                             this.cigsAndPillsCounter = 15;
  5360.                                             this.blockKeys = true;
  5361.                                         }
  5362.                                     }
  5363.                                     else
  5364.                                     {
  5365.                                         Game.Player.Character.Task.ClearAll();
  5366.                                         this.inProcessCigsAndPills = true;
  5367.                                         this.cigsAndPillsCounter = 15;
  5368.                                         this.blockKeys = true;
  5369.                                     }
  5370.                                 }
  5371.                             }
  5372.                         }
  5373.                         else
  5374.                         {
  5375.                             Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
  5376.                             UI.Notify("~o~Put off your mask or helmet first", true);
  5377.                         }
  5378.                     }
  5379.                     else
  5380.                     {
  5381.                         Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
  5382.                         UI.Notify("Pills: ~r~0", true);
  5383.                     }
  5384.                 }
  5385.                 int num10;
  5386.                 if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
  5387.                 {
  5388.                     if (!Function.Call<bool>(Hash._0xE3B6097CC25AA69E, (InputArgument)Game.Player.Character))
  5389.                     {
  5390.                         num10 = !Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player) ? 1 : 0;
  5391.                         goto label_511;
  5392.                     }
  5393.                 }
  5394.                 num10 = 0;
  5395.             label_511:
  5396.                 if (num10 != 0)
  5397.                 {
  5398.                     if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.intimidate_btn))
  5399.                     {
  5400.                         int num2;
  5401.                         if (this.hasHolster && (Entity)this.holster != (Entity)null && this.holster.Exists())
  5402.                             num2 = Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)Game.Player.Character) == 2725352035U ? 1 : 0;
  5403.                         else
  5404.                             num2 = 0;
  5405.                         if (num2 != 0)
  5406.                         {
  5407.                             if (this.intimidation)
  5408.                             {
  5409.                                 Array.Clear((Array)this.closestPeds, 0, this.closestPeds.Length);
  5410.                                 int num3;
  5411.                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
  5412.                                 {
  5413.                                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  5414.                                     {
  5415.                                         num3 = Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3) ? 1 : 0;
  5416.                                         goto label_522;
  5417.                                     }
  5418.                                 }
  5419.                                 num3 = 1;
  5420.                             label_522:
  5421.                                 if (num3 != 0)
  5422.                                 {
  5423.                                     Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"idle", (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)3);
  5424.                                     Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"intro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
  5425.                                     Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"outro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
  5426.                                 }
  5427.                             }
  5428.                             else
  5429.                             {
  5430.                                 int num3;
  5431.                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
  5432.                                 {
  5433.                                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  5434.                                     {
  5435.                                         num3 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3) ? 1 : 0;
  5436.                                         goto label_528;
  5437.                                     }
  5438.                                 }
  5439.                                 num3 = 0;
  5440.                             label_528:
  5441.                                 if (num3 != 0)
  5442.                                 {
  5443.                                     this.AttackSpeech(Game.Player.Character);
  5444.                                     Game.Player.Character.CanPlayGestures = false;
  5445.                                     this.GetClosestPedDetectionFunction(Game.Player.Character);
  5446.                                     Game.Player.Character.Task.PlayAnimation("move_m@intimidation@cop@unarmed", "idle", 12f, -1, AnimationFlags.StayInEndFrame | AnimationFlags.AllowRotation | AnimationFlags.CancelableWithMovement);
  5447.                                     this.intimidation = true;
  5448.                                 }
  5449.                             }
  5450.                         }
  5451.                     }
  5452.                     if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.holster_toggle_btn) && this.hasHolster)
  5453.                     {
  5454.                         if (!this.useHipHolster)
  5455.                         {
  5456.                             if (Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_pistol_holster"), (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  5457.                             {
  5458.                                 Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_pistol_holster"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  5459.                                 if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character))
  5460.                                 {
  5461.                                     this.holster = prop;
  5462.                                     this.AttachPistol(Game.Player.Character);
  5463.                                     this.UnsetHolster(Game.Player.Character);
  5464.                                 }
  5465.                                 else
  5466.                                     this.SetHolster(Game.Player.Character);
  5467.                             }
  5468.                             else
  5469.                                 this.SetHolster(Game.Player.Character);
  5470.                         }
  5471.                         else if (Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_holster_01"), (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  5472.                         {
  5473.                             Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_holster_01"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  5474.                             if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character))
  5475.                             {
  5476.                                 this.holster = prop;
  5477.                                 this.AttachPistol(Game.Player.Character);
  5478.                                 this.UnsetHolster(Game.Player.Character);
  5479.                             }
  5480.                             else
  5481.                                 this.SetHolster(Game.Player.Character);
  5482.                         }
  5483.                         else
  5484.                             this.SetHolster(Game.Player.Character);
  5485.                     }
  5486.                 }
  5487.             }
  5488.             if (this.customHolsterAnim && (Entity)this.bagModelReturn(Game.Player.Character) == (Entity)null)
  5489.             {
  5490.                 int num1;
  5491.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  5492.                 {
  5493.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3))
  5494.                     {
  5495.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
  5496.                         {
  5497.                             num1 = Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3) ? 1 : 0;
  5498.                             goto label_555;
  5499.                         }
  5500.                     }
  5501.                 }
  5502.                 num1 = 1;
  5503.             label_555:
  5504.                 if (num1 != 0 && this.isOccupied(Game.Player.Character))
  5505.                 {
  5506.                     Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"idle", (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)3);
  5507.                     Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"intro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
  5508.                     Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"outro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
  5509.                 }
  5510.                 if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro") > 0.2)
  5511.                 {
  5512.                     int num2;
  5513.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
  5514.                     {
  5515.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  5516.                         {
  5517.                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3))
  5518.                             {
  5519.                                 num2 = Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3) ? 1 : 0;
  5520.                                 goto label_563;
  5521.                             }
  5522.                         }
  5523.                     }
  5524.                     num2 = 1;
  5525.                 label_563:
  5526.                     if (num2 != 0)
  5527.                     {
  5528.                         Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"idle", (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)3);
  5529.                         Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"intro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
  5530.                         Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"outro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
  5531.                         Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"cop_p1_rf_right_0", (InputArgument)"mp_arrest_paired", (InputArgument)3);
  5532.                     }
  5533.                 }
  5534.                 int num3;
  5535.                 if ((Entity)this.holster != (Entity)null && this.holster.Exists() && (this.holsterSet && !this.isOccupied(Game.Player.Character)))
  5536.                     num3 = !Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character) ? 1 : 0;
  5537.                 else
  5538.                     num3 = 0;
  5539.                 if (num3 != 0)
  5540.                 {
  5541.                     int num2;
  5542.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  5543.                     {
  5544.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
  5545.                         {
  5546.                             num2 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3) ? 1 : 0;
  5547.                             goto label_574;
  5548.                         }
  5549.                     }
  5550.                     num2 = 0;
  5551.                 label_574:
  5552.                     if (num2 != 0)
  5553.                     {
  5554.                         if (this.prevPistol != this.choosenPistol)
  5555.                         {
  5556.                             this.prevPistol = this.choosenPistol;
  5557.                             if (!Game.Player.Character.IsSittingInVehicle())
  5558.                             {
  5559.                                 if (!Function.Call<bool>(Hash._0x7C2AC9CA66575FBF, (InputArgument)Game.Player.Character) && !Game.Player.Character.IsInCombat && !Game.Player.Character.IsDucking)
  5560.                                 {
  5561.                                     if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  5562.                                         Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"cop_p1_rf_right_0", (InputArgument)"mp_arrest_paired", (InputArgument)3);
  5563.                                     Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)8f, (InputArgument)(-8.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  5564.                                 }
  5565.                                 else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  5566.                                     Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)8f, (InputArgument)(-8.0), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  5567.                                 Script.Wait(400);
  5568.                                 this.soundFX(Game.Player.Character, "holster.wav");
  5569.                             }
  5570.                         }
  5571.                     }
  5572.                     else
  5573.                         this.prevPistol = this.choosenPistol;
  5574.                 }
  5575.             }
  5576.             if (this.intimidation)
  5577.             {
  5578.                 this.Draw(4, false, false, false, false, false);
  5579.                 this.DisableControlsFunc(false);
  5580.                 int num1;
  5581.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
  5582.                 {
  5583.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  5584.                     {
  5585.                         num1 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3) ? 1 : 0;
  5586.                         goto label_594;
  5587.                     }
  5588.                 }
  5589.                 num1 = 0;
  5590.             label_594:
  5591.                 if (num1 != 0)
  5592.                 {
  5593.                     Game.Player.Character.Task.PlayAnimation("move_m@intimidation@cop@unarmed", "idle", 12f, -1, AnimationFlags.StayInEndFrame | AnimationFlags.AllowRotation | AnimationFlags.CancelableWithMovement);
  5594.                 }
  5595.                 else
  5596.                 {
  5597.                     int num2;
  5598.                     if (Game.IsDisabledControlJustPressed(2, Control.Attack))
  5599.                     {
  5600.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
  5601.                         {
  5602.                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
  5603.                             {
  5604.                                 num2 = Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3) ? 1 : 0;
  5605.                                 goto label_602;
  5606.                             }
  5607.                         }
  5608.                         num2 = 1;
  5609.                     }
  5610.                     else
  5611.                         num2 = 0;
  5612.                     label_602:
  5613.                     if (num2 != 0)
  5614.                     {
  5615.                         this.AttackSpeech(Game.Player.Character);
  5616.                         this.GetClosestPedDetectionFunction(Game.Player.Character);
  5617.                     }
  5618.                     else if (Game.IsDisabledControlPressed(2, Control.Aim))
  5619.                     {
  5620.                         this.intimidation = false;
  5621.                         Game.Player.Character.Task.ClearAll();
  5622.                     }
  5623.                 }
  5624.             }
  5625.             Vector3 position1;
  5626.             if (this.holsterTimerCounterLong < Game.GameTime)
  5627.             {
  5628.                 this.holsterTimerCounterLong = Game.GameTime + 5000;
  5629.                 if ((Entity)this.target != (Entity)null)
  5630.                 {
  5631.                     position1 = this.target.Position;
  5632.                     if ((double)position1.DistanceTo(Game.Player.Character.Position) > 50.0 || !this.target.Exists() || this.target.IsDead)
  5633.                         this.target.MarkAsNoLongerNeeded();
  5634.                     this.target = (Ped)null;
  5635.                 }
  5636.                 int num1;
  5637.                 if ((Entity)this.holster != (Entity)null && this.holster.Exists())
  5638.                     num1 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)this.holster, (InputArgument)Game.Player.Character) ? 1 : 0;
  5639.                 else
  5640.                     num1 = 0;
  5641.                 if (num1 != 0 && (this.worldPistolModel != 0 && (Entity)this.HolstedPistol != (Entity)null && this.HolstedPistol.Exists()))
  5642.                 {
  5643.                     this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.Pistol, "w_pi_pistol");
  5644.                     this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.CombatPistol, "w_pi_combatpistol");
  5645.                     this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.APPistol, "w_pi_appistol");
  5646.                     this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.Pistol50, "w_pi_pistol50");
  5647.                     this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.HeavyPistol, "w_pi_heavypistol");
  5648.                     this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.VintagePistol, "w_pi_vintage_pistol");
  5649.                     this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.Revolver, "w_pi_revolver");
  5650.                     this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.PistolMk2, "w_pi_pistolmk2");
  5651.                     this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.RevolverMk2, "w_pi_revolvermk2");
  5652.                     this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.DoubleActionRevolver, "w_pi_wep1_gun");
  5653.                 }
  5654.                 if (!this.check)
  5655.                 {
  5656.                     this.GetHolsterPropFunction(Game.Player.Character);
  5657.                     this.check = true;
  5658.                 }
  5659.                 int num2;
  5660.                 if ((Entity)this.HolstedPistol == (Entity)null && this.worldPistolModel == 0 && ((Entity)this.holster != (Entity)null && this.holster.Exists()))
  5661.                     num2 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)this.holster, (InputArgument)Game.Player.Character) ? 1 : 0;
  5662.                 else
  5663.                     num2 = 0;
  5664.                 if (num2 != 0)
  5665.                 {
  5666.                     this.checkPistolFunc(Game.Player.Character, WeaponHash.Pistol, "w_pi_pistol");
  5667.                     this.checkPistolFunc(Game.Player.Character, WeaponHash.CombatPistol, "w_pi_combatpistol");
  5668.                     this.checkPistolFunc(Game.Player.Character, WeaponHash.APPistol, "w_pi_appistol");
  5669.                     this.checkPistolFunc(Game.Player.Character, WeaponHash.Pistol50, "w_pi_pistol50");
  5670.                     this.checkPistolFunc(Game.Player.Character, WeaponHash.HeavyPistol, "w_pi_heavypistol");
  5671.                     this.checkPistolFunc(Game.Player.Character, WeaponHash.VintagePistol, "w_pi_vintage_pistol");
  5672.                     this.checkPistolFunc(Game.Player.Character, WeaponHash.Revolver, "w_pi_revolver");
  5673.                     this.checkPistolFunc(Game.Player.Character, WeaponHash.PistolMk2, "w_pi_pistolmk2");
  5674.                     this.checkPistolFunc(Game.Player.Character, WeaponHash.RevolverMk2, "w_pi_revolvermk2");
  5675.                     this.checkPistolFunc(Game.Player.Character, WeaponHash.DoubleActionRevolver, "w_pi_wep1_gun");
  5676.                 }
  5677.                 if ((Entity)this.HolstedPistol == (Entity)null || (Entity)this.holster == (Entity)null || (Game.Player.Character.IsDead || Game.IsScreenFadingIn) || Game.IsScreenFadingOut)
  5678.                 {
  5679.                     this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistol");
  5680.                     this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_combatpistol");
  5681.                     this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_appistol");
  5682.                     this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistol50");
  5683.                     this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_heavypistol");
  5684.                     this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_vintage_pistol");
  5685.                     this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_revolver");
  5686.                     this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistolmk2");
  5687.                     this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_revolvermk2");
  5688.                     this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_wep1_gun");
  5689.                 }
  5690.                 if ((Entity)this.holster == (Entity)null)
  5691.                 {
  5692.                     if (Function.Call<bool>(Hash._0xBFA48E2FF417213F, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.worldPistolModel, (InputArgument)0))
  5693.                     {
  5694.                         if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.worldPistolModel, (InputArgument)true, (InputArgument)false, (InputArgument)false), (InputArgument)Game.Player.Character))
  5695.                         {
  5696.                             this.HolstedPistol.Delete();
  5697.                             this.HolstedPistol = (Prop)null;
  5698.                         }
  5699.                     }
  5700.                 }
  5701.             }
  5702.             if ((Entity)this.HolstedPistolPrev != (Entity)null && !this.HolstedPistolPrev.IsAttached())
  5703.             {
  5704.                 this.HolstedPistolPrev.Delete();
  5705.                 this.HolstedPistolPrev = (Prop)null;
  5706.             }
  5707.             if (this.holsterTimerCounterShort < Game.GameTime)
  5708.             {
  5709.                 this.holsterTimerCounterShort = Game.GameTime + 500;
  5710.                 int num1 = Function.Call<int>(Hash._0x0A6DB4965674D243, (InputArgument)Game.Player.Character);
  5711.                 int num2;
  5712.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_fall", (InputArgument)3))
  5713.                 {
  5714.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_idle", (InputArgument)3))
  5715.                     {
  5716.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_a", (InputArgument)3))
  5717.                         {
  5718.                             if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_b", (InputArgument)3))
  5719.                             {
  5720.                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_c", (InputArgument)3))
  5721.                                 {
  5722.                                     num2 = Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_d", (InputArgument)3) ? 1 : 0;
  5723.                                     goto label_643;
  5724.                                 }
  5725.                             }
  5726.                         }
  5727.                     }
  5728.                 }
  5729.                 num2 = 1;
  5730.             label_643:
  5731.                 if (num2 != 0)
  5732.                 {
  5733.                     this.holsterSet = false;
  5734.                     if ((Entity)this.holster != (Entity)null && this.holster.Exists())
  5735.                     {
  5736.                         this.holster.Delete();
  5737.                         this.holster = (Prop)null;
  5738.                     }
  5739.                     if ((Entity)this.holster != (Entity)null && this.holster.Exists())
  5740.                     {
  5741.                         this.HolstedPistol.Delete();
  5742.                         this.HolstedPistol = (Prop)null;
  5743.                     }
  5744.                 }
  5745.                 if (this.holsterSet && (Entity)this.holster != (Entity)null && this.holster.Exists() && this.holster.IsAttachedTo((Entity)Game.Player.Character))
  5746.                 {
  5747.                     this.IconHolsterDrawFunc(Game.Player.Character);
  5748.                     if (num1 == 453432689)
  5749.                         this.worldPistolModel = this.GetHashKey("w_pi_pistol");
  5750.                     if (num1 == 1593441988)
  5751.                         this.worldPistolModel = this.GetHashKey("w_pi_combatpistol");
  5752.                     if (num1 == 584646201)
  5753.                         this.worldPistolModel = this.GetHashKey("w_pi_appistol");
  5754.                     if (num1 == -1716589765)
  5755.                         this.worldPistolModel = this.GetHashKey("w_pi_pistol50");
  5756.                     if (num1 == -771403250)
  5757.                         this.worldPistolModel = this.GetHashKey("w_pi_heavypistol");
  5758.                     if (num1 == 137902532)
  5759.                         this.worldPistolModel = this.GetHashKey("w_pi_vintage_pistol");
  5760.                     if (num1 == -1045183535)
  5761.                         this.worldPistolModel = this.GetHashKey("w_pi_revolver");
  5762.                     if (num1 == -1075685676)
  5763.                         this.worldPistolModel = this.GetHashKey("w_pi_pistolmk2");
  5764.                     if (num1 == -879347409)
  5765.                         this.worldPistolModel = this.GetHashKey("w_pi_revolvermk2");
  5766.                     if (num1 == -1746263880)
  5767.                         this.worldPistolModel = this.GetHashKey("w_pi_wep1_gun");
  5768.                     this.choosenPistol = num1 != 453432689 && num1 != 1593441988 && (num1 != 584646201 && num1 != -1716589765) && (num1 != -771403250 && num1 != 137902532 && (num1 != -1045183535 && num1 != -1075685676)) && num1 != -879347409 && num1 != -1746263880 ? (Model)((string)null) : (Model)num1;
  5769.                     this.weaponPistol = this.choosenPistol != (Model)((string)null);
  5770.                 }
  5771.                 if (!Function.Call<bool>(Hash._0xD9D2CFFF49FAB35F, Array.Empty<InputArgument>()) && !Game.IsScreenFadingIn && (!Game.IsScreenFadingOut && !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>())) && Game.Player.CanControlCharacter)
  5772.                 {
  5773.                     this.player = Game.Player.Character;
  5774.                 }
  5775.                 else
  5776.                 {
  5777.                     this.prevPlayer = this.player;
  5778.                     this.HolstedPistolPrev = this.HolstedPistol;
  5779.                 }
  5780.                 if ((Entity)this.player != (Entity)Game.Player.Character)
  5781.                     this.goodToGo = false;
  5782.                 else if (!this.goodToGo)
  5783.                 {
  5784.                     this.goodToGo = true;
  5785.                     if ((Entity)this.HolstedPistol != (Entity)null && this.HolstedPistol.Exists())
  5786.                         this.HolstedPistol = (Prop)null;
  5787.                     if ((Entity)this.prevPlayer != (Entity)null && !this.prevPlayer.Exists())
  5788.                     {
  5789.                         if ((Entity)this.holster != (Entity)null && this.holster.Exists())
  5790.                         {
  5791.                             this.holster.Delete();
  5792.                             this.holster = (Prop)null;
  5793.                         }
  5794.                     }
  5795.                     else
  5796.                         this.holster = (Prop)null;
  5797.                     this.weaponPistol = false;
  5798.                     this.worldPistolModel = 0;
  5799.                     this.checkHolsterAfterCharacterSwitch(Game.Player.Character);
  5800.                 }
  5801.                 if (this.weaponPistol)
  5802.                 {
  5803.                     if ((Entity)this.HolstedPistol != (Entity)null)
  5804.                     {
  5805.                         this.HolstedPistol.MarkAsNoLongerNeeded();
  5806.                         this.HolstedPistol.Detach();
  5807.                         this.HolstedPistol.Delete();
  5808.                         this.HolstedPistol = (Prop)null;
  5809.                     }
  5810.                 }
  5811.                 else if ((Entity)this.HolstedPistol == (Entity)null && (Entity)this.holster != (Entity)null && this.holster.Exists() && this.holster.IsAttachedTo((Entity)Game.Player.Character) && ((Entity)Game.Player.Character != (Entity)null && Game.Player.Character.Exists()))
  5812.                 {
  5813.                     if (Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.worldPistolModel, (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  5814.                     {
  5815.                         Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.worldPistolModel, (InputArgument)true, (InputArgument)false, (InputArgument)false);
  5816.                         if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character))
  5817.                         {
  5818.                             this.HolstedPistol = prop;
  5819.                             this.AttachPistol(Game.Player.Character);
  5820.                         }
  5821.                         else
  5822.                         {
  5823.                             int num3;
  5824.                             if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.worldPistolModel))
  5825.                                 num3 = Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.worldPistolModel) ? 1 : 0;
  5826.                             else
  5827.                                 num3 = 0;
  5828.                             if (num3 != 0)
  5829.                             {
  5830.                                 this.HolstedPistol = World.CreateProp((Model)this.worldPistolModel, Game.Player.Character.Position, true, false);
  5831.                                 this.AttachPistol(Game.Player.Character);
  5832.                             }
  5833.                         }
  5834.                     }
  5835.                     else
  5836.                     {
  5837.                         int num3;
  5838.                         if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.worldPistolModel))
  5839.                             num3 = Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.worldPistolModel) ? 1 : 0;
  5840.                         else
  5841.                             num3 = 0;
  5842.                         if (num3 != 0)
  5843.                         {
  5844.                             this.HolstedPistol = World.CreateProp((Model)this.worldPistolModel, Game.Player.Character.Position, true, false);
  5845.                             this.AttachPistol(Game.Player.Character);
  5846.                         }
  5847.                     }
  5848.                 }
  5849.                 if (Game.IsScreenFadingIn || Game.IsScreenFadingOut)
  5850.                 {
  5851.                     if (!this.useHipHolster)
  5852.                     {
  5853.                         Prop[] allProps = World.GetAllProps((Model)"prop_pistol_holster");
  5854.                         for (int index = 0; index < allProps.Length; ++index)
  5855.                         {
  5856.                             if (allProps.Length != 0 && (Entity)allProps[index] != (Entity)null && allProps[index].Exists() && !allProps[index].IsAttached())
  5857.                             {
  5858.                                 allProps[index].Delete();
  5859.                                 Array.Clear((Array)allProps, 0, allProps.Length);
  5860.                             }
  5861.                         }
  5862.                     }
  5863.                     else
  5864.                     {
  5865.                         Prop[] allProps = World.GetAllProps((Model)"prop_holster_01");
  5866.                         for (int index = 0; index < allProps.Length; ++index)
  5867.                         {
  5868.                             if (allProps.Length != 0 && (Entity)allProps[index] != (Entity)null && allProps[index].Exists() && !allProps[index].IsAttached())
  5869.                             {
  5870.                                 allProps[index].Delete();
  5871.                                 Array.Clear((Array)allProps, 0, allProps.Length);
  5872.                             }
  5873.                         }
  5874.                     }
  5875.                 }
  5876.             }
  5877.             if (this.maskTimeCounter < Game.GameTime)
  5878.             {
  5879.                 this.maskTimeCounter = Game.GameTime + 5000;
  5880.                 model = Game.Player.Character.Model;
  5881.                 if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
  5882.                     this.glasses0 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("MICHAELES GLASSES", "COMPONENTID", 1)) == this.config.GetValue<int>("MICHAELES GLASSES", "MODEL", 1);
  5883.                 model = Game.Player.Character.Model;
  5884.                 if (model.Hash == this.GetHashKey("PLAYER_ONE"))
  5885.                     this.glasses1 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("FRANKLINS GLASSES", "COMPONENTID", 1)) == this.config.GetValue<int>("FRANKLINS GLASSES", "MODEL", 1);
  5886.                 model = Game.Player.Character.Model;
  5887.                 if (model.Hash == this.GetHashKey("PLAYER_TWO"))
  5888.                     this.glasses2 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("TREVORS GLASSES", "COMPONENTID", 1)) == this.config.GetValue<int>("TREVORS GLASSES", "MODEL", 1);
  5889.                 model = Game.Player.Character.Model;
  5890.                 if (model.Hash == this.GetHashKey("mp_m_freemode_01"))
  5891.                     this.glasses3 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("MPS GLASSES", "COMPONENTID", 1)) == this.config.GetValue<int>("MPS GLASSES", "MODEL", 1);
  5892.                 model = Game.Player.Character.Model;
  5893.                 if (model.Hash == this.GetHashKey("mp_f_freemode_01"))
  5894.                     this.glasses4 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("MPS GLASSES", "COMPONENTID", 1)) == this.config.GetValue<int>("MPS GLASSES", "MODEL", 1);
  5895.                 model = Game.Player.Character.Model;
  5896.                 if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
  5897.                     this.gloves0 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("MICHAELES GLOVES", "COMPONENTID", 5)) == this.config.GetValue<int>("MICHAELES GLOVES", "MODEL", 2);
  5898.                 model = Game.Player.Character.Model;
  5899.                 if (model.Hash == this.GetHashKey("PLAYER_ONE"))
  5900.                     this.gloves1 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("FRANKLINS GLOVES", "COMPONENTID", 5)) == this.config.GetValue<int>("FRANKLINS GLOVES", "MODEL", 2);
  5901.                 model = Game.Player.Character.Model;
  5902.                 if (model.Hash == this.GetHashKey("PLAYER_TWO"))
  5903.                     this.gloves2 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("TREVORS GLOVES", "COMPONENTID", 5)) == this.config.GetValue<int>("TREVORS GLOVES", "MODEL", 2);
  5904.                 model = Game.Player.Character.Model;
  5905.                 if (model.Hash == this.GetHashKey("mp_m_freemode_01"))
  5906.                     this.gloves3 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("MPS GLOVES", "COMPONENTID", 5)) == this.config.GetValue<int>("MPS GLOVES", "MODEL", 2);
  5907.                 model = Game.Player.Character.Model;
  5908.                 if (model.Hash == this.GetHashKey("mp_f_freemode_01"))
  5909.                     this.gloves4 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("MPS GLOVES", "COMPONENTID", 5)) == this.config.GetValue<int>("MPS GLOVES", "MODEL", 2);
  5910.                 model = Game.Player.Character.Model;
  5911.                 if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
  5912.                 {
  5913.                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("MICHAELES MASK", "COMPONENTID", 9)) != this.config.GetValue<int>("MICHAELES MASK", "MODEL", 6))
  5914.                     {
  5915.                         if (this.config.GetValue<bool>("MICHAELES MASK", "HIDE_HAIRS", true))
  5916.                             Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)0);
  5917.                         Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)0);
  5918.                         this.mask0 = false;
  5919.                     }
  5920.                     else
  5921.                     {
  5922.                         if (this.config.GetValue<bool>("MICHAELES MASK", "HIDE_HAIRS", true))
  5923.                             Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)1);
  5924.                         Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)1);
  5925.                         this.mask0 = true;
  5926.                     }
  5927.                 }
  5928.                 model = Game.Player.Character.Model;
  5929.                 if (model.Hash == this.GetHashKey("PLAYER_ONE"))
  5930.                 {
  5931.                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("FRANKLINS MASK", "COMPONENTID", 9)) != this.config.GetValue<int>("FRANKLINS MASK", "MODEL", 6))
  5932.                     {
  5933.                         if (this.config.GetValue<bool>("FRANKLINS MASK", "HIDE_HAIRS", true))
  5934.                             Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)0);
  5935.                         Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)0);
  5936.                         this.mask1 = false;
  5937.                     }
  5938.                     else
  5939.                     {
  5940.                         if (this.config.GetValue<bool>("FRANKLINS MASK", "HIDE_HAIRS", true))
  5941.                             Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)1);
  5942.                         Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)1);
  5943.                         this.mask1 = true;
  5944.                     }
  5945.                 }
  5946.                 model = Game.Player.Character.Model;
  5947.                 if (model.Hash == this.GetHashKey("PLAYER_TWO"))
  5948.                 {
  5949.                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("TREVORS MASK", "COMPONENTID", 10)) != this.config.GetValue<int>("TREVORS MASK", "MODEL", 10))
  5950.                     {
  5951.                         if (this.config.GetValue<bool>("TREVORS MASK", "HIDE_HAIRS", true))
  5952.                             Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)0);
  5953.                         Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)0);
  5954.                         this.mask2 = false;
  5955.                     }
  5956.                     else
  5957.                     {
  5958.                         if (this.config.GetValue<bool>("TREVORS MASK", "HIDE_HAIRS", true))
  5959.                             Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)1);
  5960.                         Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)1);
  5961.                         this.mask2 = true;
  5962.                     }
  5963.                 }
  5964.                 model = Game.Player.Character.Model;
  5965.                 if (model.Hash == this.GetHashKey("mp_m_freemode_01"))
  5966.                 {
  5967.                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("MPS MASK", "COMPONENTID", 5)) != this.config.GetValue<int>("MPS MASK", "MODEL", 39))
  5968.                     {
  5969.                         if (this.config.GetValue<bool>("MPS MASK", "HIDE_HAIRS", true))
  5970.                             Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)0);
  5971.                         this.mask3 = false;
  5972.                     }
  5973.                     else
  5974.                     {
  5975.                         if (this.config.GetValue<bool>("MPS MASK", "HIDE_HAIRS", true))
  5976.                             Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)1);
  5977.                         this.mask3 = true;
  5978.                     }
  5979.                 }
  5980.                 model = Game.Player.Character.Model;
  5981.                 if (model.Hash == this.GetHashKey("mp_f_freemode_01"))
  5982.                 {
  5983.                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)this.config.GetValue<int>("MPS MASK", "COMPONENTID", 5)) != this.config.GetValue<int>("MPS MASK", "MODEL", 39))
  5984.                     {
  5985.                         if (this.config.GetValue<bool>("MPS MASK", "HIDE_HAIRS", true))
  5986.                             Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)0);
  5987.                         this.mask3 = false;
  5988.                     }
  5989.                     else
  5990.                     {
  5991.                         if (this.config.GetValue<bool>("MPS MASK", "HIDE_HAIRS", true))
  5992.                             Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)1);
  5993.                         this.mask3 = true;
  5994.                     }
  5995.                 }
  5996.             }
  5997.             if (this.earRadioTimer < Game.GameTime)
  5998.             {
  5999.                 this.earRadioTimer = Game.GameTime + 5000;
  6000.                 model = Game.Player.Character.Model;
  6001.                 int num1;
  6002.                 if (model.Hash != this.GetHashKey("mp_m_freemode_01"))
  6003.                 {
  6004.                     model = Game.Player.Character.Model;
  6005.                     if (model.Hash != this.GetHashKey("mp_f_freemode_01"))
  6006.                     {
  6007.                         model = Game.Player.Character.Model;
  6008.                         if (model.Hash != this.GetHashKey("PLAYER_ZERO"))
  6009.                         {
  6010.                             model = Game.Player.Character.Model;
  6011.                             if (model.Hash != this.GetHashKey("PLAYER_ONE"))
  6012.                             {
  6013.                                 model = Game.Player.Character.Model;
  6014.                                 num1 = model.Hash == this.GetHashKey("PLAYER_TWO") ? 1 : 0;
  6015.                                 goto label_794;
  6016.                             }
  6017.                         }
  6018.                     }
  6019.                 }
  6020.                 num1 = 1;
  6021.             label_794:
  6022.                 if (num1 != 0)
  6023.                     this.headset = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)Game.Player.Character, (InputArgument)2) == 0;
  6024.                 if (!this.headset && Function.Call<bool>(Hash._0xB35CE999E8EF317E, Array.Empty<InputArgument>()))
  6025.                 {
  6026.                     Vector3 position2 = new Vector3(266.1459f, -1007.036f, -100.9292f);
  6027.                     position1 = Game.Player.Character.Position;
  6028.                     int num2;
  6029.                     if ((double)position1.DistanceTo(position2) > 50.0)
  6030.                         num2 = !Function.Call<bool>(Hash._0xBFA48E2FF417213F, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)25f, (InputArgument)this.GetHashKey("prop_boombox_01"), (InputArgument)0) ? 1 : 0;
  6031.                     else
  6032.                         num2 = 0;
  6033.                     if (num2 != 0)
  6034.                     {
  6035.                         Function.Call(Hash._0xBF286C554784F3DF, (InputArgument)false);
  6036.                         Function.Call(Hash._0x1098355A16064BB3, (InputArgument)false);
  6037.                     }
  6038.                 }
  6039.             }
  6040.             int num11;
  6041.             if (!Function.Call<bool>(Hash._0xF3A21BCD95725A4A, (InputArgument)0, (InputArgument)85))
  6042.             {
  6043.                 if (!Function.Call<bool>(Hash._0x580417101DDB492F, (InputArgument)0, (InputArgument)81))
  6044.                 {
  6045.                     if (!Function.Call<bool>(Hash._0x580417101DDB492F, (InputArgument)0, (InputArgument)82))
  6046.                     {
  6047.                         num11 = 0;
  6048.                         goto label_809;
  6049.                     }
  6050.                 }
  6051.             }
  6052.             num11 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)3) ? 1 : 0;
  6053.         label_809:
  6054.             if (num11 != 0)
  6055.             {
  6056.                 int num1;
  6057.                 if (this.headset)
  6058.                 {
  6059.                     if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
  6060.                     {
  6061.                         if (!Function.Call<bool>(Hash._0xE3B6097CC25AA69E, (InputArgument)Game.Player.Character))
  6062.                         {
  6063.                             if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)Game.Player.Character))
  6064.                             {
  6065.                                 num1 = !Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player) ? 1 : 0;
  6066.                                 goto label_816;
  6067.                             }
  6068.                         }
  6069.                     }
  6070.                 }
  6071.                 num1 = 0;
  6072.             label_816:
  6073.                 if (num1 != 0 && !Game.Player.Character.IsSittingInVehicle())
  6074.                 {
  6075.                     Game.Player.Character.Task.ClearAll();
  6076.                     Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)45f, (InputArgument)(-12.0), (InputArgument)(-1), (InputArgument)50, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  6077.                 }
  6078.             }
  6079.             else
  6080.             {
  6081.                 if (!Function.Call<bool>(Hash._0x50F940259D3841E6, (InputArgument)0, (InputArgument)85))
  6082.                 {
  6083.                     if (!Function.Call<bool>(Hash._0x50F940259D3841E6, (InputArgument)0, (InputArgument)81))
  6084.                     {
  6085.                         if (!Function.Call<bool>(Hash._0x50F940259D3841E6, (InputArgument)0, (InputArgument)82))
  6086.                             goto label_824;
  6087.                     }
  6088.                 }
  6089.                 int num1;
  6090.                 if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, Array.Empty<InputArgument>()))
  6091.                 {
  6092.                     if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)3))
  6093.                     {
  6094.                         num1 = !Function.Call<bool>(Hash._0x7497D2CE2C30D24C, (InputArgument)false) ? 1 : 0;
  6095.                         goto label_825;
  6096.                     }
  6097.                 }
  6098.             label_824:
  6099.                 num1 = 0;
  6100.             label_825:
  6101.                 if (num1 != 0 && !Game.Player.Character.IsSittingInVehicle())
  6102.                 {
  6103.                     int num2;
  6104.                     if (!Function.Call<bool>(Hash._0x50F940259D3841E6, (InputArgument)0, (InputArgument)81))
  6105.                         num2 = Function.Call<bool>(Hash._0x50F940259D3841E6, (InputArgument)0, (InputArgument)82) ? 1 : 0;
  6106.                     else
  6107.                         num2 = 1;
  6108.                     if (num2 != 0)
  6109.                     {
  6110.                         Script.Wait(1000);
  6111.                         Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"cellphone_text_to_call", (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)3);
  6112.                     }
  6113.                     else
  6114.                     {
  6115.                         Script.Wait(200);
  6116.                         Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"cellphone_text_to_call", (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)3);
  6117.                     }
  6118.                 }
  6119.             }
  6120.             if (this.walletCount && !this.smoking)
  6121.             {
  6122.                 Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  6123.                 Function.Call(Hash._0xBAF20C5432058024, (InputArgument)Game.Player.Character, (InputArgument)false);
  6124.                 Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)36029);
  6125.                 int num1 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)6286);
  6126.                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@amb@board_room@supervising@", (InputArgument)"dissaproval_01_lo_amy_skater_01", (InputArgument)3))
  6127.                 {
  6128.                     this.animSpeed = 1f;
  6129.                     Game.Player.Character.Task.LookAt((Entity)Game.Player.Character);
  6130.                     Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.wallet, (InputArgument)Game.Player.Character, (InputArgument)num1, (InputArgument)0.1, (InputArgument)0.015, (InputArgument)(-0.025), (InputArgument)115.0, (InputArgument)20.0, (InputArgument)0.0, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)0, (InputArgument)true);
  6131.                     Game.Player.Character.Task.PlayAnimation("anim@amb@board_room@supervising@", "dissaproval_01_lo_amy_skater_01", this.animSpeed, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
  6132.                 }
  6133.                 else
  6134.                 {
  6135.                     if ((double)this.animSpeed < 2.0)
  6136.                         this.animSpeed += 0.01f;
  6137.                     double num2 = (double)Function.Call<float>(Hash._0x28D1A16553C51776, (InputArgument)Game.Player.Character, (InputArgument)"anim@amb@board_room@supervising@", (InputArgument)"dissaproval_01_lo_amy_skater_01", (InputArgument)this.animSpeed);
  6138.                     int num3;
  6139.                     if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)Game.Player.Character, (InputArgument)"anim@amb@board_room@supervising@", (InputArgument)"dissaproval_01_lo_amy_skater_01") > 0.100000001490116)
  6140.                         num3 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)Game.Player.Character, (InputArgument)"anim@amb@board_room@supervising@", (InputArgument)"dissaproval_01_lo_amy_skater_01") < 0.5 ? 1 : 0;
  6141.                     else
  6142.                         num3 = 0;
  6143.                     if (num3 != 0)
  6144.                     {
  6145.                         if ((Entity)this.walletOpened != (Entity)null)
  6146.                             this.walletOpened.IsVisible = true;
  6147.                         if ((Entity)this.wallet != (Entity)null)
  6148.                             this.wallet.IsVisible = false;
  6149.                     }
  6150.                     if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)Game.Player.Character, (InputArgument)"anim@amb@board_room@supervising@", (InputArgument)"dissaproval_01_lo_amy_skater_01") > 0.5)
  6151.                     {
  6152.                         if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@amb@board_room@supervising@", (InputArgument)"dissaproval_01_lo_amy_skater_01", (InputArgument)3))
  6153.                         {
  6154.                             Game.Player.Character.Task.ClearAnimation("anim@amb@board_room@supervising@", "dissaproval_01_lo_amy_skater_01");
  6155.                             this.Notify("Money in Wallet has been Counted", "Current balance: " + (Game.Player.Money.ToString() + " ~g~$"), 0, (int)byte.MaxValue, 0, "CHAR_BANK_FLEECA");
  6156.                             Function.Call(Hash._0x67C540AA08E4A6F5, (InputArgument)(-1), (InputArgument)"LOCAL_PLYR_CASH_COUNTER_COMPLETE", (InputArgument)"DLC_HEISTS_GENERAL_FRONTEND_SOUNDS", (InputArgument)0);
  6157.                         }
  6158.                         if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  6159.                         {
  6160.                             Function.Call(Hash._0x6B9BBD38AB0796DF, (InputArgument)this.wallet, (InputArgument)Game.Player.Character, (InputArgument)num1, (InputArgument)0.1, (InputArgument)0.015, (InputArgument)(-0.025), (InputArgument)115.0, (InputArgument)20.0, (InputArgument)0.0, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)false, (InputArgument)0, (InputArgument)true);
  6161.                             if ((Entity)this.walletOpened != (Entity)null)
  6162.                                 this.walletOpened.IsVisible = false;
  6163.                             if ((Entity)this.wallet != (Entity)null)
  6164.                                 this.wallet.IsVisible = true;
  6165.                             Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)4f, (InputArgument)(-4f), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  6166.                             this.soundFX(Game.Player.Character, "grab.wav");
  6167.                             Script.Wait(700);
  6168.                             if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  6169.                                 Game.Player.Character.Task.ClearAnimation("mp_arrest_paired", "cop_p1_rf_right_0");
  6170.                         }
  6171.                         if ((Entity)this.wallet != (Entity)null && this.wallet.Exists())
  6172.                         {
  6173.                             this.wallet.Delete();
  6174.                             this.wallet = (Prop)null;
  6175.                         }
  6176.                         else if (Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_02"), (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  6177.                         {
  6178.                             Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_02"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  6179.                             int num4;
  6180.                             if ((Entity)prop != (Entity)this.wallet)
  6181.                                 num4 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) ? 1 : 0;
  6182.                             else
  6183.                                 num4 = 0;
  6184.                             if (num4 != 0 && prop.Exists())
  6185.                                 prop.Delete();
  6186.                         }
  6187.                         if ((Entity)this.walletOpened != (Entity)null && this.walletOpened.Exists())
  6188.                         {
  6189.                             this.walletOpened.Delete();
  6190.                             this.walletOpened = (Prop)null;
  6191.                         }
  6192.                         else if (Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_pickup"), (InputArgument)true, (InputArgument)false, (InputArgument)false).Exists())
  6193.                         {
  6194.                             Prop prop = Function.Call<Prop>(Hash._0xE143FA2249364369, (InputArgument)Game.Player.Character.Position.X, (InputArgument)Game.Player.Character.Position.Y, (InputArgument)Game.Player.Character.Position.Z, (InputArgument)3f, (InputArgument)this.GetHashKey("prop_ld_wallet_pickup"), (InputArgument)true, (InputArgument)false, (InputArgument)false);
  6195.                             int num4;
  6196.                             if ((Entity)prop != (Entity)this.wallet)
  6197.                                 num4 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) ? 1 : 0;
  6198.                             else
  6199.                                 num4 = 0;
  6200.                             if (num4 != 0 && prop.Exists())
  6201.                                 prop.Delete();
  6202.                         }
  6203.                         this.walletCount = false;
  6204.                         this.inProcessWallet = false;
  6205.                     }
  6206.                 }
  6207.             }
  6208.             if (this.play_swallow_pills_anim)
  6209.                 this.SwallowPillsFunction(Game.Player.Character);
  6210.             if (this.blockKeys)
  6211.             {
  6212.                 if (Game.Player.Character.Weapons.Current.Hash != WeaponHash.Unarmed)
  6213.                     Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
  6214.                 this.DisableControlsFunc(false);
  6215.             }
  6216.             if (this.flame && (Entity)this.cig != (Entity)null)
  6217.             {
  6218.                 Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)Game.Player.Character, (InputArgument)Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)64017), (InputArgument)0, (InputArgument)0, (InputArgument)0);
  6219.                 Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
  6220.                 Function.Call(Hash._0x0D53A3B8DA0809D2, (InputArgument)"scr_sh_lighter_flame", (InputArgument)this.cig, (InputArgument)(-0.075f), (InputArgument)(1f / 500f), (InputArgument)0.0f, (InputArgument)this.cig.Rotation.X, (InputArgument)this.cig.Rotation.Y, (InputArgument)this.cig.Rotation.Z, (InputArgument)0.11, (InputArgument)true, (InputArgument)true, (InputArgument)true);
  6221.             }
  6222.             if (this.smoke == 1 && this.smoking)
  6223.                 this.DisableControlsFunc(false);
  6224.             if (this.extraEffectsStat)
  6225.             {
  6226.                 if (this.extraEffectsTimer > 0)
  6227.                 {
  6228.                     --this.extraEffectsTimer;
  6229.                     if (this.extraEffects)
  6230.                     {
  6231.                         if (!Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusIn"))
  6232.                             Function.Call(Hash._0x2206BF9A37B7F724, (InputArgument)"FocusIn", (InputArgument)100, (InputArgument)false);
  6233.                         if ((double)this.slowMoScale > 0.5)
  6234.                             this.slowMoScale -= 0.05f;
  6235.                         Game.TimeScale = this.slowMoScale;
  6236.                     }
  6237.                     if (Game.Player.Character.Health <= Game.Player.Character.MaxHealth)
  6238.                         ++Game.Player.Character.Health;
  6239.                     double num1 = (double)Function.Call<float>(Hash._0x085BF80FA50A39D1, (InputArgument)Game.Player.Character, (InputArgument)1.15f);
  6240.                 }
  6241.                 else
  6242.                 {
  6243.                     double num1 = (double)Function.Call<float>(Hash._0x085BF80FA50A39D1, (InputArgument)Game.Player.Character, (InputArgument)1f);
  6244.                     if (Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusIn"))
  6245.                         Function.Call(Hash._0x068E835A1D0DC0E3, (InputArgument)"FocusIn");
  6246.                     if (!Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusOut"))
  6247.                     {
  6248.                         Function.Call(Hash._0x67C540AA08E4A6F5, (InputArgument)(-1), (InputArgument)"FocusOut", (InputArgument)"HintCamSounds");
  6249.                         Function.Call(Hash._0x2206BF9A37B7F724, (InputArgument)"FocusOut", (InputArgument)100, (InputArgument)false);
  6250.                     }
  6251.                     if ((double)this.slowMoScale < 1.0)
  6252.                     {
  6253.                         this.slowMoScale += 0.1f;
  6254.                         Game.TimeScale = this.slowMoScale;
  6255.                     }
  6256.                     else
  6257.                     {
  6258.                         this.followCamera = false;
  6259.                         if (Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusOut"))
  6260.                             Function.Call(Hash._0x068E835A1D0DC0E3, (InputArgument)"FocusOut");
  6261.                         this.extraEffectsStat = false;
  6262.                     }
  6263.                 }
  6264.             }
  6265.             if (this.canRefill && (this.pillsCount < this.maxPills || this.cigsCount < this.maxCigs))
  6266.             {
  6267.                 if (this.hintShow)
  6268.                     DisplayHelpTextThisFrame("~INPUT_CONTEXT~ Refill ~g~medical~w~ supplies");
  6269.                 float num1 = Function.Call<float>(Hash._0x1DD55701034110E5, (InputArgument)this.medbag);
  6270.                 if (Game.IsControlJustPressed(2, Control.Context))
  6271.                 {
  6272.                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
  6273.                     {
  6274.                         if ((double)num1 < (double)Game.Player.Character.HeightAboveGround)
  6275.                         {
  6276.                             Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@medic@standing@kneel@exit");
  6277.                             while (true)
  6278.                             {
  6279.                                 if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@medic@standing@kneel@exit"))
  6280.                                     Script.Wait(10);
  6281.                                 else
  6282.                                     break;
  6283.                             }
  6284.                             Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"amb@medic@standing@kneel@exit", (InputArgument)"exit", (InputArgument)4f, (InputArgument)(-4f), (InputArgument)(-1), (InputArgument)0, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  6285.                         }
  6286.                         else
  6287.                         {
  6288.                             Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@code_human_in_car_mp_actions@grab_crotch@bodhi@rps@base");
  6289.                             while (true)
  6290.                             {
  6291.                                 if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@code_human_in_car_mp_actions@grab_crotch@bodhi@rps@base"))
  6292.                                     Script.Wait(10);
  6293.                                 else
  6294.                                     break;
  6295.                             }
  6296.                             Function.Call(Hash._0xEA47FE3719165B94, (InputArgument)Game.Player.Character, (InputArgument)"amb@code_human_in_car_mp_actions@grab_crotch@bodhi@rps@base", (InputArgument)"enter", (InputArgument)4f, (InputArgument)(-4f), (InputArgument)(-1), (InputArgument)48, (InputArgument)0.0f, (InputArgument)0, (InputArgument)0, (InputArgument)0);
  6297.                         }
  6298.                         this.soundFX(Game.Player.Character, "shakeJar.wav");
  6299.                     }
  6300.                     int num2 = this.maxPills - this.pillsCount;
  6301.                     int num3 = this.maxCigs - this.cigsCount;
  6302.                     if (this.pillsCount < this.maxPills)
  6303.                     {
  6304.                         Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  6305.                         this.pillsCount = this.maxPills;
  6306.                         UI.Notify("~g~+" + num2.ToString() + " ~w~Pills", true);
  6307.                     }
  6308.                     if (this.cigsCount < this.maxCigs)
  6309.                     {
  6310.                         Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  6311.                         this.cigsCount = this.maxCigs;
  6312.                         UI.Notify("~g~+" + num3.ToString() + " ~w~Cigs", true);
  6313.                     }
  6314.                     if ((Entity)this.medbag != (Entity)null && this.medbag.Exists())
  6315.                     {
  6316.                         this.medbag.Delete();
  6317.                         this.medbag = (Prop)null;
  6318.                         this.canRefill = false;
  6319.                     }
  6320.                 }
  6321.  
  6322.                 void DisplayHelpTextThisFrame(string text)
  6323.                 {
  6324.                     Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
  6325.                     Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
  6326.                     Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
  6327.                 }
  6328.             }
  6329.             this._iFruit.Update();
  6330.             if (this.deal && !this.payed)
  6331.             {
  6332.                 int num1;
  6333.                 if ((Entity)this.seller != (Entity)null)
  6334.                 {
  6335.                     position1 = this.seller.Position;
  6336.                     if ((double)position1.DistanceTo(Game.Player.Character.Position) < 15.0)
  6337.                     {
  6338.                         num1 = !this.payed ? 1 : 0;
  6339.                         goto label_941;
  6340.                     }
  6341.                 }
  6342.                 num1 = 0;
  6343.             label_941:
  6344.                 if (num1 != 0)
  6345.                     this.callContact.Name = "Pay for purchases";
  6346.             }
  6347.             else
  6348.                 this.callContact.Name = "Inventory menu";
  6349.             if (this.followCamera)
  6350.                 this.followCameraCreateFunc(Game.Player.Character, this.CamObject);
  6351.             else
  6352.                 this.followCameraDeleteFunc(Game.Player.Character, this.CamObject);
  6353.             if (Game.IsScreenFadedOut || Function.Call<bool>(Hash._0xD9D2CFFF49FAB35F, Array.Empty<InputArgument>()) || Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()))
  6354.                 this.clearTrash();
  6355.             if (Game.Player.Character.IsOnFoot && (Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null && !this.isOccupied(Game.Player.Character))
  6356.                 this.WeaponSwitchAnim(Game.Player.Character);
  6357.             if (this.bagPickUp)
  6358.             {
  6359.                 Entity droppedBag = this.getDroppedBag(Game.Player.Character);
  6360.                 if (droppedBag != (Entity)null && droppedBag.Exists() && droppedBag.Model == (Model)this.GetHashKey(this.stashedBagModel))
  6361.                 {
  6362.                     this.camTimer = 0;
  6363.                     this.CamObject = droppedBag;
  6364.                     this.Draw(1, this.hasBag, this.canTakeBagFromVehicle, this.hasHolster, this.isBagBought, this.isBagDropped);
  6365.                     if (Function.Call<bool>(Hash._0x580417101DDB492F, (InputArgument)0, (InputArgument)51))
  6366.                     {
  6367.                         if (droppedBag != (Entity)null && droppedBag.Exists())
  6368.                         {
  6369.                             this.blipHandle(false, droppedBag, BlipSprite.Briefcase2, "DuffleBag", 0.85f, 200, true, true);
  6370.                             droppedBag.Delete();
  6371.                         }
  6372.                         this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
  6373.                     }
  6374.                 }
  6375.             }
  6376.             if (!Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) && !Game.MissionFlag)
  6377.             {
  6378.                 if ((Entity)this.bagModelReturn(Game.Player.Character) == (Entity)null && this.DoesPedHasBigWeapons(Game.Player.Character) && this.IsCurrentWeaponBig(Game.Player.Character.Weapons.Current.Hash))
  6379.                 {
  6380.                     Function.Call(Hash._0x0725A4CCFDED9A70, (InputArgument)Game.Player.Character, (InputArgument)false, (InputArgument)true, (InputArgument)true, (InputArgument)true, (InputArgument)true);
  6381.                     Game.Player.Character.Weapons.Select(WeaponHash.Unarmed);
  6382.                 }
  6383.             }
  6384.             else if ((Entity)this.bagModelReturn(Game.Player.Character) == (Entity)null && this.DoesPedHasBigWeapons(Game.Player.Character) && !Game.Player.Character.IsSittingInVehicle())
  6385.                 this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
  6386.             if (!this.canTakeBagFromVehicle && this.canPutOnBagOnExit && (Game.IsControlJustPressed(2, Control.VehicleExit) || Game.IsDisabledControlPressed(2, Control.VehicleExit)))
  6387.             {
  6388.                 this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
  6389.                 if (this.changedPosition)
  6390.                 {
  6391.                     if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6392.                     {
  6393.                         if (this.drawStrap)
  6394.                         {
  6395.                             Prop[] nearbyStrap = World.GetNearbyProps(Game.Player.Character.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
  6396.                             if (((IEnumerable<Prop>)nearbyStrap).Count<Prop>() > 0)
  6397.                             {
  6398.                                 foreach (Prop prop in nearbyStrap)
  6399.                                 {
  6400.                                         prop.IsVisible = false;
  6401.                                    
  6402.                                 }
  6403.                             }
  6404.                         }
  6405.                     }
  6406.                 }
  6407.             }
  6408.             if (this.DufflebagTimeCounter < Game.GameTime)
  6409.             {
  6410.                 this.DufflebagTimeCounter = Game.GameTime + 5000;
  6411.                 if ((Entity)Game.Player.Character != (Entity)null && this.getDroppedBag(Game.Player.Character) != (Entity)null)
  6412.                 {
  6413.                     if (Function.Call<bool>(Hash._0xD9D2CFFF49FAB35F, Array.Empty<InputArgument>()))
  6414.                     {
  6415.                         this.getDroppedBag(Game.Player.Character).Delete();
  6416.                         this.blipsRemove(BlipSprite.Information);
  6417.                     }
  6418.                     if (Game.Player.Character.IsOnFoot)
  6419.                     {
  6420.                         int num1;
  6421.                         if (this.getDroppedBag(Game.Player.Character) != (Entity)null && this.getDroppedBag(Game.Player.Character).Exists())
  6422.                         {
  6423.                             position1 = Game.Player.Character.Position;
  6424.                             num1 = (double)position1.DistanceTo(this.getDroppedBag(Game.Player.Character).Position) <= 2.0 ? 1 : 0;
  6425.                         }
  6426.                         else
  6427.                             num1 = 0;
  6428.                         if (num1 != 0)
  6429.                         {
  6430.                             if (!this.bagPickUp)
  6431.                                 this.bagPickUp = true;
  6432.                         }
  6433.                         else if (this.bagPickUp)
  6434.                             this.bagPickUp = false;
  6435.                     }
  6436.                 }
  6437.                 else if (this.bagPickUp)
  6438.                     this.bagPickUp = false;
  6439.                 int num2;
  6440.                 if (Game.Player.Character.IsSittingInVehicle())
  6441.                 {
  6442.                     if (!Function.Call<bool>(Hash._0x0A7B270912999B3C, (InputArgument)Game.Player.Character.CurrentVehicle))
  6443.                     {
  6444.                         model = Game.Player.Character.CurrentVehicle.Model;
  6445.                         if (!model.IsBike)
  6446.                         {
  6447.                             model = Game.Player.Character.CurrentVehicle.Model;
  6448.                             if (!model.IsBicycle)
  6449.                             {
  6450.                                 model = Game.Player.Character.CurrentVehicle.Model;
  6451.                                 num2 = !model.IsQuadbike ? 1 : 0;
  6452.                                 goto label_991;
  6453.                             }
  6454.                         }
  6455.                     }
  6456.                 }
  6457.                 num2 = 0;
  6458.             label_991:
  6459.                 if (num2 != 0)
  6460.                 {
  6461.                     Prop bag = this.bagModelReturn(Game.Player.Character);
  6462.                     if ((Entity)bag != (Entity)null && bag.IsVisible)
  6463.                         this.TakeOffBagInCar(bag, Game.Player.Character);
  6464.                     else if ((Entity)bag == (Entity)null)
  6465.                     {
  6466.                         if (this.VehicleWithBag(Game.Player.Character))
  6467.                         {
  6468.                             this.canTakeBagFromVehicle = true;
  6469.                             if (!this.notifed)
  6470.                             {
  6471.                                 DisplayHelpTextThisFrame("~BLIP_INFO_ICON~ Your bag is stashed in this vehicle");
  6472.                                 this.blipHandle(true, (Entity)Game.Player.Character.CurrentVehicle, BlipSprite.Information, "DuffleBag", 0.85f, 200, false, false);
  6473.                                 this.notifed = true;
  6474.                             }
  6475.                         }
  6476.                         else
  6477.                         {
  6478.                             this.canTakeBagFromVehicle = false;
  6479.                             this.notifed = false;
  6480.                         }
  6481.                     }
  6482.                     else if (!bag.IsVisible)
  6483.                         this.canPutOnBagOnExit = true;
  6484.                 }
  6485.                 else
  6486.                 {
  6487.                     this.notifed = false;
  6488.                     this.canTakeBagFromVehicle = false;
  6489.                     this.canPutOnBagOnExit = false;
  6490.                 }
  6491.                 if (this.doesPedHasInventoryBag(Game.Player.Character) && (!Game.Player.Character.IsSittingInVehicle() && !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) && Game.IsScreenFadedIn && Game.Player.Character.IsStopped && (Entity)this.bagModelReturn(Game.Player.Character) == (Entity)null))
  6492.                     this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
  6493.                 if ((Entity)Game.Player.Character != (Entity)null)
  6494.                 {
  6495.                     if (Game.Player.Character.IsOnFoot)
  6496.                         this.checkBagVisibility(Game.Player.Character);
  6497.                     else if ((Entity)Game.Player.Character.CurrentVehicle != (Entity)null && Game.Player.Character.IsSittingInVehicle())
  6498.                     {
  6499.                         model = Game.Player.Character.CurrentVehicle.Model;
  6500.                         int num1;
  6501.                         if (!model.IsBicycle)
  6502.                         {
  6503.                             model = Game.Player.Character.CurrentVehicle.Model;
  6504.                             if (!model.IsQuadbike)
  6505.                             {
  6506.                                 model = Game.Player.Character.CurrentVehicle.Model;
  6507.                                 num1 = model.IsBike ? 1 : 0;
  6508.                                 goto label_1014;
  6509.                             }
  6510.                         }
  6511.                         num1 = 1;
  6512.                     label_1014:
  6513.                         if (num1 != 0)
  6514.                             this.checkBagVisibility(Game.Player.Character);
  6515.                     }
  6516.                 }
  6517.                 if (Game.MissionFlag || Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()))
  6518.                 {
  6519.                     if (Game.Player.Character.Model != (Model)PedHash.Trevor)
  6520.                     {
  6521.                         Ped[] allPeds = World.GetAllPeds((Model)PedHash.Trevor);
  6522.                         if (((IEnumerable<Ped>)allPeds).Count<Ped>() > 0)
  6523.                         {
  6524.                             foreach (Ped ped in allPeds)
  6525.                             {
  6526.                                 if ((Entity)this.bagModelReturn(ped) == (Entity)null)
  6527.                                 {
  6528.                                     if (this.DoesPedHasBigWeapons(ped))
  6529.                                         this.bagSet(this.bagModelCheck(ped), ped);
  6530.                                 }
  6531.                                 else
  6532.                                 {
  6533.                                     this.checkBagVisibility(ped);
  6534.                                     if (!this.isStrapAttachedToPed(this.bagModelReturn(ped), ped))
  6535.                                         this.strapSet(this.bagModelReturn(ped), ped);
  6536.                                 }
  6537.                             }
  6538.                         }
  6539.                     }
  6540.                     if (Game.Player.Character.Model != (Model)PedHash.Michael)
  6541.                     {
  6542.                         Ped[] allPeds = World.GetAllPeds((Model)PedHash.Michael);
  6543.                         if (((IEnumerable<Ped>)allPeds).Count<Ped>() > 0)
  6544.                         {
  6545.                             foreach (Ped ped in allPeds)
  6546.                             {
  6547.                                 if ((Entity)this.bagModelReturn(ped) == (Entity)null)
  6548.                                 {
  6549.                                     if (this.DoesPedHasBigWeapons(ped))
  6550.                                         this.bagSet(this.bagModelCheck(ped), ped);
  6551.                                 }
  6552.                                 else
  6553.                                 {
  6554.                                     this.checkBagVisibility(ped);
  6555.                                     if (!this.isStrapAttachedToPed(this.bagModelReturn(ped), ped))
  6556.                                         this.strapSet(this.bagModelReturn(ped), ped);
  6557.                                 }
  6558.                             }
  6559.                         }
  6560.                     }
  6561.                     if (Game.Player.Character.Model != (Model)PedHash.Franklin)
  6562.                     {
  6563.                         Ped[] allPeds = World.GetAllPeds((Model)PedHash.Franklin);
  6564.                         if (((IEnumerable<Ped>)allPeds).Count<Ped>() > 0)
  6565.                         {
  6566.                             foreach (Ped ped in allPeds)
  6567.                             {
  6568.                                 if ((Entity)this.bagModelReturn(ped) == (Entity)null)
  6569.                                 {
  6570.                                     if (this.DoesPedHasBigWeapons(ped))
  6571.                                         this.bagSet(this.bagModelCheck(ped), ped);
  6572.                                 }
  6573.                                 else
  6574.                                 {
  6575.                                     this.checkBagVisibility(ped);
  6576.                                     if (!this.isStrapAttachedToPed(this.bagModelReturn(ped), ped))
  6577.                                         this.strapSet(this.bagModelReturn(ped), ped);
  6578.                                 }
  6579.                             }
  6580.                         }
  6581.                     }
  6582.                 }
  6583.                 if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6584.                 {
  6585.                     int num1;
  6586.                     if (Function.Call<int>(Hash._0x79CFD9827CC979B6, (InputArgument)Game.Player.Character) == -1)
  6587.                     {
  6588.                         if (!Function.Call<bool>(Hash._0x7DCE8BDA0F1C1200, (InputArgument)Game.Player.Character))
  6589.                         {
  6590.                             num1 = Function.Call<bool>(Hash._0xF731332072F5156C, (InputArgument)Game.Player.Character, (InputArgument)4222310262U) ? 1 : 0;
  6591.                             goto label_1062;
  6592.                         }
  6593.                     }
  6594.                     num1 = 1;
  6595.                 label_1062:
  6596.                     if (num1 != 0)
  6597.                     {
  6598.                         if (!this.skyDiving)
  6599.                         {
  6600.                             if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6601.                                 this.skydive(Game.Player.Character, this.bagModelReturn(Game.Player.Character), true);
  6602.                             this.skyDiving = true;
  6603.                         }
  6604.                     }
  6605.                     else
  6606.                     {
  6607.                         if (this.skyDiving && !this.changedPosition)
  6608.                         {
  6609.                             if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6610.                                 this.skydive(Game.Player.Character, this.bagModelReturn(Game.Player.Character), false);
  6611.                             this.skyDiving = false;
  6612.                         }
  6613.                         if (Game.Player.Character.Model == (Model)PedHash.Michael)
  6614.                         {
  6615.                             int num3;
  6616.                             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 1)
  6617.                             {
  6618.                                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 3)
  6619.                                 {
  6620.                                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 12)
  6621.                                     {
  6622.                                         if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 3)
  6623.                                         {
  6624.                                             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 15)
  6625.                                             {
  6626.                                                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 21)
  6627.                                                 {
  6628.                                                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 22)
  6629.                                                     {
  6630.                                                         if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)9) != 5)
  6631.                                                         {
  6632.                                                             num3 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)9) == 9 ? 1 : 0;
  6633.                                                             goto label_1082;
  6634.                                                         }
  6635.                                                     }
  6636.                                                 }
  6637.                                             }
  6638.                                         }
  6639.                                     }
  6640.                                 }
  6641.                             }
  6642.                             num3 = 1;
  6643.                         label_1082:
  6644.                             if (num3 != 0)
  6645.                             {
  6646.                                 if (!this.wearingGear)
  6647.                                 {
  6648.                                     if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6649.                                         this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), true);
  6650.                                     this.wearingGear = true;
  6651.                                 }
  6652.                             }
  6653.                             else if (this.wearingGear && !this.changedPosition)
  6654.                             {
  6655.                                 if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6656.                                     this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), false);
  6657.                                 this.wearingGear = false;
  6658.                             }
  6659.                         }
  6660.                         if (Game.Player.Character.Model == (Model)PedHash.Franklin)
  6661.                         {
  6662.                             int num3;
  6663.                             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 1)
  6664.                             {
  6665.                                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 2)
  6666.                                 {
  6667.                                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 8)
  6668.                                     {
  6669.                                         if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 10)
  6670.                                         {
  6671.                                             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 18)
  6672.                                             {
  6673.                                                 num3 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) == 19 ? 1 : 0;
  6674.                                                 goto label_1101;
  6675.                                             }
  6676.                                         }
  6677.                                     }
  6678.                                 }
  6679.                             }
  6680.                             num3 = 1;
  6681.                         label_1101:
  6682.                             if (num3 != 0)
  6683.                             {
  6684.                                 if (!this.wearingGear)
  6685.                                 {
  6686.                                     if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6687.                                         this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), true);
  6688.                                     this.wearingGear = true;
  6689.                                 }
  6690.                             }
  6691.                             else if (this.wearingGear && !this.changedPosition)
  6692.                             {
  6693.                                 if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6694.                                     this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), false);
  6695.                                 this.wearingGear = false;
  6696.                             }
  6697.                         }
  6698.                         if (Game.Player.Character.Model == (Model)PedHash.Trevor)
  6699.                         {
  6700.                             int num3;
  6701.                             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 1)
  6702.                             {
  6703.                                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 3)
  6704.                                 {
  6705.                                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 5)
  6706.                                     {
  6707.                                         if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 15)
  6708.                                         {
  6709.                                             num3 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) == 16 ? 1 : 0;
  6710.                                             goto label_1119;
  6711.                                         }
  6712.                                     }
  6713.                                 }
  6714.                             }
  6715.                             num3 = 1;
  6716.                         label_1119:
  6717.                             if (num3 != 0)
  6718.                             {
  6719.                                 if (!this.wearingGear)
  6720.                                 {
  6721.                                     if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6722.                                         this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), true);
  6723.                                     this.wearingGear = true;
  6724.                                 }
  6725.                             }
  6726.                             else if (this.wearingGear && !this.changedPosition)
  6727.                             {
  6728.                                 if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6729.                                     this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), false);
  6730.                                 this.wearingGear = false;
  6731.                             }
  6732.                         }
  6733.                         if (Game.Player.Character.Model == (Model)PedHash.FreemodeMale01 || Game.Player.Character.Model == (Model)PedHash.FreemodeFemale01)
  6734.                         {
  6735.                             int num3;
  6736.                             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 1)
  6737.                             {
  6738.                                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 2)
  6739.                                 {
  6740.                                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 3)
  6741.                                     {
  6742.                                         if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 4)
  6743.                                         {
  6744.                                             if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 5)
  6745.                                             {
  6746.                                                 if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 6)
  6747.                                                 {
  6748.                                                     if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 7)
  6749.                                                     {
  6750.                                                         num3 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) == 8 ? 1 : 0;
  6751.                                                         goto label_1140;
  6752.                                                     }
  6753.                                                 }
  6754.                                             }
  6755.                                         }
  6756.                                     }
  6757.                                 }
  6758.                             }
  6759.                             num3 = 1;
  6760.                         label_1140:
  6761.                             if (num3 != 0)
  6762.                             {
  6763.                                 if (!this.wearingGear)
  6764.                                 {
  6765.                                     if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6766.                                         this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), true);
  6767.                                     this.wearingGear = true;
  6768.                                 }
  6769.                             }
  6770.                             else if (this.wearingGear && !this.changedPosition)
  6771.                             {
  6772.                                 if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
  6773.                                     this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), false);
  6774.                                 this.wearingGear = false;
  6775.                             }
  6776.                         }
  6777.                     }
  6778.                 }
  6779.  
  6780.                 void DisplayHelpTextThisFrame(string text)
  6781.                 {
  6782.                     Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
  6783.                     Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
  6784.                     Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
  6785.                 }
  6786.             }
  6787.             if (this.findSellerOption)
  6788.             {
  6789.                 this.UsePhoneFunc(Game.Player.Character);
  6790.                 int num1 = 0;
  6791.                 int num2 = 176;
  6792.                 int num3 = 177;
  6793.                 DisplayHelpTextThisFrame("~y~Mark ~w~closest ~BLIP_INFO_ICON~ Dealer to purchase Supplies, Bags and Holsters");
  6794.                 this.Draw(2, this.hasBag, this.canTakeBagFromVehicle, this.hasHolster, this.isBagBought, this.isBagDropped);
  6795.                 if (this.isBagDropped)
  6796.                 {
  6797.                     if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num1))
  6798.                     {
  6799.                         if (this.getDroppedBag(Game.Player.Character) != (Entity)null)
  6800.                             this.blipHandle(true, this.getDroppedBag(Game.Player.Character), BlipSprite.Information, "Dufflebag", 0.85f, 200, true, false);
  6801.                         this.Notify("IBAG: ", "Stashed bag's location~n~  has been ~y~Marked", (int)byte.MaxValue, 0, 0, "CHAR_GANGAPP");
  6802.                         Function.Call(Hash._0x95C9E72F3D7DEC9B, (InputArgument)2);
  6803.                         this.findSellerOption = false;
  6804.                         this.ClosePhoneFunc(Game.Player.Character, 0, 0);
  6805.                         this.followCamera = false;
  6806.                         this.soundFX(Game.Player.Character, "beep.wav");
  6807.                     }
  6808.                 }
  6809.                 if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num3))
  6810.                 {
  6811.                     Function.Call(Hash._0x95C9E72F3D7DEC9B, (InputArgument)1);
  6812.                     this.findSellerOption = false;
  6813.                     this.ClosePhoneFunc(Game.Player.Character, 300, 0);
  6814.                     this.followCamera = false;
  6815.                 }
  6816.                 if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num2))
  6817.                 {
  6818.                     this.findSellerOption = false;
  6819.                     this.Notify("IBAG: ", " Dealers's location~n~ has been ~y~Marked", (int)byte.MaxValue, 0, 0, "CHAR_GANGAPP");
  6820.                     Function.Call(Hash._0x95C9E72F3D7DEC9B, (InputArgument)3);
  6821.                     this.CreateSeller(World.GetSafeCoordForPed(new Vector3(Game.Player.Character.Position.X + 50f, Game.Player.Character.Position.Y + 50f, Game.Player.Character.Position.Z), false));
  6822.                     this.ClosePhoneFunc(Game.Player.Character, 0, 0);
  6823.                     this.followCamera = false;
  6824.                     this.soundFX(Game.Player.Character, "beep.wav");
  6825.                 }
  6826.                 this.camTimer = 0;
  6827.                 if (!this.followCamera)
  6828.                 {
  6829.                     this.CamObject = (Entity)Game.Player.Character;
  6830.                     this.followCamera = true;
  6831.                 }
  6832.  
  6833.                 void DisplayHelpTextThisFrame(string text)
  6834.                 {
  6835.                     Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
  6836.                     Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
  6837.                     Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
  6838.                 }
  6839.             }
  6840.             if (this.inMenu)
  6841.             {
  6842.                 Function.Call(Hash._0xC4E2813898C97A4B, (InputArgument)false);
  6843.                 Function.Call(Hash._0x015C49A93E3E086E, (InputArgument)true);
  6844.                 this.camTimer = 0;
  6845.                 if (!this.followCamera)
  6846.                 {
  6847.                     this.CamObject = (Entity)this.bagModelReturn(Game.Player.Character);
  6848.                     this.followCamera = true;
  6849.                 }
  6850.                 if (this.modMenuPool != null)
  6851.                 {
  6852.                     this.modMenuPool.ProcessMenus();
  6853.                     this.modMenuPool.ProcessMouse();
  6854.                     this.modMenuPool.MouseEdgeEnabled = true;
  6855.                     if (!this.modMenuPool.IsAnyMenuOpen())
  6856.                     {
  6857.                         if (this.mainMenu != null)
  6858.                         {
  6859.                             if (!this.isOccupied(Game.Player.Character))
  6860.                                 this.weaponInventoryAnim(this.bagModelReturn(Game.Player.Character), Game.Player.Character);
  6861.                             this.mainMenu.Visible = true;
  6862.                         }
  6863.                         else
  6864.                             this.Setup(Game.Player.Character);
  6865.                     }
  6866.                 }
  6867.                 else
  6868.                     this.Setup(Game.Player.Character);
  6869.             }
  6870.             else if (this.modMenuPool != null && this.mainMenu != null)
  6871.             {
  6872.                 this.mainMenuListString.Clear();
  6873.                 this.stashedWeapons.Clear();
  6874.                 this.characterWeapons.Clear();
  6875.                 this.mainMenu.Visible = false;
  6876.                 this.modMenuPool.CloseAllMenus();
  6877.                 this.mainMenu.Clear();
  6878.                 this.mainMenu = (UIMenu)null;
  6879.                 this.modMenuPool = (MenuPool)null;
  6880.             }
  6881.             if (!((Entity)this.seller != (Entity)null))
  6882.                 return;
  6883.             if (this.seller.IsAlive && !this.seller.IsFleeing && this.seller.Exists())
  6884.             {
  6885.                 position1 = Game.Player.Character.Position;
  6886.                 if ((double)position1.DistanceTo(this.seller.Position) < 50.0)
  6887.                 {
  6888.                     int num1;
  6889.                     if (this.deal && this.greetingFinished)
  6890.                     {
  6891.                         position1 = Game.Player.Character.Position;
  6892.                         if ((double)position1.DistanceTo(this.seller.Position) > 14.0)
  6893.                             this.clearScriptFunction();
  6894.                         if (!this.inProcessBag)
  6895.                         {
  6896.                             this.DisableControlsFunc(false);
  6897.                             int num2 = 52;
  6898.                             int num3 = 0;
  6899.                             int num4 = 73;
  6900.                             int num5 = 75;
  6901.                             int num6 = 51;
  6902.                             if (this.sellerAvailableItems <= 0 && this.TotalPrice <= 0)
  6903.                             {
  6904.                                 DisplayHelpTextThisFrame("No ~o~items~w~ are available right now");
  6905.                             }
  6906.                             else
  6907.                             {
  6908.                                 string[] strArray = new string[5]
  6909.                                 {
  6910.                   " Price: ~c~",
  6911.                   this.TotalPrice.ToString(),
  6912.                   " ~g~$~n~~w~ Money: ~c~",
  6913.                   null,
  6914.                   null
  6915.                                 };
  6916.                                 num1 = Game.Player.Money;
  6917.                                 strArray[3] = num1.ToString();
  6918.                                 strArray[4] = " ~g~$";
  6919.                                 DisplayHelpTextThisFrame(string.Concat(strArray));
  6920.                             }
  6921.                             this.Draw(3, this.hasBag, this.canTakeBagFromVehicle, this.hasHolster, this.isBagBought, this.isBagDropped);
  6922.                             if (!this.isBagBought)
  6923.                             {
  6924.                                 if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num2))
  6925.                                 {
  6926.                                     if (!this.buyBag)
  6927.                                     {
  6928.                                         this.buyBag = true;
  6929.                                         --this.sellerAvailableItems;
  6930.                                         this.TotalPrice += this.BagPrice;
  6931.                                         Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  6932.                                         UI.Notify("Dufflebag has been ~g~addded~w~ to your ~o~Cart", true);
  6933.                                     }
  6934.                                     else
  6935.                                     {
  6936.                                         this.buyBag = false;
  6937.                                         ++this.sellerAvailableItems;
  6938.                                         this.TotalPrice -= this.BagPrice;
  6939.                                         Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
  6940.                                         UI.Notify("Dufflebag has been ~r~removed~w~ from your ~o~Cart", true);
  6941.                                     }
  6942.                                 }
  6943.                             }
  6944.                             else
  6945.                                 this.buyBag = false;
  6946.                             if (!this.hasHolster)
  6947.                             {
  6948.                                 if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num4))
  6949.                                 {
  6950.                                     if (!this.buyHolster)
  6951.                                     {
  6952.                                         this.buyHolster = true;
  6953.                                         --this.sellerAvailableItems;
  6954.                                         this.TotalPrice += this.HolsterPrice;
  6955.                                         Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  6956.                                         UI.Notify("Holster has been ~g~added~w~ to your ~o~Cart", true);
  6957.                                     }
  6958.                                     else
  6959.                                     {
  6960.                                         this.buyHolster = false;
  6961.                                         ++this.sellerAvailableItems;
  6962.                                         this.TotalPrice -= this.HolsterPrice;
  6963.                                         Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
  6964.                                         UI.Notify("Holster has been ~r~removed~w~ from your ~o~Cart", true);
  6965.                                     }
  6966.                                 }
  6967.                             }
  6968.                             else
  6969.                                 this.buyHolster = false;
  6970.                             if (this.cigsCount < this.maxCigs || this.pillsCount < this.maxPills)
  6971.                             {
  6972.                                 if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num3))
  6973.                                 {
  6974.                                     if (!this.buySupplies)
  6975.                                     {
  6976.                                         this.buySupplies = true;
  6977.                                         --this.sellerAvailableItems;
  6978.                                         this.TotalPrice += this.SupplyPrice;
  6979.                                         Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
  6980.                                         UI.Notify("Medical supplies has been ~g~added~w~ to your ~o~Cart", true);
  6981.                                     }
  6982.                                     else
  6983.                                     {
  6984.                                         this.buySupplies = false;
  6985.                                         ++this.sellerAvailableItems;
  6986.                                         this.TotalPrice -= this.SupplyPrice;
  6987.                                         Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
  6988.                                         UI.Notify("Medical supplies has been ~r~removed~w~ from your ~o~Cart", true);
  6989.                                     }
  6990.                                 }
  6991.                             }
  6992.                             else
  6993.                                 this.buySupplies = false;
  6994.                             if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num5))
  6995.                             {
  6996.                                 this.sellerDialogCounter = 3;
  6997.                                 this.inProcessBag = true;
  6998.                                 this.canceled = true;
  6999.                             }
  7000.                             if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num6))
  7001.                             {
  7002.                                 this.sellerDialogCounter = 7;
  7003.                                 this.inProcessBag = true;
  7004.                                 if (this.buyBag || this.buyHolster || this.buySupplies)
  7005.                                     this.canceled = false;
  7006.                             }
  7007.                             if (Function.Call<bool>(Hash._0xD71649DB0A545AA3, (InputArgument)this.seller, (InputArgument)Game.Player.Character, (InputArgument)10f))
  7008.                             {
  7009.                                 if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"oddjobs@assassinate@construction@", (InputArgument)"unarmed_fold_arms", (InputArgument)3))
  7010.                                 {
  7011.                                     Game.Player.Character.Task.LookAt((Entity)this.seller);
  7012.                                     Game.Player.Character.Task.PlayAnimation("oddjobs@assassinate@construction@", "unarmed_fold_arms", 3f, -1, AnimationFlags.Loop | AnimationFlags.UpperBodyOnly);
  7013.                                 }
  7014.                             }
  7015.                             else
  7016.                             {
  7017.                                 Game.DisableAllControlsThisFrame(2);
  7018.                                 if (this.timeOut > 0)
  7019.                                     num1 = this.timeOut--;
  7020.                                 if (this.timeOut <= 0)
  7021.                                 {
  7022.                                     if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"oddjobs@assassinate@construction@", (InputArgument)"unarmed_fold_arms", (InputArgument)3))
  7023.                                     {
  7024.                                         Game.Player.Character.Task.TurnTo((Entity)this.seller);
  7025.                                         this.seller.Task.TurnTo((Entity)Game.Player.Character);
  7026.                                         this.timeOut = 200;
  7027.                                     }
  7028.                                     else
  7029.                                     {
  7030.                                         Game.Player.Character.Task.ClearAll();
  7031.                                         Game.Player.Character.Task.TurnTo((Entity)this.seller);
  7032.                                         this.seller.Task.TurnTo((Entity)Game.Player.Character);
  7033.                                         this.timeOut = 200;
  7034.                                     }
  7035.                                 }
  7036.                             }
  7037.                             this.CamObject = (Entity)this.seller;
  7038.                             this.camTimer = 0;
  7039.                             this.followCamera = true;
  7040.  
  7041.                             void DisplayHelpTextThisFrame(string text)
  7042.                             {
  7043.                                 Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
  7044.                                 Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
  7045.                                 Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
  7046.                             }
  7047.                         }
  7048.                         else
  7049.                         {
  7050.                             if (this.canceled)
  7051.                             {
  7052.                                 Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GENERIC_NO", (InputArgument)"SPEECH_PARAMS_FORCE");
  7053.                                 Script.Wait(1000);
  7054.                                 Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GENERIC_BYE", (InputArgument)"SPEECH_PARAMS_FORCE");
  7055.                                 this.clearScriptFunction();
  7056.                             }
  7057.                             else if (this.payed)
  7058.                             {
  7059.                                 if (Game.Player.Money > this.TotalPrice + this.TotalPrice / 100 * 5)
  7060.                                 {
  7061.                                     position1 = Game.Player.Character.Position;
  7062.                                     if ((double)position1.DistanceTo(this.seller.Position) <= 5.0)
  7063.                                     {
  7064.                                         this.sellerDialogFunc(this.sellerDialogCounter, this.buyHolster, this.buyBag, this.buySupplies, this.seller);
  7065.                                     }
  7066.                                     else
  7067.                                     {
  7068.                                         if (this.timeOut > 0)
  7069.                                             --this.timeOut;
  7070.                                         if (this.timeOut <= 0)
  7071.                                         {
  7072.                                             Game.Player.Character.Task.GoTo((Entity)this.seller);
  7073.                                             this.seller.Task.GoTo(Game.Player.Character.Position, false, 5000);
  7074.                                             this.timeOut = 200;
  7075.                                         }
  7076.                                     }
  7077.                                 }
  7078.                                 else
  7079.                                 {
  7080.                                     this.Notify("MAZE", "Transaction ~r~Failed", (int)byte.MaxValue, 0, 0, "CHAR_BANK_MAZE");
  7081.                                     this.Notify("MAZE", "~o~Not enough money on your account", (int)byte.MaxValue, 0, 0, "CHAR_BANK_MAZE");
  7082.                                     Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)this.seller, (InputArgument)"GENERIC_CURSE_MED", (InputArgument)"SPEECH_PARAMS_FORCE");
  7083.                                     Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GAME_BAD_SELF", (InputArgument)"SPEECH_PARAMS_FORCE");
  7084.                                     this.clearScriptFunction();
  7085.                                 }
  7086.                             }
  7087.                             else
  7088.                             {
  7089.                                 if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"oddjobs@assassinate@construction@", (InputArgument)"unarmed_fold_arms", (InputArgument)3))
  7090.                                 {
  7091.                                     Game.Player.Character.Task.ClearAll();
  7092.                                     Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GENERIC_YES", (InputArgument)"SPEECH_PARAMS_FORCE");
  7093.                                 }
  7094.                                 DisplayHelpTextThisFrame("~BLIP_INFO_ICON~ Pay for purchases with your ~y~Phone");
  7095.                             }
  7096.  
  7097.                             void DisplayHelpTextThisFrame(string text)
  7098.                             {
  7099.                                 Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
  7100.                                 Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
  7101.                                 Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
  7102.                             }
  7103.                         }
  7104.                     }
  7105.                     if ((Entity)this.seller != (Entity)null && !this.greeting)
  7106.                     {
  7107.                         position1 = Game.Player.Character.Position;
  7108.                         if ((double)position1.DistanceTo(this.seller.Position) < 10.0)
  7109.                         {
  7110.                             this.greeting = true;
  7111.                         }
  7112.                         else
  7113.                         {
  7114.                             position1 = Game.Player.Character.Position;
  7115.                             if ((double)position1.DistanceTo(this.seller.Position) < 50.0)
  7116.                             {
  7117.                                 if (this.timeOut > 0)
  7118.                                     num1 = this.timeOut--;
  7119.                                 if (this.timeOut <= 0)
  7120.                                 {
  7121.                                     if (!Function.Call<bool>(Hash._0xD71649DB0A545AA3, (InputArgument)this.seller, (InputArgument)Game.Player.Character, (InputArgument)10f))
  7122.                                     {
  7123.                                         this.seller.Task.TurnTo((Entity)Game.Player.Character);
  7124.                                         this.timeOut = 200;
  7125.                                     }
  7126.                                 }
  7127.                             }
  7128.                         }
  7129.                     }
  7130.                     if (this.greeting && !this.greetingFinished)
  7131.                     {
  7132.                         position1 = Game.Player.Character.Position;
  7133.                         if ((double)position1.DistanceTo(this.seller.Position) > 50.0)
  7134.                             this.clearScriptFunction();
  7135.                         position1 = Game.Player.Character.Position;
  7136.                         if ((double)position1.DistanceTo(this.seller.Position) < 7.0)
  7137.                         {
  7138.                             if (!this.followCamera)
  7139.                             {
  7140.                                 this.CamObject = (Entity)this.seller;
  7141.                                 this.followCamera = true;
  7142.                             }
  7143.                             this.camTimer = 0;
  7144.                         }
  7145.                         else
  7146.                             this.followCamera = false;
  7147.                         if (this.timeOut > 0)
  7148.                             num1 = this.timeOut--;
  7149.                         position1 = this.seller.Position;
  7150.                         if ((double)position1.DistanceTo(Game.Player.Character.Position) < 2.5)
  7151.                         {
  7152.                             Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GENERIC_HI", (InputArgument)"SPEECH_PARAMS_FORCE");
  7153.                             this.seller.Task.LookAt((Entity)Game.Player.Character, 1000);
  7154.                             Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)this.seller, (InputArgument)"GENERIC_HOWS_IT_GOING", (InputArgument)"SPEECH_PARAMS_FORCE");
  7155.                             if (this.sellerDialogCounter <= 0)
  7156.                             {
  7157.                                 this.payed = false;
  7158.                                 this.greetingFinished = true;
  7159.                                 this.followCamera = false;
  7160.                                 this.seller.Task.ClearAll();
  7161.                                 Game.Player.Character.Task.ClearAll();
  7162.                                 this.deal = true;
  7163.                                 this.inProcessBag = false;
  7164.                                 this.update_inventory_status(Game.Player.Character);
  7165.                                 if (!this.buyBag && !this.isBagBought)
  7166.                                     ++this.sellerAvailableItems;
  7167.                                 if (!this.buyHolster && !this.hasHolster)
  7168.                                     ++this.sellerAvailableItems;
  7169.                                 if (!this.buySupplies && (this.cigsCount < this.maxCigs || this.pillsCount < this.maxPills))
  7170.                                     ++this.sellerAvailableItems;
  7171.                             }
  7172.                         }
  7173.                     }
  7174.                 }
  7175.             }
  7176.             else
  7177.                 this.clearScriptFunction();
  7178.         }
  7179.         internal class Utilities
  7180.         {
  7181.             public static int GetBigWeaponCount(Ped ped)
  7182.             {
  7183.                 int num = 0;
  7184.                 foreach (Utilities.BigWeapons bigWeapons in Enum.GetValues(typeof(Utilities.BigWeapons)))
  7185.                 {
  7186.                     if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped.Handle, (InputArgument)bigWeapons.GetHashCode(), (InputArgument)false))
  7187.                         ++num;
  7188.                 }
  7189.                 return num;
  7190.             }
  7191.  
  7192.             public static int GetSmallWeaponCount(Ped ped)
  7193.             {
  7194.                 int num = 0;
  7195.                 foreach (Utilities.SmallWeapons smallWeapons in Enum.GetValues(typeof(Utilities.SmallWeapons)))
  7196.                 {
  7197.                     if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped.Handle, (InputArgument)smallWeapons.GetHashCode(), (InputArgument)false))
  7198.                         ++num;
  7199.                 }
  7200.                 return num;
  7201.             }
  7202.  
  7203.             public static int GetExplosivesCount(Ped ped)
  7204.             {
  7205.                 int num = 0;
  7206.                 foreach (Utilities.Explosives explosives in Enum.GetValues(typeof(Utilities.Explosives)))
  7207.                 {
  7208.                     if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped.Handle, (InputArgument)explosives.GetHashCode(), (InputArgument)false))
  7209.                         ++num;
  7210.                 }
  7211.                 return num;
  7212.             }
  7213.  
  7214.             public static int GetMiscCount(Ped ped)
  7215.             {
  7216.                 int num = 0;
  7217.                 foreach (Utilities.Misc misc in Enum.GetValues(typeof(Utilities.Misc)))
  7218.                 {
  7219.                     if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped.Handle, (InputArgument)misc.GetHashCode(), (InputArgument)false))
  7220.                         ++num;
  7221.                 }
  7222.                 return num;
  7223.             }
  7224.             public static int GetMeleeCount(Ped ped)
  7225.             {
  7226.                 int num = 0;
  7227.                 foreach (Utilities.Melee melee in Enum.GetValues(typeof(Utilities.Melee)))
  7228.                 {
  7229.                     if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped.Handle, (InputArgument)melee.GetHashCode(), (InputArgument)false))
  7230.                         ++num;
  7231.                 }
  7232.                 return num;
  7233.             }
  7234.  
  7235.             private enum BigWeapons : uint
  7236.             {
  7237.                 SniperRifle = 100416529, // 0x05FC3C11
  7238.                 FireExtinguisher = 101631238, // 0x060EC506
  7239.                 CombatPDW = 171789620, // 0x0A3D4D34
  7240.                 HeavySniper = 205991906, // 0x0C472FE2
  7241.                 PumpShotgun = 487013001, // 0x1D073A89
  7242.                 HeavyShotgun = 984333226, // 0x3AABBBAA
  7243.                 Minigun = 1119849093, // 0x42BF8A85
  7244.                 GrenadeLauncherSmoke = 1305664598, // 0x4DD2DC56
  7245.                 Gusenberg = 1627465347, // 0x61012683
  7246.                 CompactRifle = 1649403952, // 0x624FE830
  7247.                 HomingLauncher = 1672152130, // 0x63AB0442
  7248.                 Railgun = 1834241177, // 0x6D544C99
  7249.                 SawnOffShotgun = 2017895192, // 0x7846A318
  7250.                 BullpupRifle = 2132975508, // 0x7F229F94
  7251.                 Firework = 2138347493, // 0x7F7497E5
  7252.                 CombatMG = 2144741730, // 0x7FD62962
  7253.                 CarbineRifle = 2210333304, // 0x83BF0278
  7254.                 MG = 2634544996, // 0x9D07F764
  7255.                 BullpupShotgun = 2640438543, // 0x9D61E50F
  7256.                 GrenadeLauncher = 2726580491, // 0xA284510B
  7257.                 Musket = 2828843422, // 0xA89CB99E
  7258.                 AdvancedRifle = 2937143193, // 0xAF113F99
  7259.                 RPG = 2982836145, // 0xB1CA77B1
  7260.                 AssaultRifle = 3220176749, // 0xBFEFFF6D
  7261.                 SpecialCarbine = 3231910285, // 0xC0A3098D
  7262.                 MarksmanRifle = 3342088282, // 0xC734385A
  7263.                 AssaultShotgun = 3800352039, // 0xE284C527
  7264.                 DoubleBarrelShotgun = 4019527611, // 0xEF951FBB
  7265.                 AssaultSMG = 4024951519, // 0xEFE7E2DF
  7266.                 SMG = 736523883, // 0x2BE6766B
  7267.                 MicroSMG = 324215364, // 0x13532244
  7268.                 CarbineRifleMKII = 0x83BF0278,
  7269.                 SpecialCarbineMKII = 0x969C3D67,
  7270.                 AssaultRifleMKII = 0x394F415C,
  7271.                 BullupRifleMKII = 0x84D6FAFD,
  7272.                 CombatMGMKII = 0xDBBD7280,
  7273.                 HeavySniperMKII = 0xA914799,
  7274.                 MarksManRifleMKII = 0x6A6C02E0,
  7275.                 WidowMaker = 0xB62D1F67,
  7276.                 SmgMKII = 0x78A97CD0,
  7277.                 RayCarbine = 0x476BF155,
  7278.             }
  7279.  
  7280.             private enum SmallWeapons : uint
  7281.             {
  7282.                 VintagePistol = 137902532, // 0x083839C4
  7283.                 Pistol = 453432689, // 0x1B06D571
  7284.                 APPistol = 584646201, // 0x22D8FE39
  7285.                 StunGun = 911657153, // 0x3656C8C1
  7286.                 FlareGun = 1198879012, // 0x47757124
  7287.                 CombatPistol = 1593441988, // 0x5EF9FEC4
  7288.                 Pistol50 = 2578377531, // 0x99AEEB3B
  7289.                 SNSPistol = 3218215474, // 0xBFD21232
  7290.                 Revolver = 3249783761, // 0xC1B3C3D1
  7291.                 HeavyPistol = 3523564046, // 0xD205520E
  7292.                 MachinePistol = 3675956304, // 0xDB1AA450
  7293.                 MarksmanPistol = 3696079510, // 0xDC4DB296
  7294.                 PistolMKII = 0xBFE256D4,
  7295.                 RayPistol = 0xAF3696A1,
  7296.                 HeavyRevolverMKII = 0xCB96392F,
  7297.                 DoubleActionRevolver = 0x97EA20B8,
  7298.                 SnsPistolMKII = 0x88374054,
  7299.                 JerryCan = 0x34A67B97,
  7300.             }
  7301.             private enum Explosives : uint
  7302.             {
  7303.                 StickyBomb = 0x2C3731D9,
  7304.                 Grenade = 0x93E220BD,
  7305.                 Cocktail = 0x24B17070,
  7306.                 BZ = 0xA0973D5E,
  7307.                 PipeBomb = 0xBA45E8B8,
  7308.                 TearGas = 0xFDBC8A50,
  7309.                 Flare = 0x497FACC3,
  7310.                 ProximityMine = 0xAB564B93,
  7311.  
  7312.  
  7313.             }
  7314.             private enum Misc : uint
  7315.             {
  7316.                 SnowBall = 0x787F0BB,
  7317.                 Ball = 0x23C9F95C,
  7318.                 Knife = 0x99B507EA,
  7319.                 SwitchBlade = 0xDFE37640,
  7320.                 Flashlight = 0x8BB05FD7,
  7321.                 Dagger = 0x92A27487,
  7322.                 BrassKnuckles = 0xD8DF3C3C,
  7323.  
  7324.             }
  7325.             private enum Melee : uint
  7326.             {
  7327.                 Bat = 0x958A4A8F,
  7328.                 BrokenBottle = 0xF9E6AA4B,
  7329.                 CrowBar = 0x84BD7BFD,
  7330.                 GolfClub = 0x440E4788,
  7331.                 Hammer = 0x4E875F73,
  7332.                 Hatchet = 0xF9DCBF2D,
  7333.                 Machete = 0xDD5DF8D9,
  7334.                 NightStick = 0x678B81B1,
  7335.                 PipeWrench = 0x19044EE0,
  7336.                 BattleAxe = 0xCD274149,
  7337.                 PoolCue = 0x94117305,
  7338.                 StoneHatchet = 0x3813FC08,
  7339.             }
  7340.         }
  7341.  
  7342.         private enum Inputs
  7343.         {
  7344.             INPUT_NEXT_CAMERA,
  7345.             INPUT_LOOK_LR,
  7346.             INPUT_LOOK_UD,
  7347.             INPUT_LOOK_UP_ONLY,
  7348.             INPUT_LOOK_DOWN_ONLY,
  7349.             INPUT_LOOK_LEFT_ONLY,
  7350.             INPUT_LOOK_RIGHT_ONLY,
  7351.             INPUT_CINEMATIC_SLOWMO,
  7352.             INPUT_SCRIPTED_FLY_UD,
  7353.             INPUT_SCRIPTED_FLY_LR,
  7354.             INPUT_SCRIPTED_FLY_ZUP,
  7355.             INPUT_SCRIPTED_FLY_ZDOWN,
  7356.             INPUT_WEAPON_WHEEL_UD,
  7357.             INPUT_WEAPON_WHEEL_LR,
  7358.             INPUT_WEAPON_WHEEL_NEXT,
  7359.             INPUT_WEAPON_WHEEL_PREV,
  7360.             INPUT_SELECT_NEXT_WEAPON,
  7361.             INPUT_SELECT_PREV_WEAPON,
  7362.             INPUT_SKIP_CUTSCENE,
  7363.             INPUT_CHARACTER_WHEEL,
  7364.             INPUT_MULTIPLAYER_INFO,
  7365.             INPUT_SPRINT,
  7366.             INPUT_JUMP,
  7367.             INPUT_ENTER,
  7368.             INPUT_ATTACK,
  7369.             INPUT_AIM,
  7370.             INPUT_LOOK_BEHIND,
  7371.             INPUT_PHONE,
  7372.             INPUT_SPECIAL_ABILITY,
  7373.             INPUT_SPECIAL_ABILITY_SECONDARY,
  7374.             INPUT_MOVE_LR,
  7375.             INPUT_MOVE_UD,
  7376.             INPUT_MOVE_UP_ONLY,
  7377.             INPUT_MOVE_DOWN_ONLY,
  7378.             INPUT_MOVE_LEFT_ONLY,
  7379.             INPUT_MOVE_RIGHT_ONLY,
  7380.             INPUT_DUCK,
  7381.             INPUT_SELECT_WEAPON,
  7382.             INPUT_PICKUP,
  7383.             INPUT_SNIPER_ZOOM,
  7384.             INPUT_SNIPER_ZOOM_IN_ONLY,
  7385.             INPUT_SNIPER_ZOOM_OUT_ONLY,
  7386.             INPUT_SNIPER_ZOOM_IN_SECONDARY,
  7387.             INPUT_SNIPER_ZOOM_OUT_SECONDARY,
  7388.             INPUT_COVER,
  7389.             INPUT_RELOAD,
  7390.             INPUT_TALK,
  7391.             INPUT_DETONATE,
  7392.             INPUT_HUD_SPECIAL,
  7393.             INPUT_ARREST,
  7394.             INPUT_ACCURATE_AIM,
  7395.             INPUT_CONTEXT,
  7396.             INPUT_CONTEXT_SECONDARY,
  7397.             INPUT_WEAPON_SPECIAL,
  7398.             INPUT_WEAPON_SPECIAL_TWO,
  7399.             INPUT_DIVE,
  7400.             INPUT_DROP_WEAPON,
  7401.             INPUT_DROP_AMMO,
  7402.             INPUT_THROW_GRENADE,
  7403.             INPUT_VEH_MOVE_LR,
  7404.             INPUT_VEH_MOVE_UD,
  7405.             INPUT_VEH_MOVE_UP_ONLY,
  7406.             INPUT_VEH_MOVE_DOWN_ONLY,
  7407.             INPUT_VEH_MOVE_LEFT_ONLY,
  7408.             INPUT_VEH_MOVE_RIGHT_ONLY,
  7409.             INPUT_VEH_SPECIAL,
  7410.             INPUT_VEH_GUN_LR,
  7411.             INPUT_VEH_GUN_UD,
  7412.             INPUT_VEH_AIM,
  7413.             INPUT_VEH_ATTACK,
  7414.             INPUT_VEH_ATTACK2,
  7415.             INPUT_VEH_ACCELERATE,
  7416.             INPUT_VEH_BRAKE,
  7417.             INPUT_VEH_DUCK,
  7418.             INPUT_VEH_HEADLIGHT,
  7419.             INPUT_VEH_EXIT,
  7420.             INPUT_VEH_HANDBRAKE,
  7421.             INPUT_VEH_HOTWIRE_LEFT,
  7422.             INPUT_VEH_HOTWIRE_RIGHT,
  7423.             INPUT_VEH_LOOK_BEHIND,
  7424.             INPUT_VEH_CIN_CAM,
  7425.             INPUT_VEH_NEXT_RADIO,
  7426.             INPUT_VEH_PREV_RADIO,
  7427.             INPUT_VEH_NEXT_RADIO_TRACK,
  7428.             INPUT_VEH_PREV_RADIO_TRACK,
  7429.             INPUT_VEH_RADIO_WHEEL,
  7430.             INPUT_VEH_HORN,
  7431.             INPUT_VEH_FLY_THROTTLE_UP,
  7432.             INPUT_VEH_FLY_THROTTLE_DOWN,
  7433.             INPUT_VEH_FLY_YAW_LEFT,
  7434.             INPUT_VEH_FLY_YAW_RIGHT,
  7435.             INPUT_VEH_PASSENGER_AIM,
  7436.             INPUT_VEH_PASSENGER_ATTACK,
  7437.             INPUT_VEH_SPECIAL_ABILITY_FRANKLIN,
  7438.             INPUT_VEH_STUNT_UD,
  7439.             INPUT_VEH_CINEMATIC_UD,
  7440.             INPUT_VEH_CINEMATIC_UP_ONLY,
  7441.             INPUT_VEH_CINEMATIC_DOWN_ONLY,
  7442.             INPUT_VEH_CINEMATIC_LR,
  7443.             INPUT_VEH_SELECT_NEXT_WEAPON,
  7444.             INPUT_VEH_SELECT_PREV_WEAPON,
  7445.             INPUT_VEH_ROOF,
  7446.             INPUT_VEH_JUMP,
  7447.             INPUT_VEH_GRAPPLING_HOOK,
  7448.             INPUT_VEH_SHUFFLE,
  7449.             INPUT_VEH_DROP_PROJECTILE,
  7450.             INPUT_VEH_MOUSE_CONTROL_OVERRIDE,
  7451.             INPUT_VEH_FLY_ROLL_LR,
  7452.             INPUT_VEH_FLY_ROLL_LEFT_ONLY,
  7453.             INPUT_VEH_FLY_ROLL_RIGHT_ONLY,
  7454.             INPUT_VEH_FLY_PITCH_UD,
  7455.             INPUT_VEH_FLY_PITCH_UP_ONLY,
  7456.             INPUT_VEH_FLY_PITCH_DOWN_ONLY,
  7457.             INPUT_VEH_FLY_UNDERCARRIAGE,
  7458.             INPUT_VEH_FLY_ATTACK,
  7459.             INPUT_VEH_FLY_SELECT_NEXT_WEAPON,
  7460.             INPUT_VEH_FLY_SELECT_PREV_WEAPON,
  7461.             INPUT_VEH_FLY_SELECT_TARGET_LEFT,
  7462.             INPUT_VEH_FLY_SELECT_TARGET_RIGHT,
  7463.             INPUT_VEH_FLY_VERTICAL_FLIGHT_MODE,
  7464.             INPUT_VEH_FLY_DUCK,
  7465.             INPUT_VEH_FLY_ATTACK_CAMERA,
  7466.             INPUT_VEH_FLY_MOUSE_CONTROL_OVERRIDE,
  7467.             INPUT_VEH_SUB_TURN_LR,
  7468.             INPUT_VEH_SUB_TURN_LEFT_ONLY,
  7469.             INPUT_VEH_SUB_TURN_RIGHT_ONLY,
  7470.             INPUT_VEH_SUB_PITCH_UD,
  7471.             INPUT_VEH_SUB_PITCH_UP_ONLY,
  7472.             INPUT_VEH_SUB_PITCH_DOWN_ONLY,
  7473.             INPUT_VEH_SUB_THROTTLE_UP,
  7474.             INPUT_VEH_SUB_THROTTLE_DOWN,
  7475.             INPUT_VEH_SUB_ASCEND,
  7476.             INPUT_VEH_SUB_DESCEND,
  7477.             INPUT_VEH_SUB_TURN_HARD_LEFT,
  7478.             INPUT_VEH_SUB_TURN_HARD_RIGHT,
  7479.             INPUT_VEH_SUB_MOUSE_CONTROL_OVERRIDE,
  7480.             INPUT_VEH_PUSHBIKE_PEDAL,
  7481.             INPUT_VEH_PUSHBIKE_SPRINT,
  7482.             INPUT_VEH_PUSHBIKE_FRONT_BRAKE,
  7483.             INPUT_VEH_PUSHBIKE_REAR_BRAKE,
  7484.             INPUT_MELEE_ATTACK_LIGHT,
  7485.             INPUT_MELEE_ATTACK_HEAVY,
  7486.             INPUT_MELEE_ATTACK_ALTERNATE,
  7487.             INPUT_MELEE_BLOCK,
  7488.             INPUT_PARACHUTE_DEPLOY,
  7489.             INPUT_PARACHUTE_DETACH,
  7490.             INPUT_PARACHUTE_TURN_LR,
  7491.             INPUT_PARACHUTE_TURN_LEFT_ONLY,
  7492.             INPUT_PARACHUTE_TURN_RIGHT_ONLY,
  7493.             INPUT_PARACHUTE_PITCH_UD,
  7494.             INPUT_PARACHUTE_PITCH_UP_ONLY,
  7495.             INPUT_PARACHUTE_PITCH_DOWN_ONLY,
  7496.             INPUT_PARACHUTE_BRAKE_LEFT,
  7497.             INPUT_PARACHUTE_BRAKE_RIGHT,
  7498.             INPUT_PARACHUTE_SMOKE,
  7499.             INPUT_PARACHUTE_PRECISION_LANDING,
  7500.             INPUT_MAP,
  7501.             INPUT_SELECT_WEAPON_UNARMED,
  7502.             INPUT_SELECT_WEAPON_MELEE,
  7503.             INPUT_SELECT_WEAPON_HANDGUN,
  7504.             INPUT_SELECT_WEAPON_SHOTGUN,
  7505.             INPUT_SELECT_WEAPON_SMG,
  7506.             INPUT_SELECT_WEAPON_AUTO_RIFLE,
  7507.             INPUT_SELECT_WEAPON_SNIPER,
  7508.             INPUT_SELECT_WEAPON_HEAVY,
  7509.             INPUT_SELECT_WEAPON_SPECIAL,
  7510.             INPUT_SELECT_CHARACTER_MICHAEL,
  7511.             INPUT_SELECT_CHARACTER_FRANKLIN,
  7512.             INPUT_SELECT_CHARACTER_TREVOR,
  7513.             INPUT_SELECT_CHARACTER_MULTIPLAYER,
  7514.             INPUT_SAVE_REPLAY_CLIP,
  7515.             INPUT_SPECIAL_ABILITY_PC,
  7516.             INPUT_CELLPHONE_UP,
  7517.             INPUT_CELLPHONE_DOWN,
  7518.             INPUT_CELLPHONE_LEFT,
  7519.             INPUT_CELLPHONE_RIGHT,
  7520.             INPUT_CELLPHONE_SELECT,
  7521.             INPUT_CELLPHONE_CANCEL,
  7522.             INPUT_CELLPHONE_OPTION,
  7523.             INPUT_CELLPHONE_EXTRA_OPTION,
  7524.             INPUT_CELLPHONE_SCROLL_FORWARD,
  7525.             INPUT_CELLPHONE_SCROLL_BACKWARD,
  7526.             INPUT_CELLPHONE_CAMERA_FOCUS_LOCK,
  7527.             INPUT_CELLPHONE_CAMERA_GRID,
  7528.             INPUT_CELLPHONE_CAMERA_SELFIE,
  7529.             INPUT_CELLPHONE_CAMERA_DOF,
  7530.             INPUT_CELLPHONE_CAMERA_EXPRESSION,
  7531.             INPUT_FRONTEND_DOWN,
  7532.             INPUT_FRONTEND_UP,
  7533.             INPUT_FRONTEND_LEFT,
  7534.             INPUT_FRONTEND_RIGHT,
  7535.             INPUT_FRONTEND_RDOWN,
  7536.             INPUT_FRONTEND_RUP,
  7537.             INPUT_FRONTEND_RLEFT,
  7538.             INPUT_FRONTEND_RRIGHT,
  7539.             INPUT_FRONTEND_AXIS_X,
  7540.             INPUT_FRONTEND_AXIS_Y,
  7541.             INPUT_FRONTEND_RIGHT_AXIS_X,
  7542.             INPUT_FRONTEND_RIGHT_AXIS_Y,
  7543.             INPUT_FRONTEND_PAUSE,
  7544.             INPUT_FRONTEND_PAUSE_ALTERNATE,
  7545.             INPUT_FRONTEND_ACCEPT,
  7546.             INPUT_FRONTEND_CANCEL,
  7547.             INPUT_FRONTEND_X,
  7548.             INPUT_FRONTEND_Y,
  7549.             INPUT_FRONTEND_LB,
  7550.             INPUT_FRONTEND_RB,
  7551.             INPUT_FRONTEND_LT,
  7552.             INPUT_FRONTEND_RT,
  7553.             INPUT_FRONTEND_LS,
  7554.             INPUT_FRONTEND_RS,
  7555.             INPUT_FRONTEND_LEADERBOARD,
  7556.             INPUT_FRONTEND_SOCIAL_CLUB,
  7557.             INPUT_FRONTEND_SOCIAL_CLUB_SECONDARY,
  7558.             INPUT_FRONTEND_DELETE,
  7559.             INPUT_FRONTEND_ENDSCREEN_ACCEPT,
  7560.             INPUT_FRONTEND_ENDSCREEN_EXPAND,
  7561.             INPUT_FRONTEND_SELECT,
  7562.             INPUT_SCRIPT_LEFT_AXIS_X,
  7563.             INPUT_SCRIPT_LEFT_AXIS_Y,
  7564.             INPUT_SCRIPT_RIGHT_AXIS_X,
  7565.             INPUT_SCRIPT_RIGHT_AXIS_Y,
  7566.             INPUT_SCRIPT_RUP,
  7567.             INPUT_SCRIPT_RDOWN,
  7568.             INPUT_SCRIPT_RLEFT,
  7569.             INPUT_SCRIPT_RRIGHT,
  7570.             INPUT_SCRIPT_LB,
  7571.             INPUT_SCRIPT_RB,
  7572.             INPUT_SCRIPT_LT,
  7573.             INPUT_SCRIPT_RT,
  7574.             INPUT_SCRIPT_LS,
  7575.             INPUT_SCRIPT_RS,
  7576.             INPUT_SCRIPT_PAD_UP,
  7577.             INPUT_SCRIPT_PAD_DOWN,
  7578.             INPUT_SCRIPT_PAD_LEFT,
  7579.             INPUT_SCRIPT_PAD_RIGHT,
  7580.             INPUT_SCRIPT_SELECT,
  7581.             INPUT_CURSOR_ACCEPT,
  7582.             INPUT_CURSOR_CANCEL,
  7583.             INPUT_CURSOR_X,
  7584.             INPUT_CURSOR_Y,
  7585.             INPUT_CURSOR_SCROLL_UP,
  7586.             INPUT_CURSOR_SCROLL_DOWN,
  7587.             INPUT_ENTER_CHEAT_CODE,
  7588.             INPUT_INTERACTION_MENU,
  7589.             INPUT_MP_TEXT_CHAT_ALL,
  7590.             INPUT_MP_TEXT_CHAT_TEAM,
  7591.             INPUT_MP_TEXT_CHAT_FRIENDS,
  7592.             INPUT_MP_TEXT_CHAT_CREW,
  7593.             INPUT_PUSH_TO_TALK,
  7594.             INPUT_CREATOR_LS,
  7595.             INPUT_CREATOR_RS,
  7596.             INPUT_CREATOR_LT,
  7597.             INPUT_CREATOR_RT,
  7598.             INPUT_CREATOR_MENU_TOGGLE,
  7599.             INPUT_CREATOR_ACCEPT,
  7600.             INPUT_CREATOR_DELETE,
  7601.             INPUT_ATTACK2,
  7602.             INPUT_RAPPEL_JUMP,
  7603.             INPUT_RAPPEL_LONG_JUMP,
  7604.             INPUT_RAPPEL_SMASH_WINDOW,
  7605.             INPUT_PREV_WEAPON,
  7606.             INPUT_NEXT_WEAPON,
  7607.             INPUT_MELEE_ATTACK1,
  7608.             INPUT_MELEE_ATTACK2,
  7609.             INPUT_WHISTLE,
  7610.             INPUT_MOVE_LEFT,
  7611.             INPUT_MOVE_RIGHT,
  7612.             INPUT_MOVE_UP,
  7613.             INPUT_MOVE_DOWN,
  7614.             INPUT_LOOK_LEFT,
  7615.             INPUT_LOOK_RIGHT,
  7616.             INPUT_LOOK_UP,
  7617.             INPUT_LOOK_DOWN,
  7618.             INPUT_SNIPER_ZOOM_IN,
  7619.             INPUT_SNIPER_ZOOM_OUT,
  7620.             INPUT_SNIPER_ZOOM_IN_ALTERNATE,
  7621.             INPUT_SNIPER_ZOOM_OUT_ALTERNATE,
  7622.             INPUT_VEH_MOVE_LEFT,
  7623.             INPUT_VEH_MOVE_RIGHT,
  7624.             INPUT_VEH_MOVE_UP,
  7625.             INPUT_VEH_MOVE_DOWN,
  7626.             INPUT_VEH_GUN_LEFT,
  7627.             INPUT_VEH_GUN_RIGHT,
  7628.             INPUT_VEH_GUN_UP,
  7629.             INPUT_VEH_GUN_DOWN,
  7630.             INPUT_VEH_LOOK_LEFT,
  7631.             INPUT_VEH_LOOK_RIGHT,
  7632.             INPUT_REPLAY_START_STOP_RECORDING,
  7633.             INPUT_REPLAY_START_STOP_RECORDING_SECONDARY,
  7634.             INPUT_SCALED_LOOK_LR,
  7635.             INPUT_SCALED_LOOK_UD,
  7636.             INPUT_SCALED_LOOK_UP_ONLY,
  7637.             INPUT_SCALED_LOOK_DOWN_ONLY,
  7638.             INPUT_SCALED_LOOK_LEFT_ONLY,
  7639.             INPUT_SCALED_LOOK_RIGHT_ONLY,
  7640.             INPUT_REPLAY_MARKER_DELETE,
  7641.             INPUT_REPLAY_CLIP_DELETE,
  7642.             INPUT_REPLAY_PAUSE,
  7643.             INPUT_REPLAY_REWIND,
  7644.             INPUT_REPLAY_FFWD,
  7645.             INPUT_REPLAY_NEWMARKER,
  7646.             INPUT_REPLAY_RECORD,
  7647.             INPUT_REPLAY_SCREENSHOT,
  7648.             INPUT_REPLAY_HIDEHUD,
  7649.             INPUT_REPLAY_STARTPOINT,
  7650.             INPUT_REPLAY_ENDPOINT,
  7651.             INPUT_REPLAY_ADVANCE,
  7652.             INPUT_REPLAY_BACK,
  7653.             INPUT_REPLAY_TOOLS,
  7654.             INPUT_REPLAY_RESTART,
  7655.             INPUT_REPLAY_SHOWHOTKEY,
  7656.             INPUT_REPLAY_CYCLEMARKERLEFT,
  7657.             INPUT_REPLAY_CYCLEMARKERRIGHT,
  7658.             INPUT_REPLAY_FOVINCREASE,
  7659.             INPUT_REPLAY_FOVDECREASE,
  7660.             INPUT_REPLAY_CAMERAUP,
  7661.             INPUT_REPLAY_CAMERADOWN,
  7662.             INPUT_REPLAY_SAVE,
  7663.             INPUT_REPLAY_TOGGLETIME,
  7664.             INPUT_REPLAY_TOGGLETIPS,
  7665.             INPUT_REPLAY_PREVIEW,
  7666.             INPUT_REPLAY_TOGGLE_TIMELINE,
  7667.             INPUT_REPLAY_TIMELINE_PICKUP_CLIP,
  7668.             INPUT_REPLAY_TIMELINE_DUPLICATE_CLIP,
  7669.             INPUT_REPLAY_TIMELINE_PLACE_CLIP,
  7670.             INPUT_REPLAY_CTRL,
  7671.             INPUT_REPLAY_TIMELINE_SAVE,
  7672.             INPUT_REPLAY_PREVIEW_AUDIO,
  7673.             INPUT_VEH_DRIVE_LOOK,
  7674.             INPUT_VEH_DRIVE_LOOK2,
  7675.             INPUT_VEH_FLY_ATTACK2,
  7676.             INPUT_RADIO_WHEEL_UD,
  7677.             INPUT_RADIO_WHEEL_LR,
  7678.             INPUT_VEH_SLOWMO_UD,
  7679.             INPUT_VEH_SLOWMO_UP_ONLY,
  7680.             INPUT_VEH_SLOWMO_DOWN_ONLY,
  7681.             INPUT_MAP_POI,
  7682.         }
  7683.     }
  7684. }
Add Comment
Please, Sign In to add comment