Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using GTA;
- using GTA.Math;
- using GTA.Native;
- using iFruitAddon2;
- using NativeUI;
- using NAudio.Wave;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Globalization;
- using System.IO;
- using System.Linq;
- using System.Xml.Linq;
- namespace GTAExpansion
- {
- public class GTAExpansion : Script
- {
- private ScriptSettings config = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini");
- private bool showHints = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("SETTINGS", "HINT_TOGGLE ", true);
- private int main_menu_btn_on_foot = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("SETTINGS", "MAIN_MENU_BTN_ON_FOOT", 36);
- private int main_menu_btn_in_vehicle = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("SETTINGS", "MAIN_MENU_BTN_IN_VEHICLE", 73);
- private int main_menu_btn = 36;
- private int GameTimeRef = 0;
- private bool loaded = false;
- private bool MaskIsOn = false;
- private bool followCamera = false;
- private Camera follow_camera = (Camera)null;
- private int followCameraTimer = 0;
- private int camTimer = 0;
- private bool buyBag = false;
- private bool buyHolster = false;
- private bool buySupplies = false;
- private int sellerAvailableItems = 0;
- private System.Random rnd = new System.Random();
- private int holster_toggle_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "TOGGLE_HOLSTER_BTN", 37);
- private int intimidate_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "INTIMIDATE_BTN", 24);
- private bool useHipHolster = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("HOLSTER_SETTINGS", "USE_HIP_HOLSTER", false);
- private bool drawHolsterIcon = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("HOLSTER_SETTINGS", "ICON_DRAW", false);
- private int holsterIconX = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "X", 195);
- private int holsterIconY = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "Y", 620);
- private int holsterIconW = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "Width", 82);
- private int holsterIconH = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("HOLSTER_SETTINGS", "Height", 85);
- private bool customHolsterAnim = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("HOLSTER_SETTINGS", "CUSTOM_HOLSTER_ANIMATION", false);
- private bool holsterSet = false;
- private bool check = false;
- private bool goodToGo = false;
- private Model choosenPistol = (Model)Function.Call<int>(Hash._0x0A6DB4965674D243, (InputArgument)Game.Player.Character);
- private Model prevPistol = (Model)Function.Call<int>(Hash._0x0A6DB4965674D243, (InputArgument)Game.Player.Character);
- private bool weaponPistol = false;
- private int holsterTimerCounterLong = 0;
- private int holsterTimerCounterShort = 0;
- private bool intimidation = false;
- private bool hasHolster = false;
- private int mask_toggle_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("OUTFIT_COMPONENTS_SETTINGS", "MASK_TOGGLE_BTN", 249);
- private int gloves_toggle_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("OUTFIT_COMPONENTS_SETTINGS", "GLOVES_TOGGLE_BTN", 249);
- private int glasses_toggle_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("OUTFIT_COMPONENTS_SETTINGS", "GLASSES_TOGGLE_BTN", 249);
- private bool mask0 = false;
- private bool mask1 = false;
- private bool mask2 = false;
- private bool mask3 = false;
- private bool mask4 = false;
- private bool gloves0 = false;
- private bool gloves1 = false;
- private bool gloves2 = false;
- private bool gloves3 = false;
- private bool gloves4 = false;
- private bool glasses0 = false;
- private bool glasses1 = false;
- private bool glasses2 = false;
- private bool glasses3 = false;
- private bool glasses4 = false;
- private int maskTimeCounter = 0;
- private int earphone_toggle_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("EAR_RADIO_SETTINGS", "EARPHONE_TOGGLE_KEY", 249);
- private int readio_off_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("EAR_RADIO_SETTINGS", "TURN_OFF_RADIO", 174);
- private int prevStation = (int)byte.MaxValue;
- private int earRadioTimer = 0;
- private int wallet_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("WALLET_SETTINGS", "WALLET_CHECK_BTN", 157);
- private bool inProcessWallet = false;
- private bool walletCount = false;
- private float animSpeed = 0.0f;
- private int bag_menu_btn = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("DUFFLEBAG_SETTINGS", "BAG_MENU_BTN", 45);
- private bool drawStrap = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("DUFFLEBAG_SETTINGS", "DRAW_STRAP", true);
- private float xd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_default", 0.21f);
- private float yd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_default", -0.3f);
- private float zd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_default", -0.2f);
- private float xrd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_rot_default", 45.8999f);
- private float yrd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_rot_default", 84.6992f);
- private float zrd = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_rot_default", 114.1992f);
- private float xsdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_sky_diving_gear", -0.45f);
- private float ysdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_sky_diving_gear", -0.05f);
- private float zsdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_sky_diving_gear", -0.45f);
- private float xrsdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_rot_sky_diving_gear", 0.0f);
- private float yrsdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_rot_sky_diving_gear", 40f);
- private float zrsdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_rot_sky_diving_gear", -45f);
- private float xdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_diving_gear", -0.1f);
- private float ydg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_diving_gear", -0.35f);
- private float zdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_diving_gear", -0.07f);
- private float xrdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "x_rot_diving_gear", 25f);
- private float yrdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "y_rot_diving_gear", 25f);
- private float zrdg = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<float>("DUFFLEBAG_SETTINGS", "z_rot_diving_gear", 0.0f);
- private string bagModel = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<string>("DUFFLEBAG_SETTINGS", "BAG", "p_ld_heist_bag_s_pro_o");
- private string bagModelFull = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<string>("DUFFLEBAG_SETTINGS", "BAG_FULL", "p_ld_heist_bag_s_pro");
- private string stashedBagModel = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<string>("DUFFLEBAG_SETTINGS", "BAG_STASHED", "p_ld_heist_bag_s_pro2_s");
- private XDocument doc = XDocument.Load("scripts\\Expansion\\WeaponStash.xml");
- private PedHash[] allPedHashes = (PedHash[])Enum.GetValues(typeof(PedHash));
- private WeaponHash[] allWeaponHashes = (WeaponHash[])Enum.GetValues(typeof(WeaponHash));
- private WeaponComponent[] allComponentsHashes = (WeaponComponent[])Enum.GetValues(typeof(WeaponComponent));
- private WeaponTint[] allTintHashes = (WeaponTint[])Enum.GetValues(typeof(WeaponTint));
- private bool skyDiving = false;
- private bool wearingGear = false;
- private bool changedPosition = false;
- private bool bagPickUp = false;
- private bool notifed = false;
- private bool canTakeBagFromVehicle = false;
- private bool canPutOnBagOnExit = false;
- private BlipSprite sellerBlip = BlipSprite.Information;
- private int TotalPrice = 0;
- private int BagPrice = 100;
- private int HolsterPrice = 50;
- private int SupplyPrice = 25;
- private bool greeting = false;
- private bool greetingFinished = false;
- private bool deal = false;
- private bool payed = false;
- private int timeOut = 0;
- private bool inProcessBag = false;
- private bool canceled = false;
- private bool findSellerOption = false;
- private int DufflebagTimeCounter = 0;
- private int sellerDialogCounter = 6;
- private Prop cur_bag = (Prop)null;
- private bool hasBag = false;
- private bool isBagBought = false;
- private bool isBagDropped = false;
- private bool extraEffects = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("CIGS_AND_PILLS_SETTINGS", "EXTRA_EFFECTS", false);
- private bool screenFX = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("CIGS_AND_PILLS_SETTINGS", "SCREEN_EFFECT", true);
- private bool hintShow = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<bool>("CIGS_AND_PILLS_SETTINGS", "SHOW_HINTS", true);
- private int swallowBTN = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "PILLS_SWALLOW_BTN", 51);
- private int maxPills = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "MAX_PILLS", 25);
- private int extraFXDuration = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "EFFECTS_DURATION", 1000);
- private bool cigsAndPillsCountDown = false;
- private int cigsAndPillsCounter = 15;
- private int pillsCount = 10;
- private bool blockKeys = false;
- private int cigsCount = 10;
- private int smokeBTN = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "SMOKE_TOGGLE_BTN", 44);
- private int maxCigs = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "MAX_CIGS", 25);
- private int max_cig_durability = ScriptSettings.Load("scripts\\Expansion\\Expansion.ini").GetValue<int>("CIGS_AND_PILLS_SETTINGS", "MAX_CIG_DURABILITY", 25);
- private int cig_durability = 0;
- private string smokeType = "prop_amb_ciggy_01";
- private bool playCigAndSmokeAnim = true;
- private bool flame = false;
- private int smoke = -1;
- private bool smoking = false;
- private bool startSmoke = true;
- private bool play_swallow_pills_anim = false;
- private string medbagObject = "prop_ld_health_pack";
- private bool canRefill = false;
- private bool inProcessCigsAndPills = false;
- private bool extraEffectsStat = false;
- private int extraEffectsTimer = 0;
- private float slowMoScale = 0.0f;
- private Prop pillsJar = (Prop)null;
- private bool inMenu = false;
- private List<WeaponHash> stashedWeapons = new List<WeaponHash>();
- private List<WeaponHash> characterWeapons = new List<WeaponHash>();
- private List<object> mainMenuListString = new List<object>();
- private Color btnColor1 = Color.Transparent;
- private Color btnColor2 = Color.GhostWhite;
- private Color btnTextColor1 = Color.White;
- private Color btnTextColor2 = Color.Black;
- private Entity CamObject;
- private WaveFileReader WavereaderDown;
- private WaveChannel32 wavechanDown;
- private DirectSoundOut DSODown;
- private float volumeDown;
- private Prop holster;
- private Ped player;
- private Ped prevPlayer;
- private Prop HolstedPistolPrev;
- private Prop HolstedPistol;
- private int worldPistolModel;
- private Prop[] holsterProp;
- private Ped[] closestPeds;
- private Ped target;
- private bool headset;
- private Prop wallet;
- private Prop walletOpened;
- private uint prevWeapon;
- private Ped seller;
- private Prop cig;
- private Prop medbag;
- private CustomiFruit _iFruit;
- private iFruitContact callContact;
- private MenuPool modMenuPool;
- private UIMenu mainMenu;
- private void update_inventory_status(Ped ped)
- {
- this.cur_bag = this.bagModelReturn(ped);
- this.hasBag = this.doesPedWearingBag(ped);
- this.hasHolster = this.doesPedHasHolster(ped);
- this.isBagBought = this.doesPedHasInventoryBag(ped);
- this.isBagDropped = this.DoesDroppedBagExist(ped);
- }
- private bool isOccupied(Ped ped)
- {
- int num;
- if (!Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) && ped.IsVisible)
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_fall", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_idle", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_a", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_b", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_c", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_d", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@exit", (InputArgument)"exit", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
- {
- if (!Function.Call<bool>(Hash._0x3998B1276A3300E5, (InputArgument)Game.Player.Character) && !Game.Player.Character.IsGoingIntoCover && !Game.Player.Character.IsInCover())
- {
- 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))
- {
- if (!Function.Call<bool>(Hash._0xE3B6097CC25AA69E, (InputArgument)ped))
- {
- num = !Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player) ? 1 : 0;
- goto label_22;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- num = 0;
- label_22:
- return num == 0;
- }
- private void followCameraCreateFunc(Ped ped, Entity follow_object)
- {
- ++this.camTimer;
- if (this.camTimer >= 150)
- {
- this.camTimer = 0;
- this.followCamera = false;
- }
- if (!Game.Player.Character.IsSittingInVehicle())
- {
- if (Function.Call<int>(Hash._0x8D4D46230B2C353A, Array.Empty<InputArgument>()) != 4)
- {
- if (this.follow_camera == (Camera)null)
- {
- this.follow_camera = World.CreateCamera(GameplayCamera.Position, Vector3.Zero, GameplayCamera.FieldOfView);
- World.RenderingCamera = this.follow_camera;
- if (!(follow_object != (Entity)null) || !follow_object.Exists())
- return;
- this.follow_camera.PointAt(follow_object);
- }
- else
- {
- if (World.RenderingCamera != this.follow_camera)
- World.RenderingCamera = this.follow_camera;
- if (follow_object != (Entity)null && follow_object.Exists())
- this.follow_camera.PointAt(follow_object);
- this.follow_camera.Position = GameplayCamera.Position;
- this.follow_camera.Rotation = GameplayCamera.Rotation;
- if (this.followCameraTimer < 300 && this.followCameraTimer < 100)
- {
- ++this.followCameraTimer;
- if ((double)this.follow_camera.FieldOfView > (double)GameplayCamera.FieldOfView - 3.0)
- this.follow_camera.FieldOfView -= 0.1f;
- }
- }
- }
- else if (this.follow_camera != (Camera)null && this.follow_camera.Exists())
- {
- if (World.RenderingCamera == this.follow_camera)
- World.RenderingCamera = (Camera)null;
- this.follow_camera.Destroy();
- this.follow_camera = (Camera)null;
- }
- }
- else if (this.follow_camera == (Camera)null)
- {
- this.follow_camera = World.CreateCamera(GameplayCamera.Position, Vector3.Zero, GameplayCamera.FieldOfView);
- World.RenderingCamera = this.follow_camera;
- if (follow_object != (Entity)null && follow_object.Exists())
- this.follow_camera.PointAt(follow_object);
- }
- else
- {
- if (World.RenderingCamera != this.follow_camera)
- World.RenderingCamera = this.follow_camera;
- if (follow_object != (Entity)null && follow_object.Exists())
- this.follow_camera.PointAt(follow_object);
- this.follow_camera.Position = GameplayCamera.Position;
- this.follow_camera.Rotation = GameplayCamera.Rotation;
- if (this.followCameraTimer < 300 && this.followCameraTimer < 100)
- {
- ++this.followCameraTimer;
- if ((double)this.follow_camera.FieldOfView > (double)GameplayCamera.FieldOfView - 3.0)
- this.follow_camera.FieldOfView -= 0.1f;
- }
- }
- }
- private void followCameraDeleteFunc(Ped ped, Entity follow_obje)
- {
- if (!(this.follow_camera != (Camera)null) || !this.follow_camera.Exists())
- return;
- this.follow_camera.Position = GameplayCamera.Position;
- this.follow_camera.Rotation = GameplayCamera.Rotation;
- if (this.followCameraTimer > 0)
- {
- --this.followCameraTimer;
- if ((double)this.follow_camera.FieldOfView != (double)GameplayCamera.FieldOfView)
- {
- if ((double)this.follow_camera.FieldOfView > (double)GameplayCamera.FieldOfView)
- this.follow_camera.FieldOfView -= 0.1f;
- else
- this.follow_camera.FieldOfView += 0.1f;
- }
- else
- {
- if (World.RenderingCamera == this.follow_camera)
- World.RenderingCamera = (Camera)null;
- this.follow_camera.Destroy();
- this.follow_camera = (Camera)null;
- }
- }
- else
- {
- if (World.RenderingCamera == this.follow_camera)
- World.RenderingCamera = (Camera)null;
- this.follow_camera.Destroy();
- this.follow_camera = (Camera)null;
- }
- }
- private void checkMask(Ped ped)
- {
- if (ped.Model.Hash == this.GetHashKey("PLAYER_ZERO"))
- {
- int num;
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 7)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 9)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 14)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 21)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 23)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9) != 8)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 2)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 14)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 15)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 16)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 17)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 18)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 19)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 20)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 23)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 25)
- {
- num = this.mask0 ? 1 : 0;
- goto label_19;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- num = 1;
- label_19:
- if (num != 0)
- {
- this.MaskIsOn = true;
- if (this.smoke != -1 && (uint)this.smoke > 0U)
- this.stopSmokingFunc(ped);
- }
- else
- this.MaskIsOn = false;
- }
- Model model = ped.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ONE"))
- {
- int num;
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 4)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 5)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 8)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 9)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 18)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9) != 4)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)2) != 5)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 1)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 6)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 8)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 9)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 10)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 13)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 14)
- {
- num = this.mask1 ? 1 : 0;
- goto label_41;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- num = 1;
- label_41:
- if (num != 0)
- {
- this.MaskIsOn = true;
- if (this.smoke != -1 && (uint)this.smoke > 0U)
- this.stopSmokingFunc(ped);
- }
- else
- this.MaskIsOn = false;
- }
- model = ped.Model;
- if (model.Hash != this.GetHashKey("PLAYER_TWO"))
- return;
- int num1;
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 1)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 6)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 10)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 13)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8) != 15)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9) != 5)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9) != 6)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9) != 7)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 2)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 14)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 15)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 16)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 17)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 18)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 19)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 20)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 23)
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0) != 25)
- {
- num1 = this.mask2 ? 1 : 0;
- goto label_67;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- num1 = 1;
- label_67:
- if (num1 != 0)
- {
- this.MaskIsOn = true;
- if (this.smoke != -1 && (uint)this.smoke > 0U)
- this.stopSmokingFunc(ped);
- }
- else
- this.MaskIsOn = false;
- }
- private void AnimPlayFunc(
- Ped ped,
- float actionPoint,
- float stopPoint,
- string animDict,
- string animName,
- float animSpeed,
- int animFlags,
- Action Action)
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName, (InputArgument)3))
- {
- if (animFlags == 1)
- ped.Task.PlayAnimation(animDict, animName, animSpeed, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- if (animFlags == 2)
- ped.Task.PlayAnimation(animDict, animName, animSpeed, -1, AnimationFlags.StayInEndFrame | AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- if (animFlags == 3)
- ped.Task.PlayAnimation(animDict, animName, animSpeed, -1, AnimationFlags.AllowRotation);
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) != (double)actionPoint)
- return;
- Action();
- }
- else if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) > (double)stopPoint)
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)animName, (InputArgument)animDict, (InputArgument)3f);
- }
- private void DisableControlsFunc(bool block_movements)
- {
- Game.DisableControlThisFrame(2, Control.NextCamera);
- if (block_movements)
- {
- Game.DisableControlThisFrame(2, Control.MoveLeft);
- Game.DisableControlThisFrame(2, Control.MoveLeftOnly);
- Game.DisableControlThisFrame(2, Control.MoveRight);
- Game.DisableControlThisFrame(2, Control.MoveRightOnly);
- Game.DisableControlThisFrame(2, Control.MoveUp);
- Game.DisableControlThisFrame(2, Control.MoveUpOnly);
- Game.DisableControlThisFrame(2, Control.MoveDown);
- Game.DisableControlThisFrame(2, Control.MoveDownOnly);
- Game.DisableControlThisFrame(2, Control.ScriptPadLeft);
- Game.DisableControlThisFrame(2, Control.ScriptPadRight);
- Game.DisableControlThisFrame(2, Control.ScriptPadUp);
- Game.DisableControlThisFrame(2, Control.ScriptPadDown);
- Game.DisableControlThisFrame(2, Control.VehicleMoveLeft);
- Game.DisableControlThisFrame(2, Control.VehicleMoveRight);
- Game.DisableControlThisFrame(2, Control.VehicleMoveLeft);
- Game.DisableControlThisFrame(2, Control.VehicleMoveRightOnly);
- Game.DisableControlThisFrame(2, Control.VehicleMoveLeftOnly);
- Game.DisableControlThisFrame(2, Control.VehicleMoveLeftRight);
- }
- Game.DisableControlThisFrame(2, Control.VehicleCinCam);
- Game.DisableControlThisFrame(2, Control.VehicleNextRadio);
- Game.DisableControlThisFrame(2, Control.VehiclePrevRadio);
- Game.DisableControlThisFrame(2, Control.VehicleHeadlight);
- Game.DisableControlThisFrame(2, Control.VehicleHorn);
- Game.DisableControlThisFrame(2, Control.VehicleHandbrake);
- Game.DisableControlThisFrame(2, Control.VehicleExit);
- Game.DisableControlThisFrame(2, Control.SelectWeapon);
- Game.DisableControlThisFrame(2, Control.Phone);
- Game.DisableControlThisFrame(2, Control.PhoneCameraDOF);
- Game.DisableControlThisFrame(2, Control.PhoneCameraExpression);
- Game.DisableControlThisFrame(2, Control.PhoneCameraFocusLock);
- Game.DisableControlThisFrame(2, Control.PhoneCameraGrid);
- Game.DisableControlThisFrame(2, Control.PhoneCameraSelfie);
- Game.DisableControlThisFrame(2, Control.PhoneCancel);
- Game.DisableControlThisFrame(2, Control.PhoneDown);
- Game.DisableControlThisFrame(2, Control.PhoneLeft);
- Game.DisableControlThisFrame(2, Control.PhoneRight);
- Game.DisableControlThisFrame(2, Control.PhoneUp);
- Game.DisableControlThisFrame(2, Control.PhoneOption);
- Game.DisableControlThisFrame(2, Control.PhoneExtraOption);
- Game.DisableControlThisFrame(2, Control.PhoneSelect);
- Game.DisableControlThisFrame(2, Control.Aim);
- Game.DisableControlThisFrame(2, Control.Attack);
- Game.DisableControlThisFrame(2, Control.Attack2);
- Game.DisableControlThisFrame(2, Control.Sprint);
- Game.DisableControlThisFrame(2, Control.Reload);
- Game.DisableControlThisFrame(2, Control.Phone);
- Game.DisableControlThisFrame(2, Control.Jump);
- Game.DisableControlThisFrame(2, Control.VehicleCarJump);
- Game.DisableControlThisFrame(2, Control.RappelJump);
- Game.DisableControlThisFrame(2, Control.RappelLongJump);
- Game.DisableControlThisFrame(2, Control.VehicleJump);
- Game.DisableControlThisFrame(2, Control.Cover);
- Game.DisableControlThisFrame(2, Control.MeleeAttack1);
- Game.DisableControlThisFrame(2, Control.MeleeAttack2);
- Game.DisableControlThisFrame(2, Control.MeleeAttackAlternate);
- Game.DisableControlThisFrame(2, Control.MeleeAttackHeavy);
- Game.DisableControlThisFrame(2, Control.MeleeAttackLight);
- Game.DisableControlThisFrame(2, Control.Context);
- Game.DisableControlThisFrame(2, Control.ContextSecondary);
- Game.DisableControlThisFrame(2, Control.AccurateAim);
- Game.DisableControlThisFrame(2, Control.Duck);
- Game.DisableControlThisFrame(2, Control.Enter);
- Game.DisableControlThisFrame(2, Control.VehicleAccelerate);
- }
- private void Notify(string text, string subject, int r, int g, int b, string icon)
- {
- Function.Call(Hash._0x202709F4C58A0424, (InputArgument)"STRING");
- Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)"");
- Function.Call(Hash._0x17430B918701C342, (InputArgument)r, (InputArgument)g, (InputArgument)b, (InputArgument)200);
- Function.Call(Hash._0x531B84E7DA981FB6, (InputArgument)icon, (InputArgument)icon, (InputArgument)true, (InputArgument)7, (InputArgument)text, (InputArgument)subject, (InputArgument)1f, (InputArgument)"", (InputArgument)4);
- Function.Call(Hash._0x2ED7843F8F801023, (InputArgument)true, (InputArgument)true);
- Function.Call(Hash._0x67C540AA08E4A6F5, (InputArgument)(-1), (InputArgument)"OTHER_TEXT", (InputArgument)"HUD_AWARDS");
- }
- public void Draw(
- int mode,
- bool hasBag,
- bool bagInCar,
- bool hasHolster,
- bool isBagBought,
- bool bagIsDropped)
- {
- Scaleform scaleform = new Scaleform("instructional_buttons");
- scaleform.CallFunction("CLEAR_ALL");
- scaleform.CallFunction("TOGGLE_MOUSE_BUTTONS", (object)0);
- scaleform.CallFunction("CREATE_CONTAINER");
- if (mode == 1)
- scaleform.CallFunction("SET_DATA_SLOT", (object)1, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)51), (object)"Grab bag");
- if (mode == 2)
- {
- scaleform.CallFunction("SET_DATA_SLOT", (object)1, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)176), (object)"Find closest Dealer");
- if (this.isBagDropped)
- scaleform.CallFunction("SET_DATA_SLOT", (object)3, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)0), (object)"Mark Stashed Bag");
- scaleform.CallFunction("SET_DATA_SLOT", (object)2, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)177), (object)"Cancel");
- }
- if (mode == 3)
- {
- if (!isBagBought)
- {
- if (!this.buyBag)
- scaleform.CallFunction("SET_DATA_SLOT", (object)4, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)52), (object)("Check bag (" + this.BagPrice.ToString() + " $)"));
- else
- scaleform.CallFunction("SET_DATA_SLOT", (object)4, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)52), (object)"Uncheck bag");
- }
- if (!hasHolster)
- {
- if (!this.buyHolster)
- scaleform.CallFunction("SET_DATA_SLOT", (object)5, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)73), (object)("Check holster (" + this.HolsterPrice.ToString() + " $)"));
- else
- scaleform.CallFunction("SET_DATA_SLOT", (object)5, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)73), (object)"Uncheck holster");
- }
- if (this.cigsCount < this.maxCigs || this.pillsCount < this.maxPills)
- {
- if (!this.buySupplies)
- scaleform.CallFunction("SET_DATA_SLOT", (object)2, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)0), (object)("Check supplies (" + this.SupplyPrice.ToString() + " $)"));
- else
- scaleform.CallFunction("SET_DATA_SLOT", (object)2, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)0), (object)"Uncheck supplies");
- }
- if (this.buyBag || this.buyHolster || this.buySupplies)
- scaleform.CallFunction("SET_DATA_SLOT", (object)3, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)51), (object)"Confirm");
- scaleform.CallFunction("SET_DATA_SLOT", (object)1, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)75), (object)"Cancel");
- }
- if (mode == 4)
- {
- if (!this.intimidation)
- {
- 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)"));
- 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)"));
- if (!Game.Player.Character.IsSittingInVehicle())
- scaleform.CallFunction("SET_DATA_SLOT", (object)3, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)1, (InputArgument)this.wallet_btn), (object)"Wallet");
- scaleform.CallFunction("SET_DATA_SLOT", (object)4, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.earphone_toggle_btn), (object)"Earphone");
- if (this.headset)
- scaleform.CallFunction("SET_DATA_SLOT", (object)5, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)1, (InputArgument)this.readio_off_btn), (object)"Toggle Radio");
- scaleform.CallFunction("SET_DATA_SLOT", (object)6, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.mask_toggle_btn), (object)"Mask");
- scaleform.CallFunction("SET_DATA_SLOT", (object)7, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.gloves_toggle_btn), (object)"Gloves");
- scaleform.CallFunction("SET_DATA_SLOT", (object)8, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.glasses_toggle_btn), (object)"Glasses");
- if (hasHolster)
- {
- scaleform.CallFunction("SET_DATA_SLOT", (object)9, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.holster_toggle_btn), (object)"Holster");
- if ((Entity)this.holster != (Entity)null && this.holster.Exists() && !this.intimidation)
- scaleform.CallFunction("SET_DATA_SLOT", (object)10, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)1, (InputArgument)this.intimidate_btn), (object)"Start Intimidate");
- }
- if (hasBag)
- scaleform.CallFunction("SET_DATA_SLOT", (object)11, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.bag_menu_btn), (object)"Bag menu");
- else if (bagInCar)
- scaleform.CallFunction("SET_DATA_SLOT", (object)11, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)this.bag_menu_btn), (object)"Grab bag");
- }
- else
- {
- scaleform.CallFunction("SET_DATA_SLOT", (object)1, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)24), (object)"Start Intimidate");
- scaleform.CallFunction("SET_DATA_SLOT", (object)2, (object)Function.Call<string>(Hash._0x0499D7B09FC9B407, (InputArgument)2, (InputArgument)25), (object)"Stop Intimidate");
- }
- }
- scaleform.CallFunction("DRAW_INSTRUCTIONAL_BUTTONS", (object)-1);
- scaleform.Render2D();
- }
- private void iconDrawFunc(int x, int y, int width, int height, string icon_name)
- {
- if (File.Exists("scripts\\Expansion\\" + icon_name))
- UI.DrawTexture(".\\Scripts\\Expansion\\" + icon_name, 0, 1, 1500, new Point(x, y), new Size(width, height));
- else
- UI.ShowSubtitle(icon_name + " was not found");
- }
- private int GetHashKey(string value)
- {
- return Function.Call<int>(Hash._0xD24D37CC275948CC, (InputArgument)value);
- }
- private void soundFX(Ped ped, string sound_fx)
- {
- if (File.Exists("scripts\\Expansion\\" + sound_fx))
- {
- this.WavereaderDown = new WaveFileReader("scripts\\Expansion\\" + sound_fx);
- this.wavechanDown = new WaveChannel32((WaveStream)this.WavereaderDown);
- this.volumeDown = this.config.GetValue<float>("Settings", "Global Volume Down", 30f);
- this.DSODown = new DirectSoundOut();
- if (ped.IsSittingInVehicle())
- {
- if (Function.Call<int>(Hash._0xA4FF579AC0E3AAAE, Array.Empty<InputArgument>()) == 4)
- {
- this.DSODown.Init((IWaveProvider)this.wavechanDown);
- this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 10.0);
- }
- if (Function.Call<int>(Hash._0xA4FF579AC0E3AAAE, Array.Empty<InputArgument>()) != 4)
- {
- if (ped.CurrentVehicle.Model.IsCar)
- {
- float num1 = Function.Call<float>(Hash._0xFE3F9C29F7B32BD5, (InputArgument)ped.CurrentVehicle.Handle, (InputArgument)0);
- float num2 = Function.Call<float>(Hash._0xFE3F9C29F7B32BD5, (InputArgument)ped.CurrentVehicle.Handle, (InputArgument)1);
- float num3 = Function.Call<float>(Hash._0xFE3F9C29F7B32BD5, (InputArgument)ped.CurrentVehicle.Handle, (InputArgument)2);
- float num4 = Function.Call<float>(Hash._0xFE3F9C29F7B32BD5, (InputArgument)ped.CurrentVehicle.Handle, (InputArgument)3);
- this.DSODown.Init((IWaveProvider)this.wavechanDown);
- this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 10.0);
- int num5;
- if (Function.Call<bool>(Hash._0x8AC862B0B32C5B80, (InputArgument)ped.CurrentVehicle))
- {
- if (Function.Call<bool>(Hash._0x46E571A0E20D01F1, (InputArgument)ped.CurrentVehicle, (InputArgument)0))
- {
- if (Function.Call<bool>(Hash._0x46E571A0E20D01F1, (InputArgument)ped.CurrentVehicle, (InputArgument)1) && (double)num1 <= 0.3 && ((double)num2 <= 0.3 && (double)num3 <= 0.3))
- {
- num5 = (double)num4 > 0.3 ? 1 : 0;
- goto label_11;
- }
- }
- }
- num5 = 1;
- label_11:
- if (num5 != 0)
- {
- this.DSODown.Init((IWaveProvider)this.wavechanDown);
- this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 15.0);
- }
- int num6;
- if (Function.Call<bool>(Hash._0x8AC862B0B32C5B80, (InputArgument)ped.CurrentVehicle))
- {
- if (Function.Call<bool>(Hash._0x46E571A0E20D01F1, (InputArgument)ped.CurrentVehicle, (InputArgument)0))
- {
- if (Function.Call<bool>(Hash._0x46E571A0E20D01F1, (InputArgument)ped.CurrentVehicle, (InputArgument)1) && (double)num1 < 0.1 && ((double)num2 < 0.1 && (double)num3 < 0.1))
- {
- num6 = (double)num4 < 0.1 ? 1 : 0;
- goto label_18;
- }
- }
- }
- num6 = 0;
- label_18:
- if (num6 != 0)
- {
- this.DSODown.Init((IWaveProvider)this.wavechanDown);
- this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 20.0);
- }
- }
- else
- {
- this.DSODown.Init((IWaveProvider)this.wavechanDown);
- this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 15.0);
- }
- }
- }
- else
- {
- this.DSODown.Init((IWaveProvider)this.wavechanDown);
- this.wavechanDown.Volume = (float)((double)this.volumeDown / 100.0 / 10.0);
- }
- this.DSODown.Play();
- this.DSODown.Dispose();
- }
- else
- UI.Notify("scripts/Expansion/ " + sound_fx + " ~r~Wasnt found", true);
- }
- private void checkHolsterAfterCharacterSwitch(Ped ped)
- {
- Prop[] allProps = World.GetAllProps((Model)(this.useHipHolster ? "prop_holster_01" : "prop_pistol_holster"));
- for (int index = 0; index < allProps.Length; ++index)
- {
- if ((Entity)allProps[index] != (Entity)null && allProps[index].Exists())
- {
- if (!allProps[index].IsAttached())
- {
- this.holster = allProps[index];
- this.AttachHolster(ped);
- this.holsterSet = true;
- break;
- }
- if (allProps[index].IsAttachedTo((Entity)ped))
- {
- this.holster = allProps[index];
- this.holsterSet = true;
- break;
- }
- }
- else
- {
- Script.Wait(2000);
- if ((Entity)allProps[index] != (Entity)null && !allProps[index].Exists())
- {
- this.holster = (Prop)null;
- this.holsterSet = false;
- break;
- }
- if ((Entity)allProps[index] == (Entity)null)
- {
- this.holster = (Prop)null;
- this.holsterSet = false;
- break;
- }
- }
- }
- }
- private void checkPistolAfterScriptReload(Ped ped, string model)
- {
- 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())
- return;
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped))
- prop.Delete();
- }
- private void checkPistolFunc(Ped ped, WeaponHash gun, string model)
- {
- if (!Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped, (InputArgument)((uint)gun), (InputArgument)false))
- return;
- this.choosenPistol = (Model)gun;
- this.worldPistolModel = this.GetHashKey(model);
- Function.Call(Hash._0x963D27A58DF860AC, (InputArgument)this.worldPistolModel);
- this.HolstedPistol = World.CreateProp((Model)this.worldPistolModel, Game.Player.Character.Position, true, false);
- this.AttachPistol(Game.Player.Character);
- }
- private void removeHolstedPistolFunc(
- Ped ped,
- Prop holsted_pistol,
- WeaponHash gun,
- string world_pistol_model)
- {
- 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()))
- return;
- this.worldPistolModel = 0;
- this.choosenPistol = (Model)((string)null);
- this.HolstedPistol.Delete();
- this.HolstedPistol = (Prop)null;
- }
- private void AttackSpeech(Ped ped)
- {
- if (ped.Model.Hash == this.GetHashKey("PLAYER_TWO"))
- Function.Call(Hash._0x3523634255FC3318, (InputArgument)ped, (InputArgument)"FIGHT", (InputArgument)"TREVOR_ANGRY", (InputArgument)"SPEECH_PARAMS_FORCE", (InputArgument)0);
- Model model = ped.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ONE"))
- Function.Call(Hash._0x3523634255FC3318, (InputArgument)ped, (InputArgument)"FIGHT", (InputArgument)"FRANKLIN_ANGRY", (InputArgument)"SPEECH_PARAMS_FORCE", (InputArgument)0);
- model = ped.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
- Function.Call(Hash._0x3523634255FC3318, (InputArgument)ped, (InputArgument)"FIGHT", (InputArgument)"MICHAEL_ANGRY", (InputArgument)"SPEECH_PARAMS_FORCE", (InputArgument)0);
- model = ped.Model;
- int num;
- if (model.Hash != this.GetHashKey("PLAYER_ZERO"))
- {
- model = ped.Model;
- if (model.Hash != this.GetHashKey("PLAYER_ONE"))
- {
- model = ped.Model;
- num = model.Hash != this.GetHashKey("PLAYER_TWO") ? 1 : 0;
- goto label_10;
- }
- }
- num = 0;
- label_10:
- if (num == 0)
- return;
- if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)ped))
- Function.Call(Hash._0x3523634255FC3318, (InputArgument)ped, (InputArgument)"BLIND_RANGE", (InputArgument)"PACKIE", (InputArgument)"SPEECH_PARAMS_FORCE", (InputArgument)0);
- else
- Function.Call(Hash._0x3523634255FC3318, (InputArgument)ped, (InputArgument)"BLIND_RANGE", (InputArgument)"TALINA", (InputArgument)"SPEECH_PARAMS_FORCE", (InputArgument)0);
- }
- private void GetHolsterPropFunction(Ped ped)
- {
- ped.GetOffsetInWorldCoords(new Vector3(0.0f, 0.0f, 0.0f));
- this.holsterProp = !this.useHipHolster ? World.GetAllProps((Model)"prop_holster_01") : World.GetAllProps((Model)"prop_pistol_holster");
- for (int index = 0; index < this.holsterProp.Length; ++index)
- {
- if (this.holsterProp[index].Exists() && (Entity)this.holsterProp[index] != (Entity)null)
- {
- this.holsterProp[index].Delete();
- this.holsterProp[index] = (Prop)null;
- break;
- }
- }
- }
- private void GetClosestPedDetectionFunction(Ped ped)
- {
- ped.GetOffsetInWorldCoords(new Vector3(0.0f, 0.0f, 0.0f));
- this.closestPeds = World.GetNearbyPeds(ped.Position, 10f);
- for (int index = 0; index < this.closestPeds.Length; ++index)
- {
- int num1;
- 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))
- num1 = Function.Call<int>(Hash._0xF162E133B4E7A675, (InputArgument)this.closestPeds[index]) != Function.Call<int>(Hash._0xF162E133B4E7A675, (InputArgument)ped) ? 1 : 0;
- else
- num1 = 0;
- if (num1 != 0)
- {
- int num2;
- if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 0)
- {
- if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 1)
- {
- if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 2)
- {
- if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 6)
- {
- if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 29)
- {
- if (Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 27)
- {
- num2 = Function.Call<int>(Hash._0xFF059E1E4C01E63C, (InputArgument)this.closestPeds[index]) != 21 ? 1 : 0;
- goto label_13;
- }
- }
- }
- }
- }
- }
- num2 = 0;
- label_13:
- if (num2 != 0)
- Function.Call(Hash._0x72C896464915D1B1, (InputArgument)this.closestPeds[index], (InputArgument)ped);
- else if (Game.Player.WantedLevel < 1)
- ++Game.Player.WantedLevel;
- }
- }
- }
- private void AttachPistol(Ped ped)
- {
- if (!((Entity)this.holster != (Entity)null) || !this.holster.Exists() || !((Entity)ped != (Entity)null) || !ped.Exists())
- return;
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.HolstedPistol, (InputArgument)this.holster, (InputArgument)true);
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.HolstedPistol, (InputArgument)ped, (InputArgument)true);
- if (!this.useHipHolster)
- {
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- 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);
- }
- else
- {
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57597);
- if (this.worldPistolModel == this.GetHashKey("w_pi_pistol50"))
- 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);
- else
- 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);
- }
- }
- private void AttachHolster(Ped ped)
- {
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.holster, (InputArgument)ped, (InputArgument)true);
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.holster, (InputArgument)this.choosenPistol, (InputArgument)true);
- if (!this.useHipHolster)
- {
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- 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);
- }
- else
- {
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57597);
- 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);
- }
- }
- private void IconHolsterDrawFunc(Ped ped)
- {
- 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>()))
- {
- this.iconDrawFunc(this.holsterIconX, this.holsterIconY, this.holsterIconW, this.holsterIconH, "holsterFull.png");
- }
- else
- {
- 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>()))
- return;
- this.iconDrawFunc(this.holsterIconX, this.holsterIconY, this.holsterIconW, this.holsterIconH, "holsterEmpty.png");
- }
- }
- private void SaveHolster(Ped ped)
- {
- bool flag = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XAttribute((XName)"holster", (object)true));
- this.saveDoc();
- this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)true);
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)true);
- this.saveDoc();
- }
- }
- private bool doesPedHasHolster(Ped ped)
- {
- bool flag = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str);
- return xelement.Attribute((XName)"holster") != null && xelement.Attribute((XName)"holster").Value == "true";
- }
- private void DeleteHolster(Ped ped)
- {
- bool flag = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XAttribute((XName)"holster", (object)false));
- this.saveDoc();
- this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)false);
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)false);
- this.saveDoc();
- }
- }
- private void SetHolster(Ped ped)
- {
- if (!((Entity)ped != (Entity)null) || !ped.Exists())
- return;
- if (!this.useHipHolster)
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)"puton_parachute", (InputArgument)3))
- {
- 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);
- Script.Wait(700);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"puton_parachute", (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)3);
- }
- }
- else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- {
- 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);
- Script.Wait(700);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"cop_p1_rf_right_0", (InputArgument)"mp_arrest_paired", (InputArgument)3);
- }
- this.holsterSet = true;
- if (!this.useHipHolster)
- {
- 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))
- {
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped))
- {
- this.holster = prop;
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- 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);
- }
- else if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_pistol_holster")))
- {
- if (Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_pistol_holster")))
- {
- this.holster = World.CreateProp((Model)"prop_pistol_holster", ped.Position, true, false);
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- 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);
- }
- else
- UI.Notify("holster model has not loaded yet");
- }
- else
- UI.Notify("holster model is invalid");
- }
- else if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_pistol_holster")))
- {
- if (Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_pistol_holster")))
- {
- this.holster = World.CreateProp((Model)"prop_pistol_holster", ped.Position, true, false);
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- 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);
- }
- else
- UI.Notify("holster model has not loaded yet");
- }
- else
- UI.Notify("holster model is invalid");
- }
- 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))
- {
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped))
- {
- this.holster = prop;
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57597);
- 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);
- }
- else if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_holster_01")))
- {
- if (Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_holster_01")))
- {
- this.holster = World.CreateProp((Model)"prop_holster_01", ped.Position, true, false);
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57597);
- 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);
- }
- else
- UI.Notify("holster model has not loaded yet");
- }
- else
- UI.Notify("holster model is invalid");
- }
- else if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_holster_01")))
- {
- if (Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_holster_01")))
- {
- this.holster = World.CreateProp((Model)"prop_holster_01", ped.Position, true, false);
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57597);
- 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);
- }
- else
- UI.Notify("holster model has not loaded yet");
- }
- else
- UI.Notify("holster model is invalid");
- }
- private void UnsetHolster(Ped ped)
- {
- if (!((Entity)ped != (Entity)null) || !ped.Exists())
- return;
- if (!this.useHipHolster)
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"skydive@parachute@", (InputArgument)"chute_off", (InputArgument)3))
- {
- ped.Task.ClearAll();
- 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);
- Script.Wait(700);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"chute_off", (InputArgument)"skydive@parachute@", (InputArgument)3);
- }
- }
- else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- {
- 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);
- Script.Wait(700);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"cop_p1_rf_right_0", (InputArgument)"mp_arrest_paired", (InputArgument)3);
- }
- this.holsterSet = false;
- if ((Entity)this.holster != (Entity)null && this.holster.Exists())
- {
- this.holster.Delete();
- this.holster = (Prop)null;
- }
- if ((Entity)this.HolstedPistol != (Entity)null && this.HolstedPistol.Exists())
- {
- this.HolstedPistol = (Prop)null;
- Function.Call(Hash._0x4899CB088EDF59B8, (InputArgument)ped, (InputArgument)this.choosenPistol);
- }
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistol");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_combatpistol");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_appistol");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistol50");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_heavypistol");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_vintage_pistol");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_revolver");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistolmk2");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_revolvermk2");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_wep1_gun");
- }
- private void PropsControlFunc(
- Ped ped,
- string action,
- bool condition,
- string section,
- int type)
- {
- Function.Call(Hash._0xDE2EF5DA284CC8DF, Array.Empty<InputArgument>());
- Function.Call(Hash._0xADFF1B2A555F5FBA, Array.Empty<InputArgument>());
- Function.Call(Hash._0x5A4F9EDF1673F704, (InputArgument)0);
- Function.Call(Hash._0xAC253D7842768F48, (InputArgument)0);
- int num1 = 0;
- int num2 = 0;
- int num3 = 0;
- if (type != 2 | condition)
- {
- num1 = this.config.GetValue<int>(section, action + "COMPONENTID", 9);
- num2 = this.config.GetValue<int>(section, action + "MODEL", 0);
- num3 = this.config.GetValue<int>(section, action + "TEXTURE", 0);
- }
- if (type == 1)
- {
- if (Function.Call<bool>(Hash._0xE825F6B6CEA7671D, (InputArgument)ped, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3))
- {
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)ped, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3);
- }
- else
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
- UI.Notify("Invalid Component number", true);
- }
- }
- if (type != 2)
- return;
- if (condition)
- {
- if (Function.Call<bool>(Hash._0x2B16A3BFF1FBCE49, (InputArgument)ped, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3))
- {
- Function.Call(Hash._0x93376B65A266EB5F, (InputArgument)ped, (InputArgument)num1, (InputArgument)num2, (InputArgument)num3, (InputArgument)false);
- }
- else
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
- UI.Notify("Invalid Prop number", true);
- }
- }
- else
- Function.Call(Hash._0x0943E5B8E078E76E, (InputArgument)ped, (InputArgument)1);
- }
- private void SmokeProceEffectsFunc(Ped ped, int type)
- {
- --this.cig_durability;
- Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
- 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);
- if (type == 1)
- {
- if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)ped))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
- return;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") > 0.6)
- {
- this.flame = false;
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)32679);
- Vector3 vector3 = Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num, (InputArgument)0, (InputArgument)(-0.1), (InputArgument)0);
- Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
- 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);
- }
- else
- {
- int num;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") < 0.5)
- 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;
- else
- num = 0;
- if (num != 0)
- this.flame = true;
- }
- }
- else if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
- {
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") > 0.6)
- {
- this.flame = false;
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)32679);
- Vector3 vector3 = Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num, (InputArgument)0, (InputArgument)(-0.1), (InputArgument)0);
- Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
- 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);
- }
- else
- {
- int num;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") < 0.5)
- 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;
- else
- num = 0;
- if (num != 0)
- this.flame = true;
- }
- }
- }
- else
- {
- Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
- 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);
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)32679);
- Vector3 vector3 = Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num, (InputArgument)0, (InputArgument)(-0.1), (InputArgument)0);
- Function.Call(Hash._0xB80D8756B4668AB6, (InputArgument)"scr_safehouse");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0x8702416E512EC454, (InputArgument)"scr_safehouse"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
- 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))
- {
- 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)
- {
- this.flame = false;
- 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);
- }
- else
- this.flame = true;
- }
- }
- }
- private void SmokeLoopFunc(Ped ped, int type)
- {
- this.smoking = true;
- switch (type)
- {
- case 1:
- int num1;
- 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))
- 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;
- else
- num1 = 0;
- if (num1 != 0)
- {
- if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)Game.Player.Character))
- {
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- break;
- 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);
- break;
- }
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- 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);
- break;
- }
- if ((Entity)this.cig != (Entity)null && this.cig.Exists())
- {
- int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
- if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)Game.Player.Character))
- {
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") > 0.109999999403954)
- 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);
- }
- else if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") > 0.109999999403954)
- 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);
- }
- break;
- case 2:
- 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))
- {
- int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
- 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);
- 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);
- }
- break;
- }
- }
- private void PauseSmokeFunc(Ped ped, int type)
- {
- if (type == 1)
- {
- if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)ped))
- {
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") > 0.6)
- {
- 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);
- if (ped.Model.Hash != this.GetHashKey("PLAYER_ZERO") && ped.Model.Hash != this.GetHashKey("PLAYER_ONE") && ped.Model.Hash != this.GetHashKey("PLAYER_TWO"))
- {
- int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)47419);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num2, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- 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);
- }
- else
- {
- int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)65068);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num2, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- 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);
- }
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"idle_a", (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)3);
- this.playCigAndSmokeAnim = false;
- this.smoking = false;
- }
- else
- {
- int num1;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") < 0.5)
- 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;
- else
- num1 = 0;
- if (num1 == 0)
- return;
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
- {
- Model model = ped.Model;
- int num2;
- if (model.Hash != this.GetHashKey("PLAYER_ZERO"))
- {
- model = ped.Model;
- if (model.Hash != this.GetHashKey("PLAYER_ONE"))
- {
- model = ped.Model;
- num2 = model.Hash != this.GetHashKey("PLAYER_TWO") ? 1 : 0;
- goto label_16;
- }
- }
- num2 = 0;
- label_16:
- if (num2 != 0)
- {
- int num3 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)47419);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num3, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- 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);
- }
- else
- {
- int num3 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)65068);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num3, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- 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);
- }
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"idle_a", (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)3);
- this.playCigAndSmokeAnim = false;
- this.smoking = false;
- }
- }
- }
- else if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") > 0.6)
- {
- 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);
- if (ped.Model.Hash != this.GetHashKey("PLAYER_ZERO") && ped.Model.Hash != this.GetHashKey("PLAYER_ONE") && ped.Model.Hash != this.GetHashKey("PLAYER_TWO"))
- {
- int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)47419);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num2, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- 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);
- }
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"idle_b", (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)3);
- this.playCigAndSmokeAnim = false;
- this.smoking = false;
- }
- else
- {
- int num1;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") < 0.5)
- 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;
- else
- num1 = 0;
- if (num1 != 0)
- {
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
- {
- Model model = ped.Model;
- int num2;
- if (model.Hash != this.GetHashKey("PLAYER_ZERO"))
- {
- model = ped.Model;
- if (model.Hash != this.GetHashKey("PLAYER_ONE"))
- {
- model = ped.Model;
- num2 = model.Hash != this.GetHashKey("PLAYER_TWO") ? 1 : 0;
- goto label_34;
- }
- }
- num2 = 0;
- label_34:
- if (num2 != 0)
- {
- int num3 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)47419);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num3, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- 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);
- }
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"idle_b", (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)3);
- this.playCigAndSmokeAnim = false;
- this.smoking = false;
- }
- }
- }
- }
- else
- {
- this.flame = false;
- this.smoking = false;
- 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))
- {
- 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);
- this.playCigAndSmokeAnim = false;
- }
- }
- }
- private void StopSmokeFunc(Ped ped, int type)
- {
- if (type == 1)
- {
- int num1;
- if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
- num1 = !Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)ped) ? 1 : 0;
- else
- num1 = 0;
- if (num1 == 0 || !((Entity)this.cig != (Entity)null))
- return;
- if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)ped))
- {
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)3))
- {
- int num2;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a") >= 0.300000011920929)
- 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;
- else
- num2 = 0;
- if (num2 != 0)
- Function.Call(Hash._0x4487C259F0F70977, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a", (InputArgument)"idle_a", (InputArgument)0.6);
- }
- }
- else if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
- {
- int num2;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b") >= 0.300000011920929)
- 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;
- else
- num2 = 0;
- if (num2 != 0)
- Function.Call(Hash._0x4487C259F0F70977, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)0.6);
- }
- int num3 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
- 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);
- if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)ped))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@exit", (InputArgument)"exit", (InputArgument)3))
- 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);
- else if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@exit", (InputArgument)"exit") >= 0.5)
- {
- this.cigsAndPillsCountDown = false;
- this.smoke = -1;
- this.startSmoke = true;
- this.flame = false;
- if ((Entity)this.cig != (Entity)null)
- {
- Function.Call(Hash._0x961AC54BF0613F5D, (InputArgument)this.cig, (InputArgument)true, (InputArgument)true);
- this.cig.MarkAsNoLongerNeeded();
- this.cig = (Prop)null;
- }
- }
- }
- }
- else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@exit", (InputArgument)"exit", (InputArgument)3))
- 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);
- else if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_leaning@female@smoke@exit", (InputArgument)"exit") >= 0.5)
- {
- this.smoke = -1;
- this.startSmoke = true;
- this.flame = false;
- this.cigsAndPillsCountDown = false;
- if ((Entity)this.cig != (Entity)null)
- {
- Function.Call(Hash._0x961AC54BF0613F5D, (InputArgument)this.cig, (InputArgument)true, (InputArgument)true);
- this.cig.MarkAsNoLongerNeeded();
- this.cig = (Prop)null;
- }
- }
- }
- }
- else
- {
- int num1;
- if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)ped))
- {
- if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
- {
- if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)ped))
- {
- num1 = (Entity)this.cig != (Entity)null ? 1 : 0;
- goto label_48;
- }
- }
- }
- num1 = 0;
- label_48:
- if (num1 != 0)
- {
- int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
- 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);
- 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.cigsAndPillsCountDown = true;
- this.cigsAndPillsCounter = 1;
- 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);
- }
- 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)
- {
- this.cigsAndPillsCountDown = false;
- this.smoke = -1;
- this.startSmoke = true;
- if ((Entity)this.cig != (Entity)null)
- {
- this.cig.Delete();
- this.cig = (Prop)null;
- }
- }
- 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))
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"exit", (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base", (InputArgument)3);
- }
- }
- }
- private void StartSmokeFunc(Ped ped, int type)
- {
- this.smoking = true;
- if (!((Entity)this.cig != (Entity)null))
- return;
- if (type == 1)
- {
- int num1 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)18905);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num1, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
- int num2;
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- num2 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter", (InputArgument)3) ? 1 : 0;
- else
- num2 = 0;
- if (num2 != 0)
- 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);
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter", (InputArgument)3))
- {
- int num3;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter") >= 0.100000001490116)
- num3 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter") < 0.200000002980232 ? 1 : 0;
- else
- num3 = 0;
- if (num3 != 0)
- {
- this.cigsAndPillsCountDown = true;
- this.cigsAndPillsCounter = 9;
- this.cig.IsVisible = true;
- }
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter") < 0.6)
- {
- int num4;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter") < 0.200000002980232)
- num4 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter") > 0.131999999284744 ? 1 : 0;
- else
- num4 = 0;
- if (num4 != 0 && this.cig.Exists())
- {
- int num5;
- if (ped.Model.Hash != this.GetHashKey("PLAYER_ZERO"))
- {
- Model model = ped.Model;
- if (model.Hash != this.GetHashKey("PLAYER_ONE"))
- {
- model = ped.Model;
- num5 = model.Hash != this.GetHashKey("PLAYER_TWO") ? 1 : 0;
- goto label_22;
- }
- }
- num5 = 0;
- label_22:
- if (num5 != 0)
- {
- int num6 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)47419);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num6, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- 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);
- }
- else
- {
- int num6 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)65068);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num6, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- 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);
- }
- }
- if (this.cigsAndPillsCounter == 6)
- {
- this.LighterSoundFX(ped);
- int num5 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num5, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
- 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);
- }
- if (this.cigsAndPillsCounter <= 0)
- {
- this.startSmoke = false;
- this.cigsAndPillsCountDown = false;
- this.cig_durability = this.max_cig_durability;
- --this.cigsCount;
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
- UI.Notify("Cigs left: ~r~" + this.cigsCount.ToString(), true);
- }
- }
- else
- {
- this.startSmoke = false;
- this.cigsAndPillsCountDown = false;
- this.cig_durability = this.max_cig_durability;
- --this.cigsCount;
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
- UI.Notify("Cigs left: ~r~" + this.cigsCount.ToString(), true);
- }
- }
- }
- else if ((Entity)this.cig != (Entity)null)
- {
- int num1 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)18905);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num1, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- int num2;
- if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)ped))
- {
- if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
- {
- num2 = !Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)ped) ? 1 : 0;
- goto label_38;
- }
- }
- num2 = 0;
- label_38:
- if (num2 != 0)
- {
- 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))
- {
- 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);
- this.cig.IsVisible = true;
- }
- else if (!this.cigsAndPillsCountDown)
- {
- this.LighterSoundFX(ped);
- Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
- 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);
- this.cigsAndPillsCountDown = true;
- this.cigsAndPillsCounter = 3;
- }
- }
- 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)
- {
- this.startSmoke = false;
- this.cigsAndPillsCountDown = false;
- this.cig_durability = this.max_cig_durability;
- --this.cigsCount;
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
- UI.Notify("Cigs left: ~r~" + this.cigsCount.ToString(), true);
- }
- }
- }
- private void LighterSoundFX(Ped ped)
- {
- this.soundFX(ped, "lighter.wav");
- Script.Wait(500);
- this.soundFX(ped, "puff.wav");
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)64017);
- Vector3 vector3 = Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
- 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);
- Script.Wait(1000);
- this.soundFX(ped, "sizzle.wav");
- }
- private void stopSmokingFunc(Ped ped)
- {
- if ((Entity)this.cig != (Entity)null)
- {
- 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)))
- 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();
- }
- else
- this.cig.Delete();
- this.smoke = -1;
- this.startSmoke = true;
- if (this.playCigAndSmokeAnim)
- this.playCigAndSmokeAnim = false;
- this.cig = (Prop)null;
- }
- private void SwallowPillsFunction(Ped ped)
- {
- Function.Call(Hash._0xDE2EF5DA284CC8DF, Array.Empty<InputArgument>());
- Function.Call(Hash._0xADFF1B2A555F5FBA, Array.Empty<InputArgument>());
- Function.Call(Hash._0x5A4F9EDF1673F704, (InputArgument)0);
- Function.Call(Hash._0xAC253D7842768F48, (InputArgument)0);
- string animDict = "friends@frl@ig_1";
- string animName = "drink_lamar";
- if (this.cigsAndPillsCounter > 15)
- return;
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName, (InputArgument)3))
- {
- Function.Call(Hash._0x88CBB5CEB96B7BD2, (InputArgument)ped, (InputArgument)false, (InputArgument)0);
- Function.Call(Hash._0xD75ACCF5E0FB5367, (InputArgument)ped, (InputArgument)false, (InputArgument)0);
- if (ped.IsInCover())
- ped.Task.ClearAllImmediately();
- ped.Task.PlayAnimation(animDict, animName, 32f, 12000, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Function.Call(Hash._0x4487C259F0F70977, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName, (InputArgument)0.15f);
- }
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName, (InputArgument)3))
- {
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) < 0.150000005960464)
- Function.Call(Hash._0x4487C259F0F70977, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName, (InputArgument)0.15f);
- int num1;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) >= 0.189999997615814)
- num1 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) < 0.19149999320507 ? 1 : 0;
- else
- num1 = 0;
- if (num1 != 0)
- {
- int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)4090);
- Function.Call<Vector3>(Hash._0x17C07FC640E86B4E, (InputArgument)ped, (InputArgument)num2, (InputArgument)0, (InputArgument)0, (InputArgument)0);
- int num3;
- if ((Entity)this.pillsJar == (Entity)null)
- 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;
- else
- num3 = 0;
- if (num3 != 0)
- {
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped) && (Entity)this.pillsJar == (Entity)null)
- this.pillsJar = prop;
- }
- else
- {
- this.pillsJar = World.CreateProp((Model)"prop_cs_pills", ped.Position, true, false);
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.pillsJar, (InputArgument)ped, (InputArgument)true);
- }
- 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())
- {
- 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);
- int num4;
- if ((Entity)prop != (Entity)this.pillsJar)
- num4 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped) ? 1 : 0;
- else
- num4 = 0;
- if (num4 != 0 && prop.Exists())
- prop.Delete();
- }
- 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);
- this.soundFX(ped, "shakeJar.wav");
- }
- int num5;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) >= 0.270000010728836)
- num5 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) < 0.271299988031387 ? 1 : 0;
- else
- num5 = 0;
- if (num5 != 0)
- this.soundFX(ped, "openJar.wav");
- int num6;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) >= 0.550000011920929)
- num6 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) < 0.551500022411346 ? 1 : 0;
- else
- num6 = 0;
- if (num6 != 0)
- this.soundFX(ped, "swallow.wav");
- int num7;
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) >= 0.649999976158142)
- num7 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) < 0.65149998664856 ? 1 : 0;
- else
- num7 = 0;
- if (num7 != 0)
- this.soundFX(ped, "openJar.wav");
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)animDict, (InputArgument)animName) >= 0.85)
- {
- this.soundFX(ped, "shakeJar.wav");
- this.inProcessCigsAndPills = false;
- this.cigsAndPillsCounter = 0;
- this.play_swallow_pills_anim = false;
- ped.Task.ClearAll();
- if ((Entity)this.pillsJar != (Entity)null && this.pillsJar.Exists())
- {
- if (this.pillsCount <= 0)
- {
- Function.Call(Hash._0x961AC54BF0613F5D, (InputArgument)this.pillsJar, (InputArgument)true, (InputArgument)false);
- this.pillsJar.MarkAsNoLongerNeeded();
- this.pillsJar = (Prop)null;
- }
- else
- {
- this.pillsJar.Delete();
- this.pillsJar = (Prop)null;
- }
- }
- Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 3f, (Model)this.GetHashKey("prop_cs_pills"));
- if ((uint)nearbyProps.Length > 0U)
- {
- foreach (Entity entity in nearbyProps)
- entity.Delete();
- }
- 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())
- {
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)ped) && prop.Exists())
- prop.Delete();
- }
- Function.Call(Hash._0xB8BEC0CA6F0EDB0F, (InputArgument)ped);
- Function.Call(Hash._0xB9EFD5C25018725A, (InputArgument)"AllowAmbientSpeechInSlowMo", (InputArgument)true);
- Function.Call(Hash._0xBAF20C5432058024, (InputArgument)ped, (InputArgument)false);
- Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)ped, (InputArgument)"GENERIC_DRINK", (InputArgument)"SPEECH_PARAMS_FORCE_SHOUTED");
- if (!this.extraEffects)
- ped.Health = ped.MaxHealth;
- this.pillsCount -= this.rnd.Next(1, 4);
- this.extraEffectsTimer = this.extraFXDuration;
- this.extraEffectsStat = true;
- this.slowMoScale = 1f;
- Function.Call(Hash._0xBAF20C5432058024, (InputArgument)ped, (InputArgument)true);
- Function.Call(Hash._0x67C540AA08E4A6F5, (InputArgument)(-1), (InputArgument)"FocusIn", (InputArgument)"HintCamSounds");
- if (this.screenFX && !this.extraEffects)
- {
- if (!Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusIn"))
- Function.Call(Hash._0x2206BF9A37B7F724, (InputArgument)"FocusIn", (InputArgument)100, (InputArgument)false);
- }
- if (!this.screenFX && this.extraEffects)
- {
- if (!Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusIn"))
- Function.Call(Hash._0x2206BF9A37B7F724, (InputArgument)"FocusIn", (InputArgument)100, (InputArgument)false);
- }
- this.blockKeys = false;
- }
- }
- }
- private void saveDoc()
- {
- this.doc.Save("scripts\\Expansion\\WeaponStash.xml");
- }
- private void ContactAnsweredDate(iFruitContact contact)
- {
- this.soundFX(Game.Player.Character, "beep.wav");
- this.update_inventory_status(Game.Player.Character);
- this._iFruit.Close(0);
- this.callContact.EndCall();
- if (this.deal && !this.payed)
- {
- if (!((Entity)this.seller != (Entity)null) || (double)this.seller.Position.DistanceTo(Game.Player.Character.Position) >= 15.0 || this.payed)
- return;
- this.payed = true;
- }
- else
- this.findSellerOption = true;
- }
- private void Setup(Ped ped)
- {
- this.modMenuPool = new MenuPool();
- this.mainMenu = new UIMenu("Inventory Menu", "Select option");
- this.modMenuPool.Add(this.mainMenu);
- this.mainMenu.OnMenuClose += new MenuCloseEvent(this.onMenuClose);
- UIMenu uiMenu1 = new UIMenu("Stash weapon", "Select Weapon");
- UIMenu uiMenu2 = new UIMenu("Take weapon", "Select Weapon");
- UIMenuColoredItem StashItem = new UIMenuColoredItem("Stash", this.btnColor1, this.btnColor2);
- StashItem.SetRightBadge(UIMenuItem.BadgeStyle.Ammo);
- StashItem.TextColor = this.btnTextColor1;
- StashItem.HighlightedTextColor = this.btnTextColor2;
- UIMenuColoredItem TakeItem = new UIMenuColoredItem("Take", this.btnColor1, this.btnColor2);
- TakeItem.SetRightBadge(UIMenuItem.BadgeStyle.Ammo);
- TakeItem.TextColor = this.btnTextColor1;
- TakeItem.HighlightedTextColor = this.btnTextColor2;
- UIMenuColoredItem RemoveBag = new UIMenuColoredItem("Take Bag off", this.btnColor1, this.btnColor2);
- UIMenuColoredItem ChangeBagPosition = new UIMenuColoredItem("Change Bag Position", this.btnColor1, this.btnColor2);
- UIMenuColoredItem SaveOutfit = new UIMenuColoredItem("Save outfit", this.btnColor1, this.btnColor2);
- UIMenuColoredItem LoadOutfit = new UIMenuColoredItem("Load outfit", this.btnColor1, this.btnColor2);
- UIMenuColoredItem CloseMenu = new UIMenuColoredItem("Exit", Color.Transparent, Color.GhostWhite);
- SaveOutfit.SetRightBadge(UIMenuItem.BadgeStyle.Clothes);
- SaveOutfit.TextColor = this.btnTextColor1;
- SaveOutfit.HighlightedTextColor = this.btnTextColor2;
- LoadOutfit.SetRightBadge(UIMenuItem.BadgeStyle.Clothes);
- LoadOutfit.TextColor = this.btnTextColor1;
- LoadOutfit.HighlightedTextColor = this.btnTextColor2;
- RemoveBag.SetRightBadge(UIMenuItem.BadgeStyle.Tick);
- CloseMenu.SetRightBadge(UIMenuItem.BadgeStyle.Lock);
- CloseMenu.TextColor = this.btnTextColor1;
- CloseMenu.HighlightedTextColor = this.btnTextColor2;
- ChangeBagPosition.SetRightBadge(UIMenuItem.BadgeStyle.Makeup);
- ChangeBagPosition.TextColor = this.btnTextColor1;
- ChangeBagPosition.HighlightedTextColor = this.btnTextColor2;
- RemoveBag.SetRightBadge(UIMenuItem.BadgeStyle.Clothes);
- RemoveBag.TextColor = this.btnTextColor1;
- RemoveBag.HighlightedTextColor = this.btnTextColor2;
- bool flag1 = false;
- string character = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- character = allPedHash.ToString();
- flag1 = true;
- }
- }
- if (!flag1)
- character = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)character) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)character));
- if (!this.mainMenuListString.Contains((object)uiMenu2))
- {
- this.mainMenuListString.Add((object)uiMenu2);
- UIMenu uiMenu3 = this.modMenuPool.AddSubMenu(this.mainMenu, "Take Weapons");
- this.mainMenu.CurrentSelection = 0;
- if (this.doc.Element((XName)"WeaponList").Element((XName)character) != null && this.doc.Element((XName)"WeaponList").Element((XName)character).Elements() != null)
- {
- foreach (XElement element in this.doc.Element((XName)"WeaponList").Element((XName)character).Elements())
- {
- foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
- {
- int num;
- if (element.Name.ToString() == allWeaponHash.ToString())
- {
- XName name1 = element.Name;
- WeaponHash weaponHash = WeaponHash.Unarmed;
- XName xname1 = (XName)weaponHash.ToString();
- if (name1 != xname1)
- {
- XName name2 = element.Name;
- weaponHash = WeaponHash.Parachute;
- XName xname2 = (XName)weaponHash.ToString();
- num = name2 != xname2 ? 1 : 0;
- goto label_18;
- }
- }
- num = 0;
- label_18:
- if (num != 0)
- {
- UIMenuCheckboxItem menuCheckboxItem = new UIMenuCheckboxItem(element.Name.ToString(), false);
- if (!uiMenu3.MenuItems.Contains((UIMenuItem)menuCheckboxItem))
- uiMenu3.AddItem((UIMenuItem)menuCheckboxItem);
- }
- }
- }
- }
- if (!uiMenu3.MenuItems.Contains((UIMenuItem)TakeItem))
- uiMenu3.AddItem((UIMenuItem)TakeItem);
- uiMenu3.OnItemSelect += (ItemSelectEvent)((sender, item, index) =>
- {
- if (item != TakeItem)
- return;
- foreach (WeaponHash stashedWeapon in this.stashedWeapons)
- {
- if (this.doc.Element((XName)"WeaponList").Element((XName)character) != null && this.doc.Element((XName)"WeaponList").Element((XName)character).Elements() != null)
- {
- foreach (XElement element in this.doc.Element((XName)"WeaponList").Element((XName)character).Elements())
- {
- if (element.Element((XName)"AMMO") != null)
- {
- if (element.Name == (XName)stashedWeapon.ToString())
- {
- ped.Weapons.Give(stashedWeapon, (int)element.Element((XName)"AMMO"), false, false);
- foreach (WeaponComponent allComponentsHash in this.allComponentsHashes)
- {
- bool flag2 = Function.Call<bool>(Hash._0x5CEE3DF569CECAB0, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allComponentsHash));
- if (element.Element((XName)allComponentsHash.ToString()) != null & flag2)
- Function.Call(Hash._0xD966D51AA5B28BB9, (InputArgument)ped, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allComponentsHash));
- }
- foreach (WeaponTint allTintHash in this.allTintHashes)
- {
- if (element.Attribute((XName)"tint") != null && element.Attribute((XName)"tint").Value == allTintHash.ToString())
- Function.Call(Hash._0x50969B9B89ED5738, (InputArgument)ped, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allTintHash));
- }
- element.Remove();
- this.saveDoc();
- }
- }
- else if (element.Name == (XName)stashedWeapon.ToString())
- {
- ped.Weapons.Give(stashedWeapon, 0, false, false);
- foreach (WeaponComponent allComponentsHash in this.allComponentsHashes)
- {
- bool flag2 = Function.Call<bool>(Hash._0x5CEE3DF569CECAB0, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allComponentsHash));
- if (element.Element((XName)allComponentsHash.ToString()) != null & flag2)
- Function.Call(Hash._0xD966D51AA5B28BB9, (InputArgument)ped, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allComponentsHash));
- }
- foreach (WeaponTint allTintHash in this.allTintHashes)
- {
- if (element.Attribute((XName)"tint") != null && element.Attribute((XName)"tint").Value == allTintHash.ToString())
- Function.Call(Hash._0x50969B9B89ED5738, (InputArgument)ped, (InputArgument)((int)stashedWeapon), (InputArgument)((int)allTintHash));
- }
- element.Remove();
- this.saveDoc();
- }
- }
- }
- }
- this.modMenuPool.CloseAllMenus();
- this.inMenu = false;
- if ((Entity)this.bagModelReturn(ped) != (Entity)null)
- this.weaponInventoryAnim(this.bagModelReturn(ped), ped);
- });
- uiMenu3.OnCheckboxChange += (CheckboxChangeEvent)((sender, item, index) =>
- {
- if (item.Checked)
- {
- foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
- {
- if (item.Text.ToString() == allWeaponHash.ToString() && !this.stashedWeapons.Contains(allWeaponHash))
- this.stashedWeapons.Add(allWeaponHash);
- }
- }
- else
- {
- foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
- {
- if (item.Text.ToString() == allWeaponHash.ToString() && this.stashedWeapons.Contains(allWeaponHash))
- this.stashedWeapons.Remove(allWeaponHash);
- }
- }
- });
- }
- if (!this.mainMenuListString.Contains((object)uiMenu1))
- {
- this.mainMenuListString.Add((object)uiMenu1);
- UIMenu uiMenu3 = this.modMenuPool.AddSubMenu(this.mainMenu, "Stash Weapons");
- this.mainMenu.CurrentSelection = 0;
- foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
- {
- if (ped.Weapons.HasWeapon(allWeaponHash))
- {
- UIMenuCheckboxItem menuCheckboxItem = new UIMenuCheckboxItem(allWeaponHash.ToString(), false);
- if (!uiMenu3.MenuItems.Contains((UIMenuItem)menuCheckboxItem) && (allWeaponHash != WeaponHash.Unarmed && allWeaponHash != WeaponHash.Parachute))
- uiMenu3.AddItem((UIMenuItem)menuCheckboxItem);
- }
- }
- if (!uiMenu3.MenuItems.Contains((UIMenuItem)StashItem))
- uiMenu3.AddItem((UIMenuItem)StashItem);
- uiMenu3.OnItemSelect += (ItemSelectEvent)((sender, item, index) =>
- {
- if (item != StashItem)
- return;
- foreach (WeaponHash characterWeapon in this.characterWeapons)
- {
- XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)character);
- int num1 = Function.Call<int>(Hash._0x015A522136D7F951, (InputArgument)ped, (InputArgument)((int)characterWeapon));
- int num2;
- if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)characterWeapon)) != 2685387236U)
- num2 = Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)characterWeapon)) != 3566412244U ? 1 : 0;
- else
- num2 = 0;
- if (num2 != 0)
- {
- if (xelement.Element((XName)characterWeapon.ToString()) == null)
- {
- if (characterWeapon != WeaponHash.Unarmed)
- {
- xelement.Add((object)new XElement((XName)characterWeapon.ToString(), (object)new XElement((XName)"AMMO", (object)num1)));
- this.saveDoc();
- foreach (WeaponComponent allComponentsHash in this.allComponentsHashes)
- {
- bool flag2 = Function.Call<bool>(Hash._0xC593212475FAE340, (InputArgument)ped, (InputArgument)((int)characterWeapon), (InputArgument)((int)allComponentsHash));
- if (xelement.Element((XName)characterWeapon.ToString()).Element((XName)allComponentsHash.ToString()) == null & flag2)
- {
- xelement.Element((XName)characterWeapon.ToString()).Add((object)new XElement((XName)allComponentsHash.ToString()));
- this.saveDoc();
- }
- }
- foreach (WeaponTint allTintHash in this.allTintHashes)
- {
- int num3 = Function.Call<int>(Hash._0x2B9EEDC07BD06B9F, (InputArgument)ped, (InputArgument)((int)characterWeapon));
- if (allTintHash == (WeaponTint)num3)
- {
- if (xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint") == null)
- {
- xelement.Element((XName)characterWeapon.ToString()).Add((object)new XAttribute((XName)"tint", (object)allTintHash.ToString()));
- this.saveDoc();
- }
- else
- {
- xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint").Value = allTintHash.ToString();
- this.saveDoc();
- }
- }
- }
- if (characterWeapon != WeaponHash.Unarmed)
- Function.Call(Hash._0x4899CB088EDF59B8, (InputArgument)ped, (InputArgument)((int)characterWeapon));
- }
- }
- else if (xelement.Element((XName)characterWeapon.ToString()).Element((XName)"AMMO") == null)
- {
- xelement.Element((XName)characterWeapon.ToString()).Add((object)new XElement((XName)"AMMO", (object)num1));
- this.saveDoc();
- foreach (WeaponComponent allComponentsHash in this.allComponentsHashes)
- {
- bool flag2 = Function.Call<bool>(Hash._0xC593212475FAE340, (InputArgument)ped, (InputArgument)((int)characterWeapon), (InputArgument)((int)allComponentsHash));
- if (xelement.Element((XName)characterWeapon.ToString()).Element((XName)allComponentsHash.ToString()) == null & flag2)
- {
- xelement.Element((XName)characterWeapon.ToString()).Add((object)new XElement((XName)allComponentsHash.ToString()));
- this.saveDoc();
- }
- }
- foreach (WeaponTint allTintHash in this.allTintHashes)
- {
- int num3 = Function.Call<int>(Hash._0x2B9EEDC07BD06B9F, (InputArgument)ped, (InputArgument)((int)characterWeapon));
- if (allTintHash == (WeaponTint)num3)
- {
- if (xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint") == null)
- {
- xelement.Element((XName)characterWeapon.ToString()).Add((object)new XAttribute((XName)"tint", (object)allTintHash.ToString()));
- this.saveDoc();
- }
- else
- {
- xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint").Value = allTintHash.ToString();
- this.saveDoc();
- }
- }
- }
- if (characterWeapon != WeaponHash.Unarmed)
- Function.Call(Hash._0x4899CB088EDF59B8, (InputArgument)ped, (InputArgument)((int)characterWeapon));
- }
- else
- {
- int num3 = int.Parse(xelement.Element((XName)characterWeapon.ToString()).Element((XName)"AMMO").Value) + num1;
- xelement.Element((XName)characterWeapon.ToString()).Element((XName)"AMMO").Value = num3.ToString();
- this.saveDoc();
- foreach (WeaponComponent allComponentsHash in this.allComponentsHashes)
- {
- bool flag2 = Function.Call<bool>(Hash._0xC593212475FAE340, (InputArgument)ped, (InputArgument)((int)characterWeapon), (InputArgument)((int)allComponentsHash));
- if (xelement.Element((XName)characterWeapon.ToString()).Element((XName)allComponentsHash.ToString()) == null & flag2)
- {
- xelement.Element((XName)characterWeapon.ToString()).Add((object)new XElement((XName)allComponentsHash.ToString()));
- this.saveDoc();
- }
- }
- foreach (WeaponTint allTintHash in this.allTintHashes)
- {
- int num4 = Function.Call<int>(Hash._0x2B9EEDC07BD06B9F, (InputArgument)ped, (InputArgument)((int)characterWeapon));
- if (allTintHash == (WeaponTint)num4)
- {
- if (xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint") == null)
- {
- xelement.Element((XName)characterWeapon.ToString()).Add((object)new XAttribute((XName)"tint", (object)allTintHash.ToString()));
- this.saveDoc();
- }
- else
- {
- xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint").Value = allTintHash.ToString();
- this.saveDoc();
- }
- }
- }
- if (characterWeapon != WeaponHash.Unarmed)
- Function.Call(Hash._0x4899CB088EDF59B8, (InputArgument)ped, (InputArgument)((int)characterWeapon));
- }
- }
- else
- {
- if (xelement.Element((XName)characterWeapon.ToString()) == null)
- {
- xelement.Add((object)new XElement((XName)characterWeapon.ToString()));
- this.saveDoc();
- }
- foreach (WeaponTint allTintHash in this.allTintHashes)
- {
- int num3 = Function.Call<int>(Hash._0x2B9EEDC07BD06B9F, (InputArgument)ped, (InputArgument)((int)characterWeapon));
- if (allTintHash == (WeaponTint)num3)
- {
- if (xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint") == null)
- {
- xelement.Element((XName)characterWeapon.ToString()).Add((object)new XAttribute((XName)"tint", (object)allTintHash.ToString()));
- this.saveDoc();
- }
- else
- {
- xelement.Element((XName)characterWeapon.ToString()).Attribute((XName)"tint").Value = allTintHash.ToString();
- this.saveDoc();
- }
- }
- }
- if (characterWeapon != WeaponHash.Unarmed)
- Function.Call(Hash._0x4899CB088EDF59B8, (InputArgument)ped, (InputArgument)((int)characterWeapon));
- }
- }
- this.modMenuPool.CloseAllMenus();
- this.inMenu = false;
- if ((Entity)this.bagModelReturn(ped) != (Entity)null)
- this.weaponInventoryAnim(this.bagModelReturn(ped), ped);
- });
- uiMenu3.OnCheckboxChange += (CheckboxChangeEvent)((sender, item, index) =>
- {
- if (item.Checked)
- {
- foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
- {
- if (ped.Weapons.HasWeapon(allWeaponHash) && item.Text.ToString() == allWeaponHash.ToString() && !this.characterWeapons.Contains(allWeaponHash))
- this.characterWeapons.Add(allWeaponHash);
- }
- }
- else
- {
- foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
- {
- if (ped.Weapons.HasWeapon(allWeaponHash) && item.Text.ToString() == allWeaponHash.ToString() && this.characterWeapons.Contains(allWeaponHash))
- this.characterWeapons.Remove(allWeaponHash);
- }
- }
- });
- }
- if ((Entity)this.bagModelReturn(ped) != (Entity)null)
- {
- if (!this.mainMenu.MenuItems.Contains((UIMenuItem)RemoveBag))
- this.mainMenu.AddItem((UIMenuItem)RemoveBag);
- if (!this.mainMenu.MenuItems.Contains((UIMenuItem)SaveOutfit))
- this.mainMenu.AddItem((UIMenuItem)SaveOutfit);
- if (!this.mainMenu.MenuItems.Contains((UIMenuItem)LoadOutfit))
- this.mainMenu.AddItem((UIMenuItem)LoadOutfit);
- if (!this.mainMenu.MenuItems.Contains((UIMenuItem)ChangeBagPosition))
- this.mainMenu.AddItem((UIMenuItem)ChangeBagPosition);
- if (!this.mainMenu.MenuItems.Contains((UIMenuItem)CloseMenu))
- this.mainMenu.AddItem((UIMenuItem)CloseMenu);
- }
- this.mainMenu.OnItemSelect += (ItemSelectEvent)((sender, item, index) =>
- {
- if (item == RemoveBag && (Entity)this.bagModelReturn(ped) != (Entity)null)
- {
- this.inMenu = false;
- Game.Player.Character.Task.ClearAll();
- this.bagRemove(this.bagModelReturn(ped), ped);
- }
- if (item == SaveOutfit && (Entity)this.bagModelReturn(ped) != (Entity)null)
- {
- this.SaveOutfitFunc(ped);
- this.modMenuPool.CloseAllMenus();
- this.inMenu = false;
- }
- if (item == LoadOutfit && (Entity)this.bagModelReturn(ped) != (Entity)null)
- {
- this.LoadOutfitFunc(ped);
- this.modMenuPool.CloseAllMenus();
- this.inMenu = false;
- }
- if (item == ChangeBagPosition && (Entity)this.bagModelReturn(ped) != (Entity)null)
- {
- this.changedPosition = !this.changedPosition;
- this.modMenuPool.CloseAllMenus();
- this.inMenu = false;
- Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() <= 0)
- {
- foreach (Prop prop2 in nearbyProps)
- {
- if ((Entity)prop2 == (Entity)null && !changedPosition)
- {
- prop2.IsVisible = true;
- }
- }
- }
- }
- if (item != CloseMenu || !((Entity)this.bagModelReturn(ped) != (Entity)null))
- return;
- this.mainMenuListString.Clear();
- this.stashedWeapons.Clear();
- this.inMenu = false;
- this.weaponInventoryAnim(this.bagModelReturn(Game.Player.Character), Game.Player.Character);
- });
- }
- private void onMenuClose(UIMenu sender)
- {
- if (this.modMenuPool.IsAnyMenuOpen())
- return;
- this.modMenuPool.CloseAllMenus();
- this.inMenu = false;
- }
- private void UsePhoneFunc(Ped ped)
- {
- this.DisableControlsFunc(false);
- Function.Call(Hash._0xC4E2813898C97A4B, (InputArgument)false);
- Function.Call(Hash._0x015C49A93E3E086E, (InputArgument)true);
- if (Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)ped))
- return;
- if (ped.Model == (Model)PedHash.Michael)
- Function.Call(Hash._0xA4E8E696C532FBC7, (InputArgument)0);
- if (ped.Model == (Model)PedHash.Franklin)
- Function.Call(Hash._0xA4E8E696C532FBC7, (InputArgument)2);
- if (ped.Model == (Model)PedHash.Trevor)
- Function.Call(Hash._0xA4E8E696C532FBC7, (InputArgument)1);
- if (ped.Model != (Model)PedHash.Michael && ped.Model != (Model)PedHash.Franklin && ped.Model != (Model)PedHash.Trevor)
- Function.Call(Hash._0xA4E8E696C532FBC7, (InputArgument)0);
- }
- private void ClosePhoneFunc(Ped ped, int ms, int ifruitCloseMS)
- {
- Script.Wait(ms);
- this._iFruit.Close(ifruitCloseMS);
- Function.Call(Hash._0x3BC861DF703E5097, Array.Empty<InputArgument>());
- ped.Task.ClearSecondary();
- }
- private void clearScriptFunction()
- {
- this.deal = false;
- this.greeting = false;
- this.greetingFinished = false;
- this.followCamera = false;
- this.canceled = false;
- this.sellerAvailableItems = 0;
- if ((Entity)this.seller != (Entity)null && this.seller.Exists())
- {
- this.blipHandle(false, (Entity)this.seller, this.sellerBlip, "", 0.0f, 0, false, false);
- Prop[] nearbyProps = World.GetNearbyProps(this.seller.Position, 10f, (Model)this.GetHashKey(this.bagModel));
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
- {
- foreach (Prop prop in nearbyProps)
- {
- if (prop.IsAttachedTo((Entity)this.seller))
- prop.Delete();
- }
- }
- this.seller.MarkAsNoLongerNeeded();
- this.seller = (Ped)null;
- }
- this.payed = false;
- Game.Pause(false);
- Game.Player.CanControlCharacter = true;
- Game.Player.Character.Task.ClearAll();
- World.RenderingCamera = (Camera)null;
- }
- private void sellerDialogFunc(
- int counter,
- bool holster_purchase,
- bool bag_purchase,
- bool supplies_purchase,
- Ped dealer)
- {
- if (this.payed)
- {
- Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GENERIC_THANKS", (InputArgument)"SPEECH_PARAMS_FORCE");
- Script.Wait(1000);
- Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)dealer, (InputArgument)"GENERIC_BYE", (InputArgument)"SPEECH_PARAMS_FORCE");
- if (this.TotalPrice + this.TotalPrice / 100 * 5 > 0)
- {
- 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");
- Game.Player.Money -= this.TotalPrice + this.TotalPrice / 100 * 5;
- this.Notify("MAZE", "Payment transaction ~o~5%~w~ has been discharged", (int)byte.MaxValue, 0, 0, "CHAR_BANK_MAZE");
- this.Notify("MAZE", "Thank you for using our service!", (int)byte.MaxValue, 0, 0, "CHAR_BANK_MAZE");
- }
- Function.Call(Hash._0xB138AAB8A70D3C69, (InputArgument)"TREVOR_SMALL_01");
- if (bag_purchase)
- {
- this.ClearInventoryData(Game.Player.Character);
- this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- UI.Notify("Dufflebag has benn ~g~purchased", true);
- }
- if (supplies_purchase)
- {
- int num1 = this.maxPills - this.pillsCount;
- int num2 = this.maxCigs - this.cigsCount;
- if (this.pillsCount < this.maxPills)
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- this.pillsCount = this.maxPills;
- UI.Notify("~g~+" + num1.ToString() + " ~w~Pills", true);
- }
- if (this.cigsCount < this.maxCigs)
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- this.cigsCount = this.maxCigs;
- UI.Notify("~g~+" + num2.ToString() + " ~w~Cigs", true);
- }
- }
- if (holster_purchase)
- {
- this.SaveHolster(Game.Player.Character);
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- UI.Notify("Holster has benn ~g~purchased", true);
- }
- }
- this.clearScriptFunction();
- Game.Player.Character.Task.ClearAll();
- this.buyBag = false;
- this.buyHolster = false;
- this.buySupplies = false;
- }
- private void CreateSeller(Vector3 location)
- {
- Ped[] nearbyPeds = World.GetNearbyPeds(location, 125f, (Model)PedHash.Dealer01SMY);
- this.seller = (Ped)null;
- bool flag1 = false;
- if (((IEnumerable<Ped>)nearbyPeds).Count<Ped>() > 0)
- {
- foreach (Ped ped in nearbyPeds)
- {
- if ((Entity)ped != (Entity)null && ped.IsAlive && ped.Exists())
- {
- this.seller = ped;
- flag1 = true;
- break;
- }
- }
- }
- if (!flag1)
- this.seller = World.CreatePed((Model)PedHash.Dealer01SMY, location);
- if (!((Entity)this.seller != (Entity)null))
- return;
- this.blipHandle(true, (Entity)this.seller, this.sellerBlip, "Dealer", 0.9f, 220, true, true);
- DisplayHelpTextThisFrame("~BLIP_INFO_ICON~ The closest ~g~Dealer's ~w~location has been ~y~marked on your ~p~Map");
- Function.Call(Hash._0xAD738C3085FE7E11, (InputArgument)this.seller, (InputArgument)true);
- this.greeting = false;
- this.greetingFinished = false;
- this.deal = false;
- this.payed = false;
- this.buyBag = false;
- this.buyHolster = false;
- this.buySupplies = false;
- Prop[] nearbyProps = World.GetNearbyProps(location, 2.5f, (Model)this.GetHashKey(this.bagModel));
- Prop prop1 = (Prop)null;
- bool flag2 = false;
- this.sellerDialogCounter = 3;
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
- {
- foreach (Prop prop2 in nearbyProps)
- {
- if (!prop2.IsAttached() && !prop2.IsAttachedTo((Entity)this.seller) && !prop2.IsAttachedTo((Entity)Game.Player.Character))
- {
- prop1 = prop2;
- flag2 = true;
- }
- }
- }
- if (!flag2)
- prop1 = World.CreateProp((Model)this.GetHashKey(this.bagModel), location, true, true);
- if ((Entity)prop1 != (Entity)null && (!prop1.IsAttached() && !prop1.IsAttachedTo((Entity)this.seller) && !prop1.IsAttachedTo((Entity)Game.Player.Character)))
- {
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)this.seller, (InputArgument)57005);
- 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);
- }
- void DisplayHelpTextThisFrame(string text)
- {
- Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
- Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
- Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
- }
- }
- private void blipsRemove(BlipSprite sprite)
- {
- Blip[] activeBlips = World.GetActiveBlips();
- if (activeBlips == null || (uint)activeBlips.Length <= 0U)
- return;
- foreach (Blip blip in activeBlips)
- {
- if (blip.Sprite == sprite)
- blip.Remove();
- }
- }
- private void checkBagVisibility(Ped ped)
- {
- if (!((Entity)this.bagModelReturn(ped) != (Entity)null))
- return;
- if (ped.IsVisible)
- {
- if (!this.bagModelReturn(ped).IsVisible)
- {
- this.bagModelReturn(ped).IsVisible = true;
- Prop prop1 = this.bagModelReturn(ped);
- if (this.drawStrap)
- {
- Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
- {
- foreach (Prop prop2 in nearbyProps)
- {
- if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)prop1) && !this.changedPosition)
- prop2.IsVisible = true;
- }
- }
- }
- }
- }
- else if (this.bagModelReturn(ped).IsVisible)
- {
- this.bagModelReturn(ped).IsVisible = false;
- Prop prop1 = this.bagModelReturn(ped);
- if (this.drawStrap)
- {
- Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
- {
- foreach (Prop prop2 in nearbyProps)
- {
- if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)prop1))
- prop2.IsVisible = false;
- }
- }
- }
- }
- }
- private bool IsCurrentWeaponBig(WeaponHash weapon)
- {
- int num;
- if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 970310034U)
- {
- if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 2725924767U)
- {
- if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 1159398588U)
- {
- if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 1595662460U)
- {
- if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 860033945U)
- {
- if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 3337201093U)
- {
- if (Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) != 3082541095U)
- {
- num = Function.Call<uint>(Hash._0xC3287EE3050FB74C, (InputArgument)((int)weapon)) == 1548507267U ? 1 : 0;
- goto label_9;
- }
- }
- }
- }
- }
- }
- }
- num = 1;
- label_9:
- return num != 0;
- }
- private bool DoesPedHasBigWeapons(Ped ped)
- {
- bool flag = false;
- foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
- {
- if (ped.Weapons.HasWeapon(allWeaponHash) && this.IsCurrentWeaponBig(allWeaponHash))
- flag = true;
- }
- return flag;
- }
- private void blipHandle(
- bool add,
- Entity entity,
- BlipSprite sprite,
- string name,
- float scale,
- int alpha,
- bool flashing,
- bool showRoute)
- {
- if (!(entity != (Entity)null) || !entity.Exists())
- return;
- if (add)
- {
- if (!entity.CurrentBlip.Exists())
- entity.AddBlip();
- if (entity.CurrentBlip.Exists())
- {
- entity.CurrentBlip.Sprite = sprite;
- entity.CurrentBlip.Name = name;
- entity.CurrentBlip.Scale = scale;
- entity.CurrentBlip.Alpha = alpha;
- entity.CurrentBlip.IsFlashing = flashing;
- entity.CurrentBlip.ShowRoute = showRoute;
- }
- }
- else if (entity.CurrentBlip.Exists())
- entity.CurrentBlip.Remove();
- }
- private bool DoesDroppedBagExist(Ped ped)
- {
- bool flag1 = false;
- if (this.getDroppedBag(ped) != (Entity)null)
- {
- flag1 = true;
- }
- else
- {
- bool flag2 = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag2 = true;
- }
- }
- if (!flag2)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- 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))
- {
- XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place").Element((XName)"Vehicle");
- foreach (Vehicle allVehicle in World.GetAllVehicles())
- {
- Function.Call<string>(Hash._0x7CE1CCB9B293020E, (InputArgument)allVehicle);
- Function.Call<string>(Hash._0xB215AAC32D25D019, (InputArgument)allVehicle);
- if (allVehicle.DisplayName == xelement.Attribute((XName)"Name").Value && allVehicle.NumberPlate == xelement.Attribute((XName)"Plate").Value)
- {
- this.blipHandle(true, (Entity)allVehicle, BlipSprite.Information, "Dufflebag", 0.85f, 200, true, false);
- flag1 = true;
- break;
- }
- }
- }
- }
- return flag1;
- }
- private Entity getDroppedBag(Ped ped)
- {
- Entity entity = (Entity)null;
- bool flag = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str);
- if (xelement.Attribute((XName)"bag") != null && xelement.Element((XName)"place") != null)
- {
- if (xelement.Element((XName)"place").Element((XName)"Location") != null)
- {
- 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)
- {
- float result1;
- float.TryParse(xelement.Element((XName)"place").Element((XName)"Location").Attribute((XName)"X").Value, NumberStyles.Float, (IFormatProvider)new CultureInfo("en-US"), out result1);
- float result2;
- float.TryParse(xelement.Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y").Value, NumberStyles.Float, (IFormatProvider)new CultureInfo("en-US"), out result2);
- float result3;
- float.TryParse(xelement.Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z").Value, NumberStyles.Float, (IFormatProvider)new CultureInfo("en-US"), out result3);
- Vector3 position = new Vector3(result1, result2, result3);
- Prop[] nearbyProps = World.GetNearbyProps(position, 2f, (Model)this.stashedBagModel);
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
- {
- foreach (Prop prop in nearbyProps)
- {
- if (!prop.IsAttached())
- {
- entity = (Entity)prop;
- break;
- }
- }
- }
- else
- entity = (Entity)World.CreateProp((Model)this.stashedBagModel, new Vector3(position.X, position.Y, position.Z - 1f), true, false);
- }
- }
- else if (xelement.Element((XName)"place").Element((XName)"Vehicle") != null)
- {
- foreach (Vehicle allVehicle in World.GetAllVehicles())
- {
- Function.Call<string>(Hash._0x7CE1CCB9B293020E, (InputArgument)allVehicle);
- Function.Call<string>(Hash._0xB215AAC32D25D019, (InputArgument)allVehicle);
- 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)
- {
- entity = (Entity)allVehicle;
- break;
- }
- }
- }
- }
- return entity;
- }
- private void clearTrash()
- {
- Prop[] allProps1 = World.GetAllProps((Model)this.bagModel);
- Prop[] allProps2 = World.GetAllProps((Model)this.bagModelFull);
- Prop[] allProps3 = World.GetAllProps((Model)this.stashedBagModel);
- if (((IEnumerable<Prop>)allProps1).Count<Prop>() > 0)
- {
- foreach (Prop prop in allProps1)
- {
- int num;
- if (!prop.IsAttached())
- num = !Function.Call<bool>(Hash._0x0A7B270912999B3C, (InputArgument)prop) ? 1 : 0;
- else
- num = 0;
- if (num != 0)
- prop.Delete();
- else if (((IEnumerable<Prop>)allProps1).Count<Prop>() > 1)
- prop.Delete();
- }
- }
- if (((IEnumerable<Prop>)allProps2).Count<Prop>() > 0)
- {
- foreach (Prop prop in allProps2)
- {
- int num;
- if (!prop.IsAttached())
- num = !Function.Call<bool>(Hash._0x0A7B270912999B3C, (InputArgument)prop) ? 1 : 0;
- else
- num = 0;
- if (num != 0)
- prop.Delete();
- else if (((IEnumerable<Prop>)allProps1).Count<Prop>() > 1)
- prop.Delete();
- }
- }
- if (((IEnumerable<Prop>)allProps3).Count<Prop>() > 0)
- {
- foreach (Prop prop in allProps3)
- {
- int num;
- if (!prop.IsAttached())
- num = !Function.Call<bool>(Hash._0x0A7B270912999B3C, (InputArgument)prop) ? 1 : 0;
- else
- num = 0;
- if (num != 0)
- prop.Delete();
- else if (((IEnumerable<Prop>)allProps1).Count<Prop>() > 1)
- prop.Delete();
- }
- }
- if (!this.drawStrap)
- return;
- Prop[] allProps4 = World.GetAllProps((Model)"prop_cs_heist_bag_strap_01");
- if (((IEnumerable<Prop>)allProps4).Count<Prop>() > 0)
- {
- foreach (Prop prop in allProps4)
- {
- int num;
- if (!prop.IsAttached())
- num = !Function.Call<bool>(Hash._0x0A7B270912999B3C, (InputArgument)prop) ? 1 : 0;
- else
- num = 0;
- if (num != 0)
- prop.Delete();
- }
- }
- }
- private void ClearInventoryData(Ped ped)
- {
- bool flag = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- return;
- this.doc.Element((XName)"WeaponList").Element((XName)str).Descendants().Remove<XElement>();
- }
- private bool doesPedHasInventoryBag(Ped ped)
- {
- bool flag = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str);
- return xelement.Attribute((XName)"bag") != null && xelement.Attribute((XName)"bag").Value == "true";
- }
- private string bagModelCheck(Ped ped)
- {
- List<WeaponHash> weaponHashList = new List<WeaponHash>();
- bool flag = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str);
- if (xelement.Elements() != null)
- {
- foreach (XElement element in xelement.Elements())
- {
- foreach (WeaponHash allWeaponHash in this.allWeaponHashes)
- {
- if (allWeaponHash.ToString() == element.Name.ToString() && this.IsCurrentWeaponBig(allWeaponHash) && !weaponHashList.Contains(allWeaponHash))
- weaponHashList.Add(allWeaponHash);
- }
- }
- }
- return weaponHashList.Count <= 3 ? this.bagModel : this.bagModelFull;
- }
- private bool doesPedWearingBag(Ped ped)
- {
- return (Entity)this.bagModelReturn(ped) != (Entity)null;
- }
- private void outfit_XML_Element_Handle_Func(
- Ped ped,
- string elem,
- int id,
- int model,
- int texture,
- bool isProp)
- {
- bool flag = false;
- string str = "";
- XElement xelement = (XElement)null;
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- {
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) != null)
- {
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XElement((XName)"Outfit"));
- this.saveDoc();
- xelement = this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit");
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit") != null)
- xelement = this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit");
- }
- if (xelement == null)
- return;
- if (xelement.Element((XName)elem) == null)
- {
- xelement.Add((object)new XElement((XName)elem, (object)new XElement((XName)"ID", (object)id)));
- xelement.Element((XName)elem).Add((object)new XElement((XName)"Model", (object)model));
- xelement.Element((XName)elem).Add((object)new XElement((XName)"Variation", (object)texture));
- if (xelement.Element((XName)elem).Attribute((XName)nameof(isProp)) == null)
- {
- xelement.Element((XName)elem).Add((object)new XAttribute((XName)nameof(isProp), (object)isProp));
- this.saveDoc();
- }
- else
- {
- xelement.Element((XName)elem).Attribute((XName)nameof(isProp)).SetValue((object)isProp);
- this.saveDoc();
- }
- this.saveDoc();
- }
- else
- {
- if (xelement.Element((XName)elem).Attribute((XName)nameof(isProp)) == null)
- {
- xelement.Element((XName)elem).Add((object)new XAttribute((XName)nameof(isProp), (object)isProp));
- this.saveDoc();
- }
- else
- {
- xelement.Element((XName)elem).Attribute((XName)nameof(isProp)).SetValue((object)isProp);
- this.saveDoc();
- }
- if (xelement.Element((XName)elem).Element((XName)"ID") == null)
- {
- xelement.Element((XName)elem).Add((object)new XElement((XName)"ID", (object)id));
- this.saveDoc();
- }
- else
- {
- xelement.Element((XName)elem).Element((XName)"Model").SetValue((object)model);
- this.saveDoc();
- }
- if (xelement.Element((XName)elem).Element((XName)"Model") == null)
- {
- xelement.Element((XName)elem).Add((object)new XElement((XName)"Model", (object)model));
- this.saveDoc();
- }
- else
- {
- xelement.Element((XName)elem).Element((XName)"Variation").SetValue((object)texture);
- this.saveDoc();
- }
- if (xelement.Element((XName)elem).Element((XName)"Variation") == null)
- {
- xelement.Element((XName)elem).Add((object)new XElement((XName)"Variation", (object)texture));
- this.saveDoc();
- }
- else
- {
- xelement.Element((XName)elem).Element((XName)"Variation").SetValue((object)texture);
- this.saveDoc();
- }
- }
- }
- private void read_XML_element_outfit_func(Ped ped, string elem, int id, bool isProp)
- {
- bool flag = false;
- string str = "";
- XElement xelement = (XElement)null;
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- {
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) != null)
- {
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XElement((XName)"Outfit"));
- this.saveDoc();
- xelement = this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit");
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit") != null)
- xelement = this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"Outfit");
- }
- if (xelement == null || xelement.Element((XName)elem) == null || (xelement.Element((XName)elem).Element((XName)"Model") == null || xelement.Element((XName)elem).Element((XName)"Variation") == null))
- return;
- int int32_1 = Convert.ToInt32(xelement.Element((XName)elem).Element((XName)"Model").Value);
- int int32_2 = Convert.ToInt32(xelement.Element((XName)elem).Element((XName)"Variation").Value);
- if (!isProp)
- {
- if (Function.Call<bool>(Hash._0xE825F6B6CEA7671D, (InputArgument)ped, (InputArgument)id, (InputArgument)int32_1, (InputArgument)int32_2))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)ped, (InputArgument)id, (InputArgument)int32_1, (InputArgument)int32_2);
- }
- else if (Function.Call<bool>(Hash._0x2B16A3BFF1FBCE49, (InputArgument)ped, (InputArgument)id, (InputArgument)int32_1, (InputArgument)int32_2))
- {
- if (Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)id) != -1)
- Function.Call(Hash._0x93376B65A266EB5F, (InputArgument)ped, (InputArgument)id, (InputArgument)int32_1, (InputArgument)int32_2);
- }
- }
- private void LoadOutfitFunc(Ped ped)
- {
- if (!Game.IsScreenFadedOut && Game.IsScreenFadedIn)
- {
- Game.FadeScreenOut(1000);
- Script.Wait(2500);
- this.read_XML_element_outfit_func(ped, "Head", 0, true);
- this.read_XML_element_outfit_func(ped, "Eyes", 1, true);
- this.read_XML_element_outfit_func(ped, "Ears", 2, true);
- this.read_XML_element_outfit_func(ped, "Torso", 3, false);
- this.read_XML_element_outfit_func(ped, "Hands", 5, false);
- this.read_XML_element_outfit_func(ped, "Legs", 4, false);
- this.read_XML_element_outfit_func(ped, "Feet", 6, false);
- this.read_XML_element_outfit_func(ped, "Unknown", 7, false);
- this.read_XML_element_outfit_func(ped, "Accessories", 8, false);
- this.read_XML_element_outfit_func(ped, "Accessories2", 9, false);
- this.read_XML_element_outfit_func(ped, "Decals", 10, false);
- this.read_XML_element_outfit_func(ped, "Jbib", 11, false);
- Game.FadeScreenIn(1000);
- this.soundFX(ped, "noise.wav");
- }
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- UI.Notify("Outfit has been ~g~Successfully~w~ Loaded", true);
- }
- private void SaveOutfitFunc(Ped ped)
- {
- int model1 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)0);
- int texture1 = Function.Call<int>(Hash._0xE131A28626F81AB2, (InputArgument)ped, (InputArgument)0);
- int model2 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)1);
- int texture2 = Function.Call<int>(Hash._0xE131A28626F81AB2, (InputArgument)ped, (InputArgument)1);
- int model3 = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)ped, (InputArgument)2);
- int texture3 = Function.Call<int>(Hash._0xE131A28626F81AB2, (InputArgument)ped, (InputArgument)2);
- int model4 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)3);
- int texture4 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)3);
- int model5 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)5);
- int texture5 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)5);
- int model6 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)4);
- int texture6 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)4);
- int model7 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)6);
- int texture7 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)6);
- int model8 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)7);
- int texture8 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)7);
- int model9 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)8);
- int texture9 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)8);
- int model10 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)9);
- int texture10 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)9);
- int model11 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)10);
- int texture11 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)10);
- int model12 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)ped, (InputArgument)11);
- int texture12 = Function.Call<int>(Hash._0x04A355E041E004E6, (InputArgument)ped, (InputArgument)11);
- this.outfit_XML_Element_Handle_Func(ped, "Head", 0, model1, texture1, true);
- this.outfit_XML_Element_Handle_Func(ped, "Eyes", 1, model2, texture2, true);
- this.outfit_XML_Element_Handle_Func(ped, "Ears", 2, model3, texture3, true);
- this.outfit_XML_Element_Handle_Func(ped, "Torso", 3, model4, texture4, false);
- this.outfit_XML_Element_Handle_Func(ped, "Hands", 5, model5, texture5, false);
- this.outfit_XML_Element_Handle_Func(ped, "Legs", 4, model6, texture6, false);
- this.outfit_XML_Element_Handle_Func(ped, "Feet", 6, model7, texture7, false);
- this.outfit_XML_Element_Handle_Func(ped, "Unknown", 7, model8, texture8, false);
- this.outfit_XML_Element_Handle_Func(ped, "Accessories", 8, model9, texture9, false);
- this.outfit_XML_Element_Handle_Func(ped, "Accessories2", 9, model10, texture10, false);
- this.outfit_XML_Element_Handle_Func(ped, "Decals", 10, model11, texture11, false);
- this.outfit_XML_Element_Handle_Func(ped, "Jbib", 11, model12, texture12, false);
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- UI.Notify("Outfit has been ~g~Successfully~w~ Saved", true);
- }
- private Prop bagModelReturn(Ped ped)
- {
- Prop[] nearbyProps1 = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey(this.bagModel));
- Prop[] nearbyProps2 = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey(this.bagModelFull));
- Prop prop1 = (Prop)null;
- if (((IEnumerable<Prop>)nearbyProps1).Count<Prop>() > 0)
- {
- foreach (Prop prop2 in nearbyProps1)
- {
- if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)ped))
- prop1 = prop2;
- }
- }
- else if (((IEnumerable<Prop>)nearbyProps2).Count<Prop>() > 0)
- {
- foreach (Prop prop2 in nearbyProps2)
- {
- if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)ped))
- prop1 = prop2;
- }
- }
- else
- prop1 = (Prop)null;
- return prop1;
- }
- private bool VehicleWithBag(Ped ped)
- {
- bool flag1 = false;
- bool flag2 = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag2 = true;
- }
- }
- if (!flag2)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- XElement xelement = this.doc.Element((XName)"WeaponList").Element((XName)str);
- if ((Entity)ped.CurrentVehicle != (Entity)null)
- {
- Function.Call<string>(Hash._0x7CE1CCB9B293020E, (InputArgument)ped.CurrentVehicle);
- Function.Call<string>(Hash._0xB215AAC32D25D019, (InputArgument)ped.CurrentVehicle.Model);
- 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))
- flag1 = true;
- }
- return flag1;
- }
- private bool isStrapAttachedToPed(Prop bag, Ped ped)
- {
- bool flag = false;
- Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
- {
- foreach (Prop prop in nearbyProps)
- {
- if ((Entity)prop != (Entity)null && prop.IsAttachedTo((Entity)bag))
- flag = true;
- }
- }
- return flag;
- }
- private void strapSet(Prop bag, Ped ped)
- {
- float num1 = -0.15f;
- float num2 = 0.14f;
- float num3 = 0.37f;
- float num4 = 60f;
- float num5 = -170f;
- float num6 = -60f;
- bool flag = false;
- Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
- {
- foreach (Prop prop in nearbyProps)
- {
- if ((Entity)prop != (Entity)null && !prop.IsAttachedTo((Entity)bag) && !prop.IsAttached())
- {
- int num7 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)bag, (InputArgument)0);
- bag.SetNoCollision((Entity)prop, false);
- 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);
- flag = true;
- }
- }
- if (flag)
- return;
- int num8 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)bag, (InputArgument)0);
- Prop prop1 = World.CreateProp((Model)this.GetHashKey("prop_cs_heist_bag_strap_01"), bag.Position, bag.Rotation, true, true);
- bag.SetNoCollision((Entity)prop1, false);
- 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);
- }
- else
- {
- int num7 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)bag, (InputArgument)0);
- Prop prop = World.CreateProp((Model)this.GetHashKey("prop_cs_heist_bag_strap_01"), bag.Position, bag.Rotation, true, true);
- bag.SetNoCollision((Entity)prop, false);
- 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);
- }
- }
- private void bagSet(string bagModelSend, Ped ped)
- {
- Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey(bagModelSend));
- Prop bag1 = this.bagModelReturn(ped);
- if (!((Entity)ped != (Entity)null))
- return;
- if (!this.isOccupied(ped))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)"puton_parachute", (InputArgument)3))
- {
- 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);
- this.soundFX(ped, "holdStrap.wav");
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57005);
- if ((Entity)this.bagModelReturn(ped) != (Entity)null)
- 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);
- }
- }
- Script.Wait(1000);
- int num1;
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)"puton_parachute", (InputArgument)3))
- num1 = (double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)ped, (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)"puton_parachute") == 0.300000011920929 ? 1 : 0;
- else
- num1 = 0;
- if (num1 != 0)
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"puton_parachute", (InputArgument)"oddjobs@basejump@ig_15", (InputArgument)3);
- if ((Entity)bag1 == (Entity)null)
- {
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
- {
- foreach (Prop bag2 in nearbyProps)
- {
- if ((Entity)bag2 != (Entity)null && !bag2.IsAttachedTo((Entity)ped) && !bag2.IsAttached())
- {
- bag2.SetNoCollision((Entity)ped, false);
- this.AttachBag(bag2, ped);
- if (this.drawStrap)
- this.strapSet(bag2, ped);
- }
- }
- }
- else
- {
- Prop prop = World.CreateProp((Model)this.GetHashKey(bagModelSend), ped.Position, ped.Rotation, true, true);
- if ((Entity)prop != (Entity)null)
- {
- prop.SetNoCollision((Entity)ped, false);
- this.AttachBag(prop, ped);
- if (this.drawStrap)
- this.strapSet(prop, ped);
- }
- }
- }
- else
- this.AttachBag(bag1, ped);
- bool flag = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"bag") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XAttribute((XName)"bag", (object)true));
- this.saveDoc();
- this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"bag").SetValue((object)true);
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"bag").SetValue((object)true);
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place") != null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place").RemoveAll();
- this.saveDoc();
- }
- }
- private void deleteStrap(Prop bag)
- {
- if (this.changedPosition)
- {
- World.GetNearbyProps(Game.Player.Character.Position, 2f, bag.Model);
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- {
- if (this.drawStrap)
- {
- Prop[] nearbyProps = World.GetNearbyProps(Game.Player.Character.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
- {
- foreach (Prop prop in nearbyProps)
- {
- if ((Entity)prop != (Entity)null && prop.IsAttachedTo((Entity)bag))
- prop.IsVisible = false;
- }
- }
- }
- }
- }
- }
- private void TakeOffBagInCar(Prop bag, Ped ped)
- {
- World.GetNearbyProps(ped.Position, 2f, bag.Model);
- if (!this.isOccupied(ped))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"enter", (InputArgument)3))
- {
- if (!ped.IsSittingInVehicle())
- ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, 2000, AnimationFlags.None);
- else
- ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, 1000, AnimationFlags.UpperBodyOnly);
- this.soundFX(ped, "holdStrap.wav");
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57005);
- bag = this.bagModelReturn(ped);
- if ((Entity)this.bagModelReturn(ped) != (Entity)null)
- {
- 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);
- if (this.drawStrap)
- {
- Prop[] nearbyProps = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
- if (((IEnumerable<Prop>)nearbyProps).Count<Prop>() > 0)
- {
- foreach (Prop prop in nearbyProps)
- {
- if ((Entity)prop != (Entity)null && prop.IsAttachedTo((Entity)bag))
- prop.IsVisible = false;
- }
- }
- }
- }
- Script.Wait(700);
- if (ped.IsSittingInVehicle())
- bag.IsVisible = false;
- }
- }
- this.canPutOnBagOnExit = true;
- }
- private void looseBagFunc(Ped ped, Prop bag)
- {
- bool flag = false;
- string str = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str));
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)nameof(bag)) == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XAttribute((XName)nameof(bag), (object)false));
- this.saveDoc();
- this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)nameof(bag)).SetValue((object)false);
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)nameof(bag)).SetValue((object)false);
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place") != null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Element((XName)"place").RemoveAll();
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Add((object)new XAttribute((XName)"holster", (object)false));
- this.saveDoc();
- this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)false);
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str).Attribute((XName)"holster").SetValue((object)false);
- this.saveDoc();
- }
- this.ClearInventoryData(ped);
- DisplayHelpTextThisFrame("~BLIP_INFO_ICON~ ~r~You've lost~w~ your gear");
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
- UI.Notify("~r~You've lost your gear", true);
- if (!((Entity)bag != (Entity)null) || !bag.IsAttachedTo((Entity)Game.Player.Character))
- return;
- bag.MarkAsNoLongerNeeded();
- bag.Detach();
- Function.Call(Hash._0xF25DF915FA38C5F3, (InputArgument)((Entity)Game.Player.Character), true);
- void DisplayHelpTextThisFrame(string text)
- {
- Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
- Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
- Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
- }
- }
- private void DropBagFunc(Ped ped, Prop bag)
- {
- Prop[] nearbyProps1 = World.GetNearbyProps(ped.Position, 2f, bag.Model);
- if (((IEnumerable<Prop>)nearbyProps1).Count<Prop>() > 0)
- {
- foreach (Prop prop1 in nearbyProps1)
- {
- if ((Entity)prop1 != (Entity)null && prop1.IsAttachedTo((Entity)ped))
- {
- if (this.drawStrap)
- {
- Prop[] nearbyProps2 = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
- if (((IEnumerable<Prop>)nearbyProps2).Count<Prop>() > 0)
- {
- foreach (Prop prop2 in nearbyProps2)
- {
- if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)bag))
- prop2.Delete();
- }
- }
- }
- prop1.Delete();
- }
- }
- }
- Prop prop = World.CreateProp((Model)this.stashedBagModel, new Vector3(ped.Position.X, ped.Position.Y, ped.Position.Z + 3f), true, true);
- bool flag = false;
- string str1 = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str1 = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str1 = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str1));
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)) == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Add((object)new XAttribute((XName)nameof(bag), (object)false));
- this.saveDoc();
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)).SetValue((object)false);
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)).SetValue((object)false);
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Add((object)new XElement((XName)"place"));
- this.saveDoc();
- }
- if (ped.IsSittingInVehicle())
- {
- string str2 = Function.Call<string>(Hash._0x7CE1CCB9B293020E, (InputArgument)ped.CurrentVehicle);
- string str3 = Function.Call<string>(Hash._0xB215AAC32D25D019, (InputArgument)ped.CurrentVehicle.Model);
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location") != null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Remove();
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Add((object)new XElement((XName)"Vehicle"));
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Add((object)new XAttribute((XName)"Name", (object)str3));
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name").SetValue((object)str3);
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Add((object)new XAttribute((XName)"Plate", (object)str2));
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate").SetValue((object)str2);
- this.saveDoc();
- }
- if (!((Entity)prop != (Entity)null))
- return;
- this.blipHandle(true, (Entity)ped.CurrentVehicle, BlipSprite.Information, "DuffleBag", 0.85f, 200, false, false);
- }
- else
- {
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle") != null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").RemoveAll();
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Add((object)new XElement((XName)"Location"));
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"X") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"X", (object)ped.Position.X));
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"X").SetValue((object)ped.Position.X);
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"Y", (object)ped.Position.Y));
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y").SetValue((object)ped.Position.Y);
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"Z", (object)ped.Position.Z));
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z").SetValue((object)ped.Position.Z);
- this.saveDoc();
- }
- if ((Entity)prop != (Entity)null)
- this.blipHandle(true, (Entity)prop, BlipSprite.Information, "DuffleBag", 0.85f, 200, false, false);
- }
- }
- private void bagRemove(Prop bag, Ped ped)
- {
- Prop[] nearbyProps1 = World.GetNearbyProps(ped.Position, 2f, bag.Model);
- if (!this.isOccupied(ped))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"enter", (InputArgument)3))
- {
- if (ped.IsSittingInVehicle())
- {
- if (this.bagModelReturn(ped).IsVisible)
- ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, 1000, AnimationFlags.UpperBodyOnly);
- else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"veh@driveby@first_person@passenger_rear_right_handed@smg", (InputArgument)"outro_0", (InputArgument)3))
- ped.Task.PlayAnimation("veh@driveby@first_person@passenger_rear_right_handed@smg", "outro_0", 8f, 1000, AnimationFlags.UpperBodyOnly);
- }
- this.soundFX(ped, "holdStrap.wav");
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57005);
- if ((Entity)this.bagModelReturn(ped) != (Entity)null)
- 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);
- }
- }
- if (((IEnumerable<Prop>)nearbyProps1).Count<Prop>() > 0)
- {
- foreach (Prop prop1 in nearbyProps1)
- {
- if ((Entity)prop1 != (Entity)null && prop1.IsAttachedTo((Entity)ped))
- {
- if (this.drawStrap)
- {
- Prop[] nearbyProps2 = World.GetNearbyProps(ped.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
- if (((IEnumerable<Prop>)nearbyProps2).Count<Prop>() > 0)
- {
- foreach (Prop prop2 in nearbyProps2)
- {
- if ((Entity)prop2 != (Entity)null && prop2.IsAttachedTo((Entity)bag))
- prop2.Delete();
- }
- }
- }
- prop1.Delete();
- }
- }
- }
- Prop prop = World.CreateProp((Model)this.stashedBagModel, new Vector3(ped.Position.X, ped.Position.Y, ped.Position.Z - 1f), true, false);
- bool flag = false;
- string str1 = "";
- foreach (PedHash allPedHash in this.allPedHashes)
- {
- if (ped.Model == (Model)allPedHash)
- {
- str1 = allPedHash.ToString();
- flag = true;
- }
- }
- if (!flag)
- str1 = ped.Model.ToString();
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1) == null)
- this.doc.Element((XName)"WeaponList").Add((object)new XElement((XName)str1));
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)) == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Add((object)new XAttribute((XName)nameof(bag), (object)false));
- this.saveDoc();
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)).SetValue((object)false);
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Attribute((XName)nameof(bag)).SetValue((object)false);
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Add((object)new XElement((XName)"place"));
- this.saveDoc();
- }
- if (ped.IsSittingInVehicle())
- {
- string str2 = Function.Call<string>(Hash._0x7CE1CCB9B293020E, (InputArgument)ped.CurrentVehicle);
- string str3 = Function.Call<string>(Hash._0xB215AAC32D25D019, (InputArgument)ped.CurrentVehicle.Model);
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location") != null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Remove();
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Add((object)new XElement((XName)"Vehicle"));
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Add((object)new XAttribute((XName)"Name", (object)str3));
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Name").SetValue((object)str3);
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Add((object)new XAttribute((XName)"Plate", (object)str2));
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").Attribute((XName)"Plate").SetValue((object)str2);
- this.saveDoc();
- }
- if (!((Entity)prop != (Entity)null))
- return;
- this.blipHandle(true, (Entity)ped.CurrentVehicle, BlipSprite.Information, "DuffleBag", 0.85f, 200, false, false);
- }
- else
- {
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle") != null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Vehicle").RemoveAll();
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Add((object)new XElement((XName)"Location"));
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"X") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"X", (object)ped.Position.X));
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"X").SetValue((object)ped.Position.X);
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"Y", (object)ped.Position.Y));
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Y").SetValue((object)ped.Position.Y);
- this.saveDoc();
- }
- if (this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z") == null)
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Add((object)new XAttribute((XName)"Z", (object)ped.Position.Z));
- this.saveDoc();
- }
- else
- {
- this.doc.Element((XName)"WeaponList").Element((XName)str1).Element((XName)"place").Element((XName)"Location").Attribute((XName)"Z").SetValue((object)ped.Position.Z);
- this.saveDoc();
- }
- if ((Entity)prop != (Entity)null)
- this.blipHandle(true, (Entity)prop, BlipSprite.Information, "DuffleBag", 0.85f, 200, false, false);
- }
- }
- private void AttachBag(Prop bag, Ped ped)
- {
- this.checkBagVisibility(ped);
- if (!((Entity)bag != (Entity)null) || !bag.Exists() || !((Entity)ped != (Entity)null) || !ped.Exists())
- return;
- if ((Entity)ped.CurrentVehicle != (Entity)null)
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)bag, (InputArgument)ped.CurrentVehicle, (InputArgument)true);
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- if (this.changedPosition)
- 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);
- else
- 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);
- }
- private void skydive(Ped ped, Prop bag, bool skyDiving)
- {
- if (!((Entity)bag != (Entity)null) || !bag.Exists() || !bag.IsAttachedTo((Entity)ped))
- return;
- if (skyDiving)
- {
- if (this.drawStrap)
- {
- foreach (Prop nearbyProp in World.GetNearbyProps(ped.Position, 10f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01")))
- {
- if ((Entity)nearbyProp != (Entity)null && nearbyProp.IsAttachedTo((Entity)bag))
- nearbyProp.IsVisible = false;
- }
- }
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- 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);
- }
- else
- {
- if (ped.IsOnFoot && !ped.IsRagdoll)
- {
- if (this.drawStrap)
- {
- foreach (Prop nearbyProp in World.GetNearbyProps(ped.Position, 10f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01")))
- {
- if ((Entity)nearbyProp != (Entity)null && nearbyProp.IsAttachedTo((Entity)bag))
- nearbyProp.IsVisible = true;
- }
- }
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"enter", (InputArgument)3))
- {
- ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, 500, AnimationFlags.UpperBodyOnly);
- this.soundFX(ped, "holdStrap.wav");
- }
- }
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- 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);
- }
- }
- private void diving(Ped ped, Prop bag, bool wearingGear)
- {
- if (!((Entity)bag != (Entity)null) || !bag.Exists() || !bag.IsAttachedTo((Entity)ped))
- return;
- if (wearingGear)
- {
- if (this.drawStrap)
- {
- foreach (Prop nearbyProp in World.GetNearbyProps(ped.Position, 10f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01")))
- {
- if ((Entity)nearbyProp != (Entity)null && nearbyProp.IsAttachedTo((Entity)bag))
- nearbyProp.IsVisible = false;
- }
- }
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- 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);
- }
- else
- {
- if (ped.IsOnFoot && !ped.IsRagdoll)
- {
- if (this.drawStrap)
- {
- foreach (Prop nearbyProp in World.GetNearbyProps(ped.Position, 10f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01")))
- {
- if ((Entity)nearbyProp != (Entity)null && nearbyProp.IsAttachedTo((Entity)bag))
- nearbyProp.IsVisible = true;
- }
- }
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"enter", (InputArgument)3))
- {
- AnimationFlags flags = AnimationFlags.UpperBodyOnly;
- ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, 500, flags);
- this.soundFX(ped, "holdStrap.wav");
- }
- }
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- 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);
- }
- }
- private void WeaponSwitchAnim(Ped ped)
- {
- 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>()))
- this.prevWeapon = Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)ped);
- if (this.isOccupied(ped))
- {
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)ped, (InputArgument)"cop_p1_rf_right_0", (InputArgument)"mp_arrest_paired", (InputArgument)3);
- }
- else
- {
- foreach (WeaponHash weaponHash in Enum.GetValues(typeof(WeaponHash)))
- {
- int num;
- if ((int)this.prevWeapon != (int)Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)ped))
- num = (WeaponHash)Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)ped) == weaponHash ? 1 : 0;
- else
- num = 0;
- if (num != 0)
- {
- this.prevWeapon = Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)ped);
- ped.Task.PlayAnimation("mp_arrest_paired", "cop_p1_rf_right_0", 8f, 500, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.soundFX(ped, "holdStrap.wav");
- }
- }
- }
- }
- private void WeaponCarryLimit()
- {
- Ped Player = Game.Player.Character;
- if (!this.hasBag)
- {
- if (Utilities.GetBigWeaponCount(Player) >= 2)
- {
- }
- if (Utilities.GetSmallWeaponCount(Player) >= 2)
- {
- }
- if (Utilities.GetExplosivesCount(Player) >= 2)
- {
- }
- if (Utilities.GetMeleeCount(Player) >= 2)
- {
- }
- if (Utilities.GetMiscCount(Player) >= 2)
- {
- }
- }
- }
- private void weaponInventoryAnim(Prop bag, Ped ped)
- {
- Prop prop = (Prop)null;
- if (!((Entity)bag != (Entity)null) || !bag.Exists() || !bag.IsAttachedTo((Entity)ped))
- return;
- if (ped.IsOnFoot && this.drawStrap)
- {
- foreach (Prop nearbyProp in World.GetNearbyProps(ped.Position, 10f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01")))
- {
- if ((Entity)nearbyProp != (Entity)null && nearbyProp.IsAttachedTo((Entity)bag))
- prop = nearbyProp;
- }
- }
- if (this.inMenu)
- {
- if (this.drawStrap && ((Entity)prop != (Entity)null && prop.IsVisible))
- prop.IsVisible = false;
- if (Game.Player.Character.IsOnFoot)
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"enter", (InputArgument)3))
- {
- ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "enter", 8f, -1, AnimationFlags.StayInEndFrame);
- this.soundFX(ped, "holdStrap.wav");
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)57005);
- 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);
- }
- }
- else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"veh@driveby@first_person@passenger_rear_right_handed@smg", (InputArgument)"outro_0", (InputArgument)3))
- {
- ped.Task.PlayAnimation("veh@driveby@first_person@passenger_rear_right_handed@smg", "outro_0", 8f, -1, AnimationFlags.UpperBodyOnly);
- this.soundFX(ped, "holdStrap.wav");
- }
- if (!this.followCamera)
- this.followCamera = true;
- }
- if (!this.inMenu)
- {
- if (this.followCamera)
- this.followCamera = false;
- if (Game.Player.Character.IsOnFoot)
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"exit", (InputArgument)3))
- {
- ped.Task.PlayAnimation("anim@heists@money_grab@duffel", "exit", 8f, -1, AnimationFlags.None);
- int num = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)ped, (InputArgument)24818);
- this.soundFX(ped, "holdStrap.wav");
- if (this.drawStrap && ((Entity)prop != (Entity)null && !prop.IsVisible))
- prop.IsVisible = true;
- Script.Wait(2000);
- if (!this.changedPosition)
- 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);
- else
- this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), this.changedPosition);
- ped.CanSwitchWeapons = true;
- }
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"anim@heists@money_grab@duffel", (InputArgument)"loop", (InputArgument)3))
- ped.Task.ClearAnimation("anim@heists@money_grab@duffel", "loop");
- }
- else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)ped, (InputArgument)"veh@driveby@first_person@passenger_rear_right_handed@smg", (InputArgument)"outro_0", (InputArgument)3))
- {
- ped.Task.PlayAnimation("veh@driveby@first_person@passenger_rear_right_handed@smg", "outro_0", 8f, -1, AnimationFlags.UpperBodyOnly);
- this.soundFX(ped, "holdStrap.wav");
- }
- ped.CanSwitchWeapons = true;
- }
- }
- public GTAExpansion()
- {
- this.Tick += new EventHandler(this.OnTick);
- this._iFruit = new CustomiFruit();
- this.callContact = new iFruitContact("Inventory menu");
- this.callContact.Answered += new ContactAnsweredEvent(this.ContactAnsweredDate);
- this.callContact.DialTimeout = 3;
- this.callContact.Active = true;
- this.callContact.Icon = ContactIcon.Ammunation;
- this.callContact.Bold = false;
- this._iFruit.Contacts.Add(this.callContact);
- }
- private void OnTick(object sender, EventArgs e)
- {
- if (!this.loaded)
- {
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"skydive@parachute@");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"skydive@parachute@"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"mp_arrest_paired");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"mp_arrest_paired"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"veh@driveby@first_person@passenger_rear_right_handed@smg");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"veh@driveby@first_person@passenger_rear_right_handed@smg"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"anim@heists@money_grab@duffel");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"anim@heists@money_grab@duffel"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"oddjobs@basejump@ig_15");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"oddjobs@basejump@ig_15"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"oddjobs@assassinate@construction@");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"oddjobs@assassinate@construction@"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"friends@frl@ig_1");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"friends@frl@ig_1"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xB80D8756B4668AB6, (InputArgument)"scr_safehouse");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0x8702416E512EC454, (InputArgument)"scr_safehouse"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_smoking@male@male_b@idle_a"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_smoking@male@male_a@exit");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_smoking@male@male_a@exit"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_leaning@female@smoke@exit");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_leaning@female@smoke@exit"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xB80D8756B4668AB6, (InputArgument)"scr_safehouse");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0x8702416E512EC454, (InputArgument)"scr_safehouse"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@world_human_smoking@male@male_a@enter");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@world_human_smoking@male@male_a@enter"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ps@base");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ps@base"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"mp_arrest_paired");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"mp_arrest_paired"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@code_human_in_car_mp_actions@first_person@smoke@std@ds@base"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"anim@amb@board_room@supervising@");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"anim@amb@board_room@supervising@"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"anim@cellphone@in_car@ds");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"anim@cellphone@in_car@ds"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"clothingspecs");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"clothingspecs"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"anim@mp_player_intupperface_palm");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"anim@mp_player_intupperface_palm"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"oddjobs@basejump@ig_15");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"oddjobs@basejump@ig_15"))
- Script.Wait(10);
- else
- break;
- }
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"move_m@intimidation@cop@unarmed");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"move_m@intimidation@cop@unarmed"))
- Script.Wait(10);
- else
- break;
- }
- this.blipsRemove(BlipSprite.Information);
- if ((Entity)Game.Player.Character != (Entity)null)
- this.prevWeapon = Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)Game.Player.Character);
- 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))
- this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
- if (!this.useHipHolster)
- {
- int num;
- if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_pistol_holster")))
- num = !Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_pistol_holster")) ? 1 : 0;
- else
- num = 0;
- if (num != 0)
- Function.Call(Hash._0x963D27A58DF860AC, (InputArgument)this.GetHashKey("prop_pistol_holster"));
- }
- else
- {
- int num;
- if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.GetHashKey("prop_holster_01")))
- num = !Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.GetHashKey("prop_holster_01")) ? 1 : 0;
- else
- num = 0;
- if (num != 0)
- Function.Call(Hash._0x963D27A58DF860AC, (InputArgument)this.GetHashKey("prop_holster_01"));
- }
- this.loaded = true;
- }
- if (this.GameTimeRef < Game.GameTime)
- {
- this.GameTimeRef = Game.GameTime + 1000;
- this.main_menu_btn = !Game.Player.Character.IsSittingInVehicle() ? this.main_menu_btn_on_foot : this.main_menu_btn_in_vehicle;
- if (this.inProcessCigsAndPills)
- {
- if (this.cigsAndPillsCounter > 0)
- {
- this.play_swallow_pills_anim = true;
- --this.cigsAndPillsCounter;
- }
- else
- {
- this.play_swallow_pills_anim = false;
- this.cigsAndPillsCounter = 0;
- }
- }
- else if (this.cigsAndPillsCountDown)
- {
- if (this.cigsAndPillsCounter > 0)
- --this.cigsAndPillsCounter;
- else
- this.cigsAndPillsCounter = 0;
- }
- int num1;
- 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))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
- {
- 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)
- {
- num1 = !this.startSmoke ? 1 : 0;
- goto label_112;
- }
- }
- }
- num1 = 0;
- label_112:
- if (num1 != 0 && 0 + 1 > 100)
- {
- this.smoke = -1;
- this.startSmoke = true;
- if ((Entity)this.cig != (Entity)null)
- {
- this.cig.MarkAsNoLongerNeeded();
- this.cig = (Prop)null;
- }
- }
- if (this.smoke != 1)
- {
- int num2;
- if ((Entity)this.cig == (Entity)null)
- 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;
- else
- num2 = 0;
- if (num2 != 0)
- {
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character))
- {
- if ((Entity)this.cig == (Entity)null)
- this.cig = prop;
- this.smoke = 1;
- this.startSmoke = false;
- }
- }
- }
- 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())
- {
- 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);
- int num2;
- if ((Entity)prop != (Entity)this.cig)
- num2 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) ? 1 : 0;
- else
- num2 = 0;
- if (num2 != 0 && prop.Exists())
- prop.Delete();
- }
- if (!Game.Player.Character.IsSittingInVehicle())
- {
- if (this.smoke == 1 && Game.Player.Character.IsAlive)
- {
- if ((Entity)this.cig == (Entity)null)
- {
- this.cig = World.CreateProp((Model)this.smokeType, Game.Player.Character.Position, true, false);
- if ((Entity)this.cig != (Entity)null)
- this.cig.IsVisible = false;
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.cig, (InputArgument)Game.Player.Character, (InputArgument)true);
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.cig, (InputArgument)Game.Player.Character.CurrentVehicle, (InputArgument)true);
- int num2 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)64017);
- if (Function.Call<bool>(Hash._0x6D9F5FAA7488BA46, (InputArgument)Game.Player.Character))
- 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);
- else
- 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);
- }
- if (this.startSmoke)
- this.StartSmokeFunc(Game.Player.Character, 1);
- if ((Entity)this.cig != (Entity)null && !this.startSmoke)
- {
- if (this.cig_durability > 0)
- {
- int num2;
- if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
- num2 = !Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character) ? 1 : 0;
- else
- num2 = 0;
- if (num2 != 0)
- {
- int num3;
- 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))
- {
- if (!Function.Call<bool>(Hash._0xBB062B2B5722478E, (InputArgument)Game.Player.Character) && !Game.Player.Character.IsDucking && (!Game.Player.Character.IsProne && !Game.Player.Character.IsInCombat))
- {
- if (!Function.Call<bool>(Hash._0x7C2AC9CA66575FBF, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0x00E73468D085F745, (InputArgument)Game.Player.Character))
- {
- num3 = !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) ? 1 : 0;
- goto label_157;
- }
- }
- }
- }
- num3 = 0;
- label_157:
- if (num3 != 0)
- this.SmokeLoopFunc(Game.Player.Character, 1);
- else
- this.PauseSmokeFunc(Game.Player.Character, 1);
- }
- this.SmokeProceEffectsFunc(Game.Player.Character, 1);
- }
- else
- this.StopSmokeFunc(Game.Player.Character, 1);
- }
- }
- else if (this.smoke == 0)
- this.StopSmokeFunc(Game.Player.Character, 1);
- }
- if (Game.Player.Character.IsSittingInVehicle())
- {
- if (this.smoke == 1 && Game.Player.Character.IsAlive && Game.Player.Character.IsSittingInVehicle())
- {
- if ((Entity)this.cig == (Entity)null)
- {
- this.cig = World.CreateProp((Model)this.smokeType, Game.Player.Character.Position, true, false);
- if ((Entity)this.cig != (Entity)null)
- this.cig.IsVisible = false;
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.cig, (InputArgument)Game.Player.Character, (InputArgument)true);
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.cig, (InputArgument)Game.Player.Character.CurrentVehicle, (InputArgument)true);
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- 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);
- 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);
- }
- if (this.startSmoke)
- this.StartSmokeFunc(Game.Player.Character, 2);
- if ((Entity)this.cig != (Entity)null && !this.startSmoke)
- {
- if (this.cig_durability > 0)
- {
- int num2;
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"weapon@w_sp_jerrycan", (InputArgument)"unholster", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"veh@driveby@first_person@driver@1h", (InputArgument)"outro_90l", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"veh@driveby@first_person@driver@1h", (InputArgument)"outro_0", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"cellphone@in_car@low@ds", (InputArgument)"cellphone_text_out", (InputArgument)3))
- {
- 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))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"veh@driveby@first_person@passenger_left_handed@1h", (InputArgument)"outro_0", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@veh@bike@police@front@base", (InputArgument)"horn_outro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player))
- {
- if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character) && !Game.IsDisabledControlPressed(2, Control.VehicleHandbrake) && !Game.IsDisabledControlPressed(2, Control.VehicleHorn))
- {
- num2 = !Game.IsDisabledControlPressed(2, Control.VehicleHeadlight) ? 1 : 0;
- goto label_191;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- num2 = 0;
- label_191:
- if (num2 != 0)
- this.SmokeLoopFunc(Game.Player.Character, 2);
- this.SmokeProceEffectsFunc(Game.Player.Character, 2);
- }
- else
- this.StopSmokeFunc(Game.Player.Character, 2);
- }
- }
- else if (this.smoke == 0)
- this.StopSmokeFunc(Game.Player.Character, 2);
- }
- if ((Entity)this.cig != (Entity)null)
- {
- int num2;
- 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))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_a@enter", (InputArgument)"enter", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_smoking@male@male_a@exit", (InputArgument)"exit", (InputArgument)3))
- {
- num2 = this.smoking ? 1 : 0;
- goto label_205;
- }
- }
- }
- num2 = 1;
- label_205:
- if (num2 != 0 && Game.Player.Character.Weapons.Current.Hash != WeaponHash.Unarmed)
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- }
- 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))
- {
- 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);
- if ((Entity)this.medbag != (Entity)null)
- this.canRefill = true;
- }
- else
- {
- this.medbag = (Prop)null;
- this.canRefill = false;
- }
- if (this.sellerDialogCounter > 0)
- --this.sellerDialogCounter;
- if (Game.Player.Character.IsDead)
- {
- if (this.doesPedHasInventoryBag(Game.Player.Character))
- this.looseBagFunc(Game.Player.Character, this.bagModelReturn(Game.Player.Character));
- }
- }
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.main_menu_btn) && !this.inMenu && (!this.inProcessWallet && !this.intimidation) && !this.deal && !this.findSellerOption)
- this.update_inventory_status(Game.Player.Character);
- Model model;
- if (Function.Call<bool>(Hash._0xE2587F8CBBD87B1D, (InputArgument)0, (InputArgument)this.main_menu_btn) && !this.inMenu && (!this.inProcessWallet && !this.intimidation) && !this.deal && !this.findSellerOption)
- {
- this.DisableControlsFunc(false);
- this.Draw(4, this.hasBag, this.canTakeBagFromVehicle, this.hasHolster, this.isBagBought, this.isBagDropped);
- if (this.hasBag)
- {
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.bag_menu_btn))
- this.inMenu = true;
- }
- else if (this.canTakeBagFromVehicle)
- {
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.bag_menu_btn))
- this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
- }
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.glasses_toggle_btn))
- {
- Game.Player.Character.Task.ClearAll();
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- this.soundFX(Game.Player.Character, "noise.wav");
- if (Game.Player.Character.Model.Hash == this.GetHashKey("PLAYER_ZERO"))
- {
- if (!this.glasses0)
- {
- if (!Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_a", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.PropsControlFunc(Game.Player.Character, "", true, "MICHAELES GLASSES", 2);
- this.glasses0 = true;
- Script.Wait(2000);
- Game.Player.CanControlCharacter = true;
- Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_a");
- }
- else
- {
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Script.Wait(500);
- this.PropsControlFunc(Game.Player.Character, "", true, "MICHAELES GLASSES", 2);
- this.glasses0 = true;
- }
- }
- else if (!Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_d", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MICHAELES GLASSES", 2);
- this.glasses0 = false;
- Script.Wait(1300);
- Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_d");
- Game.Player.CanControlCharacter = true;
- }
- else
- {
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Script.Wait(500);
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MICHAELES GLASSES", 2);
- this.glasses0 = false;
- }
- }
- if (Game.Player.Character.Model.Hash == this.GetHashKey("PLAYER_ONE"))
- {
- if (!this.glasses1)
- {
- if (!Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_a", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.PropsControlFunc(Game.Player.Character, "", true, "FRANKLINS GLASSES", 2);
- this.glasses1 = true;
- Script.Wait(2000);
- Game.Player.CanControlCharacter = true;
- Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_a");
- }
- else
- {
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Script.Wait(500);
- this.PropsControlFunc(Game.Player.Character, "", true, "FRANKLINS GLASSES", 2);
- this.glasses1 = true;
- }
- }
- else if (!Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_d", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "FRANKLINS GLASSES", 2);
- this.glasses1 = false;
- Script.Wait(1300);
- Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_d");
- Game.Player.CanControlCharacter = true;
- }
- else
- {
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Script.Wait(500);
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "FRANKLINS GLASSES", 2);
- this.glasses1 = false;
- }
- }
- if (Game.Player.Character.Model.Hash == this.GetHashKey("PLAYER_TWO"))
- {
- if (!this.glasses2)
- {
- if (!Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_a", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.PropsControlFunc(Game.Player.Character, "", true, "TREVORS GLASSES", 2);
- this.glasses2 = true;
- Script.Wait(2000);
- Game.Player.CanControlCharacter = true;
- Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_a");
- }
- else
- {
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Script.Wait(500);
- this.PropsControlFunc(Game.Player.Character, "", true, "TREVORS GLASSES", 2);
- this.glasses2 = true;
- }
- }
- else if (!Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_d", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "TREVORS GLASSES", 2);
- this.glasses2 = false;
- Script.Wait(1300);
- Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_d");
- Game.Player.CanControlCharacter = true;
- }
- else
- {
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Script.Wait(500);
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "TREVORS GLASSES", 2);
- this.glasses2 = false;
- }
- }
- if (Game.Player.Character.Model.Hash == this.GetHashKey("mp_m_freemode_01"))
- {
- if (!this.glasses3)
- {
- if (!Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_a", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLASSES", 2);
- this.glasses3 = true;
- Script.Wait(2000);
- Game.Player.CanControlCharacter = true;
- Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_a");
- }
- else
- {
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Script.Wait(500);
- this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLASSES", 2);
- this.glasses3 = true;
- }
- }
- else if (!Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_d", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLASSES", 2);
- this.glasses3 = false;
- Script.Wait(1300);
- Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_d");
- Game.Player.CanControlCharacter = true;
- }
- else
- {
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Script.Wait(500);
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLASSES", 2);
- this.glasses3 = false;
- }
- }
- if (Game.Player.Character.Model.Hash == this.GetHashKey("mp_f_freemode_01"))
- {
- if (!this.glasses4)
- {
- if (!Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_a", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLASSES", 2);
- this.glasses3 = true;
- Script.Wait(2000);
- Game.Player.CanControlCharacter = true;
- Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_a");
- }
- else
- {
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Script.Wait(500);
- this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLASSES", 2);
- this.glasses3 = true;
- }
- }
- else if (!Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.PlayAnimation("clothingspecs", "try_glasses_positive_d", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLASSES", 2);
- this.glasses3 = false;
- Script.Wait(1300);
- Game.Player.Character.Task.ClearAnimation("clothingspecs", "try_glasses_positive_d");
- Game.Player.CanControlCharacter = true;
- }
- else
- {
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- Script.Wait(500);
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLASSES", 2);
- this.glasses3 = false;
- }
- }
- }
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.gloves_toggle_btn))
- {
- Game.Player.Character.Task.ClearAll();
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- Script.Wait(100);
- Game.Player.Character.Task.PlayAnimation("switch@michael@closet", "closet_c", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.soundFX(Game.Player.Character, "noise.wav");
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
- {
- if (!this.gloves0)
- {
- this.PropsControlFunc(Game.Player.Character, "", true, "MICHAELES GLOVES", 1);
- this.gloves0 = true;
- }
- else
- {
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MICHAELES GLOVES", 1);
- this.gloves0 = false;
- }
- }
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ONE"))
- {
- if (!this.gloves1)
- {
- this.PropsControlFunc(Game.Player.Character, "", true, "FRANKLINS GLOVES", 1);
- this.gloves1 = true;
- }
- else
- {
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "FRANKLINS GLOVES", 1);
- this.gloves1 = false;
- }
- }
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_TWO"))
- {
- if (!this.gloves2)
- {
- this.PropsControlFunc(Game.Player.Character, "", true, "TREVORS GLOVES", 1);
- this.gloves2 = true;
- }
- else
- {
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "TREVORS GLOVES", 1);
- this.gloves2 = false;
- }
- }
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("mp_m_freemode_01"))
- {
- if (!this.gloves3)
- {
- this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLOVES", 1);
- this.gloves3 = true;
- }
- else
- {
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLOVES", 1);
- this.gloves3 = false;
- }
- }
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("mp_f_freemode_01"))
- {
- if (!this.gloves4)
- {
- this.PropsControlFunc(Game.Player.Character, "", true, "MPS GLOVES", 1);
- this.gloves4 = true;
- }
- else
- {
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS GLOVES", 1);
- this.gloves4 = false;
- }
- }
- Script.Wait(2000);
- Game.Player.Character.Task.ClearAnimation("switch@michael@closet", "closet_c");
- }
- if (Function.Call<bool>(Hash._0x580417101DDB492F, (InputArgument)0, (InputArgument)this.mask_toggle_btn))
- {
- Game.Player.Character.Task.ClearAll();
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- Script.Wait(100);
- int num;
- if (Game.Player.Character.IsSittingInVehicle())
- {
- if (!Function.Call<bool>(Hash._0x39DAC362EE65FA28, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
- {
- if (!Function.Call<bool>(Hash._0xBF94DD42F63BDED2, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
- {
- num = !Function.Call<bool>(Hash._0x94495889E22C6479, (InputArgument)Game.Player.Character) ? 1 : 0;
- goto label_323;
- }
- }
- }
- num = 0;
- label_323:
- if (num != 0)
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- else if (!Game.Player.Character.IsSittingInVehicle())
- Game.Player.Character.Task.PlayAnimation("anim@mp_player_intupperface_palm", "exit", 8f, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- this.soundFX(Game.Player.Character, "noise.wav");
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
- {
- if (!this.mask0)
- {
- this.PropsControlFunc(Game.Player.Character, "", true, "MICHAELES MASK", 1);
- this.mask0 = true;
- }
- else
- {
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MICHAELES MASK", 1);
- this.mask0 = false;
- }
- }
- else
- {
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ONE"))
- {
- if (!this.mask1)
- {
- this.PropsControlFunc(Game.Player.Character, "", true, "FRANKLINS MASK", 1);
- this.mask1 = true;
- }
- else
- {
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "FRANKLINS MASK", 1);
- this.mask1 = false;
- }
- }
- else
- {
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_TWO"))
- {
- if (!this.mask2)
- {
- this.PropsControlFunc(Game.Player.Character, "", true, "TREVORS MASK", 1);
- this.mask2 = true;
- }
- else
- {
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "TREVORS MASK", 1);
- this.mask2 = false;
- }
- }
- else
- {
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("mp_m_freemode_01"))
- {
- if (!this.mask3)
- {
- this.PropsControlFunc(Game.Player.Character, "", true, "MPS MASK", 1);
- this.mask3 = true;
- }
- else
- {
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS MASK", 1);
- this.mask3 = false;
- }
- }
- else
- {
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("mp_f_freemode_01"))
- {
- if (!this.mask4)
- {
- this.PropsControlFunc(Game.Player.Character, "", true, "MPS MASK", 1);
- this.mask4 = true;
- }
- else
- {
- this.PropsControlFunc(Game.Player.Character, "OFF", false, "MPS MASK", 1);
- this.mask4 = false;
- }
- }
- }
- }
- }
- }
- }
- int num1;
- if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0xE3B6097CC25AA69E, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)Game.Player.Character))
- {
- num1 = !Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player) ? 1 : 0;
- goto label_354;
- }
- }
- }
- num1 = 0;
- label_354:
- if (num1 != 0)
- {
- model = Game.Player.Character.Model;
- int num2;
- if (model.Hash != this.GetHashKey("mp_m_freemode_01"))
- {
- model = Game.Player.Character.Model;
- if (model.Hash != this.GetHashKey("mp_f_freemode_01"))
- {
- model = Game.Player.Character.Model;
- if (model.Hash != this.GetHashKey("PLAYER_ZERO"))
- {
- model = Game.Player.Character.Model;
- if (model.Hash != this.GetHashKey("PLAYER_ONE"))
- {
- model = Game.Player.Character.Model;
- num2 = model.Hash == this.GetHashKey("PLAYER_TWO") ? 1 : 0;
- goto label_361;
- }
- }
- }
- }
- num2 = 1;
- label_361:
- if (num2 != 0)
- this.headset = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)Game.Player.Character, (InputArgument)2) == 0;
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.earphone_toggle_btn))
- {
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- Script.Wait(100);
- int num3;
- if (Game.Player.Character.IsSittingInVehicle())
- {
- if (!Function.Call<bool>(Hash._0x39DAC362EE65FA28, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
- {
- if (!Function.Call<bool>(Hash._0xBF94DD42F63BDED2, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
- {
- num3 = !Function.Call<bool>(Hash._0x94495889E22C6479, (InputArgument)Game.Player.Character) ? 1 : 0;
- goto label_369;
- }
- }
- }
- num3 = 0;
- label_369:
- if (num3 != 0)
- {
- Game.Player.Character.Task.ClearAll();
- 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);
- }
- else if (!Game.Player.Character.IsSittingInVehicle())
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)3))
- 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);
- }
- this.soundFX(Game.Player.Character, "beep.wav");
- if (!this.headset)
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- UI.Notify("Mobile radio is ~g~available", true);
- if (Function.Call<bool>(Hash._0x2B16A3BFF1FBCE49, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)0, (InputArgument)0))
- Function.Call(Hash._0x93376B65A266EB5F, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)0, (InputArgument)0);
- else
- UI.Notify("Invalid Prop number", true);
- this.headset = true;
- if (this.headset && !Function.Call<bool>(Hash._0xB35CE999E8EF317E, Array.Empty<InputArgument>()))
- {
- Function.Call(Hash._0x1098355A16064BB3, (InputArgument)true);
- Function.Call(Hash._0xA619B168B8A8570F, (InputArgument)((int)byte.MaxValue));
- }
- }
- else
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
- UI.Notify("Mobile radio is ~o~unavailable", true);
- Function.Call(Hash._0x0943E5B8E078E76E, (InputArgument)Game.Player.Character, (InputArgument)2);
- this.headset = false;
- Function.Call(Hash._0xC69EDA28699D5107, (InputArgument)"OFF");
- Function.Call(Hash._0x1098355A16064BB3, (InputArgument)false);
- }
- }
- int num4;
- if (this.headset)
- {
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.readio_off_btn))
- {
- if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0xE3B6097CC25AA69E, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)Game.Player.Character))
- {
- num4 = !Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player) ? 1 : 0;
- goto label_390;
- }
- }
- }
- }
- }
- num4 = 0;
- label_390:
- if (num4 != 0)
- {
- int num3;
- if (Game.Player.Character.IsSittingInVehicle())
- {
- if (!Function.Call<bool>(Hash._0x39DAC362EE65FA28, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
- {
- if (!Function.Call<bool>(Hash._0xBF94DD42F63BDED2, (InputArgument)Function.Call<int>(Hash._0x9F47B058362C84B5, (InputArgument)Game.Player.Character.CurrentVehicle)))
- {
- num3 = !Function.Call<bool>(Hash._0x94495889E22C6479, (InputArgument)Game.Player.Character) ? 1 : 0;
- goto label_396;
- }
- }
- }
- num3 = 0;
- label_396:
- if (num3 != 0)
- {
- Game.Player.Character.Task.ClearAll();
- 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);
- }
- else if (!Game.Player.Character.IsSittingInVehicle())
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)3))
- 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);
- }
- if (!Function.Call<bool>(Hash._0xB35CE999E8EF317E, Array.Empty<InputArgument>()))
- {
- Function.Call(Hash._0x1098355A16064BB3, (InputArgument)true);
- if (this.prevStation != (int)byte.MaxValue)
- Function.Call(Hash._0xA619B168B8A8570F, (InputArgument)this.prevStation);
- else
- Function.Call(Hash._0xA619B168B8A8570F, (InputArgument)0);
- this.soundFX(Game.Player.Character, "beep.wav");
- }
- else
- {
- this.soundFX(Game.Player.Character, "beep.wav");
- this.prevStation = Function.Call<int>(Hash._0xE8AF77C4C06ADC93, Array.Empty<InputArgument>());
- Function.Call(Hash._0xA619B168B8A8570F, (InputArgument)((int)byte.MaxValue));
- Function.Call(Hash._0x1098355A16064BB3, (InputArgument)false);
- }
- }
- }
- int num5;
- if (Function.Call<bool>(Hash._0xE2587F8CBBD87B1D, (InputArgument)0, (InputArgument)this.wallet_btn))
- {
- if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character) && Game.Player.Character.IsOnFoot && !Game.Player.Character.IsRagdoll)
- {
- num5 = !this.smoking ? 1 : 0;
- goto label_414;
- }
- }
- num5 = 0;
- label_414:
- if (num5 != 0)
- {
- int num2;
- if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player.Character))
- {
- num2 = !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) ? 1 : 0;
- goto label_419;
- }
- }
- num2 = 0;
- label_419:
- 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))
- {
- this.inProcessWallet = true;
- this.walletCount = false;
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- Function.Call(Hash._0xBAF20C5432058024, (InputArgument)Game.Player.Character, (InputArgument)false);
- int num3;
- 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))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
- {
- 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))
- {
- num3 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_player_inteat@pnq", (InputArgument)"loop_fp", (InputArgument)3) ? 1 : 0;
- goto label_425;
- }
- }
- }
- num3 = 0;
- label_425:
- if (num3 != 0)
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- {
- 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);
- Script.Wait(500);
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- Game.Player.Character.Task.ClearAnimation("mp_arrest_paired", "cop_p1_rf_right_0");
- }
- this.soundFX(Game.Player.Character, "grab.wav");
- this.wallet = World.CreateProp((Model)"prop_ld_wallet_02", Game.Player.Character.Position, true, false);
- this.walletOpened = World.CreateProp((Model)"prop_ld_wallet_pickup", Game.Player.Character.Position, true, false);
- Function.Call(Hash._0xA53ED5520C07654A, (InputArgument)this.wallet, (InputArgument)Game.Player.Character, (InputArgument)true);
- int num4 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)36029);
- int num6 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)6286);
- int num7;
- if ((Entity)this.wallet == (Entity)null)
- 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;
- else
- num7 = 0;
- if (num7 != 0)
- {
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) && (Entity)this.wallet == (Entity)null)
- this.wallet = prop;
- }
- int num8;
- if ((Entity)this.walletOpened == (Entity)null)
- 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;
- else
- num8 = 0;
- if (num8 != 0)
- {
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) && (Entity)this.walletOpened == (Entity)null)
- this.walletOpened = prop;
- }
- 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())
- {
- 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);
- int num9;
- if ((Entity)prop != (Entity)this.wallet)
- num9 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) ? 1 : 0;
- else
- num9 = 0;
- if (num9 != 0 && prop.Exists())
- prop.Delete();
- }
- 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())
- {
- 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);
- int num9;
- if ((Entity)prop != (Entity)this.walletOpened)
- num9 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) ? 1 : 0;
- else
- num9 = 0;
- if (num9 != 0 && prop.Exists())
- prop.Delete();
- }
- if ((Entity)this.wallet != (Entity)null && this.wallet.Exists())
- {
- 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);
- this.wallet.IsVisible = true;
- }
- if ((Entity)this.walletOpened != (Entity)null && this.wallet.Exists())
- {
- 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);
- this.walletOpened.IsVisible = false;
- }
- Script.Wait(700);
- this.walletCount = true;
- }
- }
- }
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.smokeBTN) && !this.inProcessCigsAndPills)
- {
- if (this.cigsCount > 0)
- {
- this.checkMask(Game.Player.Character);
- if (!this.MaskIsOn && !Game.Player.Character.IsWearingHelmet)
- {
- Game.Player.Character.Task.ClearAll();
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- if (this.smoke == -1 || this.smoke == 0)
- {
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- 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)))
- 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();
- if (!this.MaskIsOn)
- {
- this.smoke = 1;
- this.startSmoke = true;
- this.cigsAndPillsCounter = 9;
- if (!this.playCigAndSmokeAnim)
- this.playCigAndSmokeAnim = true;
- }
- }
- else if (this.smoke == 1)
- this.smoke = 0;
- }
- else
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
- UI.Notify("~o~Put off your mask or helmet first", true);
- }
- }
- else
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
- UI.Notify("Cigs: ~r~0", true);
- }
- }
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.swallowBTN) && !this.inProcessCigsAndPills)
- {
- if (this.pillsCount > 0)
- {
- this.checkMask(Game.Player.Character);
- if (!this.MaskIsOn && !Game.Player.Character.IsWearingHelmet)
- {
- int num2;
- if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player.Character))
- {
- num2 = !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) ? 1 : 0;
- goto label_487;
- }
- }
- num2 = 0;
- label_487:
- if (num2 != 0)
- {
- int num3;
- 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))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"amb@world_human_leaning@female@smoke@idle_a", (InputArgument)"idle_b", (InputArgument)3))
- {
- 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))
- {
- num3 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_player_inteat@pnq", (InputArgument)"loop_fp", (InputArgument)3) ? 1 : 0;
- goto label_493;
- }
- }
- }
- num3 = 0;
- label_493:
- if (num3 != 0)
- {
- Function.Call(Hash._0xBAF20C5432058024, (InputArgument)Game.Player.Character, (InputArgument)false);
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- if (Game.Player.Character.IsSittingInVehicle())
- {
- int num4;
- if (Game.Player.Character.IsSittingInVehicle())
- {
- if (Function.Call<bool>(Hash._0x7F6DB52EEFC96DF8, (InputArgument)Game.Player.Character.CurrentVehicle.Model))
- {
- num4 = !Game.Player.Character.IsDoingDriveBy ? 1 : 0;
- goto label_499;
- }
- }
- num4 = 0;
- label_499:
- if (num4 != 0)
- {
- Game.Player.Character.Task.ClearAll();
- this.inProcessCigsAndPills = true;
- this.cigsAndPillsCounter = 15;
- this.blockKeys = true;
- }
- }
- else
- {
- Game.Player.Character.Task.ClearAll();
- this.inProcessCigsAndPills = true;
- this.cigsAndPillsCounter = 15;
- this.blockKeys = true;
- }
- }
- }
- }
- else
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
- UI.Notify("~o~Put off your mask or helmet first", true);
- }
- }
- else
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)0, (InputArgument)100);
- UI.Notify("Pills: ~r~0", true);
- }
- }
- int num10;
- if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0xE3B6097CC25AA69E, (InputArgument)Game.Player.Character))
- {
- num10 = !Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player) ? 1 : 0;
- goto label_511;
- }
- }
- num10 = 0;
- label_511:
- if (num10 != 0)
- {
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.intimidate_btn))
- {
- int num2;
- if (this.hasHolster && (Entity)this.holster != (Entity)null && this.holster.Exists())
- num2 = Function.Call<uint>(Hash._0x0A6DB4965674D243, (InputArgument)Game.Player.Character) == 2725352035U ? 1 : 0;
- else
- num2 = 0;
- if (num2 != 0)
- {
- if (this.intimidation)
- {
- Array.Clear((Array)this.closestPeds, 0, this.closestPeds.Length);
- int num3;
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- num3 = Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3) ? 1 : 0;
- goto label_522;
- }
- }
- num3 = 1;
- label_522:
- if (num3 != 0)
- {
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"idle", (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)3);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"intro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"outro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
- }
- }
- else
- {
- int num3;
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- num3 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3) ? 1 : 0;
- goto label_528;
- }
- }
- num3 = 0;
- label_528:
- if (num3 != 0)
- {
- this.AttackSpeech(Game.Player.Character);
- Game.Player.Character.CanPlayGestures = false;
- this.GetClosestPedDetectionFunction(Game.Player.Character);
- Game.Player.Character.Task.PlayAnimation("move_m@intimidation@cop@unarmed", "idle", 12f, -1, AnimationFlags.StayInEndFrame | AnimationFlags.AllowRotation | AnimationFlags.CancelableWithMovement);
- this.intimidation = true;
- }
- }
- }
- }
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)this.holster_toggle_btn) && this.hasHolster)
- {
- if (!this.useHipHolster)
- {
- 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())
- {
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character))
- {
- this.holster = prop;
- this.AttachPistol(Game.Player.Character);
- this.UnsetHolster(Game.Player.Character);
- }
- else
- this.SetHolster(Game.Player.Character);
- }
- else
- this.SetHolster(Game.Player.Character);
- }
- 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())
- {
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character))
- {
- this.holster = prop;
- this.AttachPistol(Game.Player.Character);
- this.UnsetHolster(Game.Player.Character);
- }
- else
- this.SetHolster(Game.Player.Character);
- }
- else
- this.SetHolster(Game.Player.Character);
- }
- }
- }
- if (this.customHolsterAnim && (Entity)this.bagModelReturn(Game.Player.Character) == (Entity)null)
- {
- int num1;
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
- {
- num1 = Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3) ? 1 : 0;
- goto label_555;
- }
- }
- }
- num1 = 1;
- label_555:
- if (num1 != 0 && this.isOccupied(Game.Player.Character))
- {
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"idle", (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)3);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"intro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"outro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
- }
- if ((double)Function.Call<float>(Hash._0x346D81500D088F42, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro") > 0.2)
- {
- int num2;
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3))
- {
- num2 = Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3) ? 1 : 0;
- goto label_563;
- }
- }
- }
- num2 = 1;
- label_563:
- if (num2 != 0)
- {
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"idle", (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)3);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"intro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"outro", (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)3);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"cop_p1_rf_right_0", (InputArgument)"mp_arrest_paired", (InputArgument)3);
- }
- }
- int num3;
- if ((Entity)this.holster != (Entity)null && this.holster.Exists() && (this.holsterSet && !this.isOccupied(Game.Player.Character)))
- num3 = !Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character) ? 1 : 0;
- else
- num3 = 0;
- if (num3 != 0)
- {
- int num2;
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
- {
- num2 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3) ? 1 : 0;
- goto label_574;
- }
- }
- num2 = 0;
- label_574:
- if (num2 != 0)
- {
- if (this.prevPistol != this.choosenPistol)
- {
- this.prevPistol = this.choosenPistol;
- if (!Game.Player.Character.IsSittingInVehicle())
- {
- if (!Function.Call<bool>(Hash._0x7C2AC9CA66575FBF, (InputArgument)Game.Player.Character) && !Game.Player.Character.IsInCombat && !Game.Player.Character.IsDucking)
- {
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"cop_p1_rf_right_0", (InputArgument)"mp_arrest_paired", (InputArgument)3);
- 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);
- }
- else if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- 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);
- Script.Wait(400);
- this.soundFX(Game.Player.Character, "holster.wav");
- }
- }
- }
- else
- this.prevPistol = this.choosenPistol;
- }
- }
- if (this.intimidation)
- {
- this.Draw(4, false, false, false, false, false);
- this.DisableControlsFunc(false);
- int num1;
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- num1 = !Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3) ? 1 : 0;
- goto label_594;
- }
- }
- num1 = 0;
- label_594:
- if (num1 != 0)
- {
- Game.Player.Character.Task.PlayAnimation("move_m@intimidation@cop@unarmed", "idle", 12f, -1, AnimationFlags.StayInEndFrame | AnimationFlags.AllowRotation | AnimationFlags.CancelableWithMovement);
- }
- else
- {
- int num2;
- if (Game.IsDisabledControlJustPressed(2, Control.Attack))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"move_m@intimidation@cop@unarmed", (InputArgument)"idle", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"intro", (InputArgument)3))
- {
- num2 = Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"reaction@intimidation@cop@unarmed", (InputArgument)"outro", (InputArgument)3) ? 1 : 0;
- goto label_602;
- }
- }
- num2 = 1;
- }
- else
- num2 = 0;
- label_602:
- if (num2 != 0)
- {
- this.AttackSpeech(Game.Player.Character);
- this.GetClosestPedDetectionFunction(Game.Player.Character);
- }
- else if (Game.IsDisabledControlPressed(2, Control.Aim))
- {
- this.intimidation = false;
- Game.Player.Character.Task.ClearAll();
- }
- }
- }
- Vector3 position1;
- if (this.holsterTimerCounterLong < Game.GameTime)
- {
- this.holsterTimerCounterLong = Game.GameTime + 5000;
- if ((Entity)this.target != (Entity)null)
- {
- position1 = this.target.Position;
- if ((double)position1.DistanceTo(Game.Player.Character.Position) > 50.0 || !this.target.Exists() || this.target.IsDead)
- this.target.MarkAsNoLongerNeeded();
- this.target = (Ped)null;
- }
- int num1;
- if ((Entity)this.holster != (Entity)null && this.holster.Exists())
- num1 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)this.holster, (InputArgument)Game.Player.Character) ? 1 : 0;
- else
- num1 = 0;
- if (num1 != 0 && (this.worldPistolModel != 0 && (Entity)this.HolstedPistol != (Entity)null && this.HolstedPistol.Exists()))
- {
- this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.Pistol, "w_pi_pistol");
- this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.CombatPistol, "w_pi_combatpistol");
- this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.APPistol, "w_pi_appistol");
- this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.Pistol50, "w_pi_pistol50");
- this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.HeavyPistol, "w_pi_heavypistol");
- this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.VintagePistol, "w_pi_vintage_pistol");
- this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.Revolver, "w_pi_revolver");
- this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.PistolMk2, "w_pi_pistolmk2");
- this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.RevolverMk2, "w_pi_revolvermk2");
- this.removeHolstedPistolFunc(Game.Player.Character, this.HolstedPistol, WeaponHash.DoubleActionRevolver, "w_pi_wep1_gun");
- }
- if (!this.check)
- {
- this.GetHolsterPropFunction(Game.Player.Character);
- this.check = true;
- }
- int num2;
- if ((Entity)this.HolstedPistol == (Entity)null && this.worldPistolModel == 0 && ((Entity)this.holster != (Entity)null && this.holster.Exists()))
- num2 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)this.holster, (InputArgument)Game.Player.Character) ? 1 : 0;
- else
- num2 = 0;
- if (num2 != 0)
- {
- this.checkPistolFunc(Game.Player.Character, WeaponHash.Pistol, "w_pi_pistol");
- this.checkPistolFunc(Game.Player.Character, WeaponHash.CombatPistol, "w_pi_combatpistol");
- this.checkPistolFunc(Game.Player.Character, WeaponHash.APPistol, "w_pi_appistol");
- this.checkPistolFunc(Game.Player.Character, WeaponHash.Pistol50, "w_pi_pistol50");
- this.checkPistolFunc(Game.Player.Character, WeaponHash.HeavyPistol, "w_pi_heavypistol");
- this.checkPistolFunc(Game.Player.Character, WeaponHash.VintagePistol, "w_pi_vintage_pistol");
- this.checkPistolFunc(Game.Player.Character, WeaponHash.Revolver, "w_pi_revolver");
- this.checkPistolFunc(Game.Player.Character, WeaponHash.PistolMk2, "w_pi_pistolmk2");
- this.checkPistolFunc(Game.Player.Character, WeaponHash.RevolverMk2, "w_pi_revolvermk2");
- this.checkPistolFunc(Game.Player.Character, WeaponHash.DoubleActionRevolver, "w_pi_wep1_gun");
- }
- if ((Entity)this.HolstedPistol == (Entity)null || (Entity)this.holster == (Entity)null || (Game.Player.Character.IsDead || Game.IsScreenFadingIn) || Game.IsScreenFadingOut)
- {
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistol");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_combatpistol");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_appistol");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistol50");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_heavypistol");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_vintage_pistol");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_revolver");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_pistolmk2");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_revolvermk2");
- this.checkPistolAfterScriptReload(Game.Player.Character, "w_pi_wep1_gun");
- }
- if ((Entity)this.holster == (Entity)null)
- {
- 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))
- {
- 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))
- {
- this.HolstedPistol.Delete();
- this.HolstedPistol = (Prop)null;
- }
- }
- }
- }
- if ((Entity)this.HolstedPistolPrev != (Entity)null && !this.HolstedPistolPrev.IsAttached())
- {
- this.HolstedPistolPrev.Delete();
- this.HolstedPistolPrev = (Prop)null;
- }
- if (this.holsterTimerCounterShort < Game.GameTime)
- {
- this.holsterTimerCounterShort = Game.GameTime + 500;
- int num1 = Function.Call<int>(Hash._0x0A6DB4965674D243, (InputArgument)Game.Player.Character);
- int num2;
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_fall", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_idle", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_a", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_b", (InputArgument)3))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_c", (InputArgument)3))
- {
- num2 = Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"missmic2@meat_hook", (InputArgument)"michael_meat_hook_react_d", (InputArgument)3) ? 1 : 0;
- goto label_643;
- }
- }
- }
- }
- }
- num2 = 1;
- label_643:
- if (num2 != 0)
- {
- this.holsterSet = false;
- if ((Entity)this.holster != (Entity)null && this.holster.Exists())
- {
- this.holster.Delete();
- this.holster = (Prop)null;
- }
- if ((Entity)this.holster != (Entity)null && this.holster.Exists())
- {
- this.HolstedPistol.Delete();
- this.HolstedPistol = (Prop)null;
- }
- }
- if (this.holsterSet && (Entity)this.holster != (Entity)null && this.holster.Exists() && this.holster.IsAttachedTo((Entity)Game.Player.Character))
- {
- this.IconHolsterDrawFunc(Game.Player.Character);
- if (num1 == 453432689)
- this.worldPistolModel = this.GetHashKey("w_pi_pistol");
- if (num1 == 1593441988)
- this.worldPistolModel = this.GetHashKey("w_pi_combatpistol");
- if (num1 == 584646201)
- this.worldPistolModel = this.GetHashKey("w_pi_appistol");
- if (num1 == -1716589765)
- this.worldPistolModel = this.GetHashKey("w_pi_pistol50");
- if (num1 == -771403250)
- this.worldPistolModel = this.GetHashKey("w_pi_heavypistol");
- if (num1 == 137902532)
- this.worldPistolModel = this.GetHashKey("w_pi_vintage_pistol");
- if (num1 == -1045183535)
- this.worldPistolModel = this.GetHashKey("w_pi_revolver");
- if (num1 == -1075685676)
- this.worldPistolModel = this.GetHashKey("w_pi_pistolmk2");
- if (num1 == -879347409)
- this.worldPistolModel = this.GetHashKey("w_pi_revolvermk2");
- if (num1 == -1746263880)
- this.worldPistolModel = this.GetHashKey("w_pi_wep1_gun");
- 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;
- this.weaponPistol = this.choosenPistol != (Model)((string)null);
- }
- if (!Function.Call<bool>(Hash._0xD9D2CFFF49FAB35F, Array.Empty<InputArgument>()) && !Game.IsScreenFadingIn && (!Game.IsScreenFadingOut && !Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>())) && Game.Player.CanControlCharacter)
- {
- this.player = Game.Player.Character;
- }
- else
- {
- this.prevPlayer = this.player;
- this.HolstedPistolPrev = this.HolstedPistol;
- }
- if ((Entity)this.player != (Entity)Game.Player.Character)
- this.goodToGo = false;
- else if (!this.goodToGo)
- {
- this.goodToGo = true;
- if ((Entity)this.HolstedPistol != (Entity)null && this.HolstedPistol.Exists())
- this.HolstedPistol = (Prop)null;
- if ((Entity)this.prevPlayer != (Entity)null && !this.prevPlayer.Exists())
- {
- if ((Entity)this.holster != (Entity)null && this.holster.Exists())
- {
- this.holster.Delete();
- this.holster = (Prop)null;
- }
- }
- else
- this.holster = (Prop)null;
- this.weaponPistol = false;
- this.worldPistolModel = 0;
- this.checkHolsterAfterCharacterSwitch(Game.Player.Character);
- }
- if (this.weaponPistol)
- {
- if ((Entity)this.HolstedPistol != (Entity)null)
- {
- this.HolstedPistol.MarkAsNoLongerNeeded();
- this.HolstedPistol.Detach();
- this.HolstedPistol.Delete();
- this.HolstedPistol = (Prop)null;
- }
- }
- 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()))
- {
- 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())
- {
- 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);
- if (Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character))
- {
- this.HolstedPistol = prop;
- this.AttachPistol(Game.Player.Character);
- }
- else
- {
- int num3;
- if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.worldPistolModel))
- num3 = Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.worldPistolModel) ? 1 : 0;
- else
- num3 = 0;
- if (num3 != 0)
- {
- this.HolstedPistol = World.CreateProp((Model)this.worldPistolModel, Game.Player.Character.Position, true, false);
- this.AttachPistol(Game.Player.Character);
- }
- }
- }
- else
- {
- int num3;
- if (Function.Call<bool>(Hash._0xC0296A2EDF545E92, (InputArgument)this.worldPistolModel))
- num3 = Function.Call<bool>(Hash._0x98A4EB5D89A0C952, (InputArgument)this.worldPistolModel) ? 1 : 0;
- else
- num3 = 0;
- if (num3 != 0)
- {
- this.HolstedPistol = World.CreateProp((Model)this.worldPistolModel, Game.Player.Character.Position, true, false);
- this.AttachPistol(Game.Player.Character);
- }
- }
- }
- if (Game.IsScreenFadingIn || Game.IsScreenFadingOut)
- {
- if (!this.useHipHolster)
- {
- Prop[] allProps = World.GetAllProps((Model)"prop_pistol_holster");
- for (int index = 0; index < allProps.Length; ++index)
- {
- if (allProps.Length != 0 && (Entity)allProps[index] != (Entity)null && allProps[index].Exists() && !allProps[index].IsAttached())
- {
- allProps[index].Delete();
- Array.Clear((Array)allProps, 0, allProps.Length);
- }
- }
- }
- else
- {
- Prop[] allProps = World.GetAllProps((Model)"prop_holster_01");
- for (int index = 0; index < allProps.Length; ++index)
- {
- if (allProps.Length != 0 && (Entity)allProps[index] != (Entity)null && allProps[index].Exists() && !allProps[index].IsAttached())
- {
- allProps[index].Delete();
- Array.Clear((Array)allProps, 0, allProps.Length);
- }
- }
- }
- }
- }
- if (this.maskTimeCounter < Game.GameTime)
- {
- this.maskTimeCounter = Game.GameTime + 5000;
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
- 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);
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ONE"))
- 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);
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_TWO"))
- 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);
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("mp_m_freemode_01"))
- 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);
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("mp_f_freemode_01"))
- 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);
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
- 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);
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ONE"))
- 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);
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_TWO"))
- 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);
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("mp_m_freemode_01"))
- 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);
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("mp_f_freemode_01"))
- 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);
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ZERO"))
- {
- 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))
- {
- if (this.config.GetValue<bool>("MICHAELES MASK", "HIDE_HAIRS", true))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)0);
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)0);
- this.mask0 = false;
- }
- else
- {
- if (this.config.GetValue<bool>("MICHAELES MASK", "HIDE_HAIRS", true))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)1);
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)1);
- this.mask0 = true;
- }
- }
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_ONE"))
- {
- 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))
- {
- if (this.config.GetValue<bool>("FRANKLINS MASK", "HIDE_HAIRS", true))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)0);
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)0);
- this.mask1 = false;
- }
- else
- {
- if (this.config.GetValue<bool>("FRANKLINS MASK", "HIDE_HAIRS", true))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)1);
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)1);
- this.mask1 = true;
- }
- }
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("PLAYER_TWO"))
- {
- 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))
- {
- if (this.config.GetValue<bool>("TREVORS MASK", "HIDE_HAIRS", true))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)0);
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)0);
- this.mask2 = false;
- }
- else
- {
- if (this.config.GetValue<bool>("TREVORS MASK", "HIDE_HAIRS", true))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)1);
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)1, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)1), (InputArgument)1);
- this.mask2 = true;
- }
- }
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("mp_m_freemode_01"))
- {
- 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))
- {
- if (this.config.GetValue<bool>("MPS MASK", "HIDE_HAIRS", true))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)0);
- this.mask3 = false;
- }
- else
- {
- if (this.config.GetValue<bool>("MPS MASK", "HIDE_HAIRS", true))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)1);
- this.mask3 = true;
- }
- }
- model = Game.Player.Character.Model;
- if (model.Hash == this.GetHashKey("mp_f_freemode_01"))
- {
- 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))
- {
- if (this.config.GetValue<bool>("MPS MASK", "HIDE_HAIRS", true))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)0);
- this.mask3 = false;
- }
- else
- {
- if (this.config.GetValue<bool>("MPS MASK", "HIDE_HAIRS", true))
- Function.Call(Hash._0x262B14F48D29DE80, (InputArgument)Game.Player.Character, (InputArgument)2, (InputArgument)Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)2), (InputArgument)1);
- this.mask3 = true;
- }
- }
- }
- if (this.earRadioTimer < Game.GameTime)
- {
- this.earRadioTimer = Game.GameTime + 5000;
- model = Game.Player.Character.Model;
- int num1;
- if (model.Hash != this.GetHashKey("mp_m_freemode_01"))
- {
- model = Game.Player.Character.Model;
- if (model.Hash != this.GetHashKey("mp_f_freemode_01"))
- {
- model = Game.Player.Character.Model;
- if (model.Hash != this.GetHashKey("PLAYER_ZERO"))
- {
- model = Game.Player.Character.Model;
- if (model.Hash != this.GetHashKey("PLAYER_ONE"))
- {
- model = Game.Player.Character.Model;
- num1 = model.Hash == this.GetHashKey("PLAYER_TWO") ? 1 : 0;
- goto label_794;
- }
- }
- }
- }
- num1 = 1;
- label_794:
- if (num1 != 0)
- this.headset = Function.Call<int>(Hash._0x898CC20EA75BACD8, (InputArgument)Game.Player.Character, (InputArgument)2) == 0;
- if (!this.headset && Function.Call<bool>(Hash._0xB35CE999E8EF317E, Array.Empty<InputArgument>()))
- {
- Vector3 position2 = new Vector3(266.1459f, -1007.036f, -100.9292f);
- position1 = Game.Player.Character.Position;
- int num2;
- if ((double)position1.DistanceTo(position2) > 50.0)
- 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;
- else
- num2 = 0;
- if (num2 != 0)
- {
- Function.Call(Hash._0xBF286C554784F3DF, (InputArgument)false);
- Function.Call(Hash._0x1098355A16064BB3, (InputArgument)false);
- }
- }
- }
- int num11;
- if (!Function.Call<bool>(Hash._0xF3A21BCD95725A4A, (InputArgument)0, (InputArgument)85))
- {
- if (!Function.Call<bool>(Hash._0x580417101DDB492F, (InputArgument)0, (InputArgument)81))
- {
- if (!Function.Call<bool>(Hash._0x580417101DDB492F, (InputArgument)0, (InputArgument)82))
- {
- num11 = 0;
- goto label_809;
- }
- }
- }
- 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;
- label_809:
- if (num11 != 0)
- {
- int num1;
- if (this.headset)
- {
- if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0xE3B6097CC25AA69E, (InputArgument)Game.Player.Character))
- {
- if (!Function.Call<bool>(Hash._0xB2C086CC1BF8F2BF, (InputArgument)Game.Player.Character))
- {
- num1 = !Function.Call<bool>(Hash._0x2E397FD2ECD37C87, (InputArgument)Game.Player) ? 1 : 0;
- goto label_816;
- }
- }
- }
- }
- num1 = 0;
- label_816:
- if (num1 != 0 && !Game.Player.Character.IsSittingInVehicle())
- {
- Game.Player.Character.Task.ClearAll();
- 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);
- }
- }
- else
- {
- if (!Function.Call<bool>(Hash._0x50F940259D3841E6, (InputArgument)0, (InputArgument)85))
- {
- if (!Function.Call<bool>(Hash._0x50F940259D3841E6, (InputArgument)0, (InputArgument)81))
- {
- if (!Function.Call<bool>(Hash._0x50F940259D3841E6, (InputArgument)0, (InputArgument)82))
- goto label_824;
- }
- }
- int num1;
- if (!Function.Call<bool>(Hash._0x2AFE52F782F25775, Array.Empty<InputArgument>()))
- {
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)"cellphone_text_to_call", (InputArgument)3))
- {
- num1 = !Function.Call<bool>(Hash._0x7497D2CE2C30D24C, (InputArgument)false) ? 1 : 0;
- goto label_825;
- }
- }
- label_824:
- num1 = 0;
- label_825:
- if (num1 != 0 && !Game.Player.Character.IsSittingInVehicle())
- {
- int num2;
- if (!Function.Call<bool>(Hash._0x50F940259D3841E6, (InputArgument)0, (InputArgument)81))
- num2 = Function.Call<bool>(Hash._0x50F940259D3841E6, (InputArgument)0, (InputArgument)82) ? 1 : 0;
- else
- num2 = 1;
- if (num2 != 0)
- {
- Script.Wait(1000);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"cellphone_text_to_call", (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)3);
- }
- else
- {
- Script.Wait(200);
- Function.Call(Hash._0x28004F88151E03E0, (InputArgument)Game.Player.Character, (InputArgument)"cellphone_text_to_call", (InputArgument)"anim@cellphone@in_car@ds", (InputArgument)3);
- }
- }
- }
- if (this.walletCount && !this.smoking)
- {
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- Function.Call(Hash._0xBAF20C5432058024, (InputArgument)Game.Player.Character, (InputArgument)false);
- Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)36029);
- int num1 = Function.Call<int>(Hash._0x3F428D08BE5AAE31, (InputArgument)Game.Player.Character, (InputArgument)6286);
- 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))
- {
- this.animSpeed = 1f;
- Game.Player.Character.Task.LookAt((Entity)Game.Player.Character);
- 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);
- Game.Player.Character.Task.PlayAnimation("anim@amb@board_room@supervising@", "dissaproval_01_lo_amy_skater_01", this.animSpeed, -1, AnimationFlags.UpperBodyOnly | AnimationFlags.AllowRotation);
- }
- else
- {
- if ((double)this.animSpeed < 2.0)
- this.animSpeed += 0.01f;
- 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);
- int num3;
- 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)
- 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;
- else
- num3 = 0;
- if (num3 != 0)
- {
- if ((Entity)this.walletOpened != (Entity)null)
- this.walletOpened.IsVisible = true;
- if ((Entity)this.wallet != (Entity)null)
- this.wallet.IsVisible = false;
- }
- 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)
- {
- 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))
- {
- Game.Player.Character.Task.ClearAnimation("anim@amb@board_room@supervising@", "dissaproval_01_lo_amy_skater_01");
- this.Notify("Money in Wallet has been Counted", "Current balance: " + (Game.Player.Money.ToString() + " ~g~$"), 0, (int)byte.MaxValue, 0, "CHAR_BANK_FLEECA");
- Function.Call(Hash._0x67C540AA08E4A6F5, (InputArgument)(-1), (InputArgument)"LOCAL_PLYR_CASH_COUNTER_COMPLETE", (InputArgument)"DLC_HEISTS_GENERAL_FRONTEND_SOUNDS", (InputArgument)0);
- }
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- {
- 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);
- if ((Entity)this.walletOpened != (Entity)null)
- this.walletOpened.IsVisible = false;
- if ((Entity)this.wallet != (Entity)null)
- this.wallet.IsVisible = true;
- 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);
- this.soundFX(Game.Player.Character, "grab.wav");
- Script.Wait(700);
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- Game.Player.Character.Task.ClearAnimation("mp_arrest_paired", "cop_p1_rf_right_0");
- }
- if ((Entity)this.wallet != (Entity)null && this.wallet.Exists())
- {
- this.wallet.Delete();
- this.wallet = (Prop)null;
- }
- 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())
- {
- 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);
- int num4;
- if ((Entity)prop != (Entity)this.wallet)
- num4 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) ? 1 : 0;
- else
- num4 = 0;
- if (num4 != 0 && prop.Exists())
- prop.Delete();
- }
- if ((Entity)this.walletOpened != (Entity)null && this.walletOpened.Exists())
- {
- this.walletOpened.Delete();
- this.walletOpened = (Prop)null;
- }
- 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())
- {
- 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);
- int num4;
- if ((Entity)prop != (Entity)this.wallet)
- num4 = Function.Call<bool>(Hash._0xEFBE71898A993728, (InputArgument)prop, (InputArgument)Game.Player.Character) ? 1 : 0;
- else
- num4 = 0;
- if (num4 != 0 && prop.Exists())
- prop.Delete();
- }
- this.walletCount = false;
- this.inProcessWallet = false;
- }
- }
- }
- if (this.play_swallow_pills_anim)
- this.SwallowPillsFunction(Game.Player.Character);
- if (this.blockKeys)
- {
- if (Game.Player.Character.Weapons.Current.Hash != WeaponHash.Unarmed)
- Function.Call(Hash._0xADF692B254977C0C, (InputArgument)Game.Player.Character, (InputArgument)2725352035U, (InputArgument)true);
- this.DisableControlsFunc(false);
- }
- if (this.flame && (Entity)this.cig != (Entity)null)
- {
- 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);
- Function.Call(Hash._0x6C38AF3693A69A91, (InputArgument)"scr_safehouse");
- 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);
- }
- if (this.smoke == 1 && this.smoking)
- this.DisableControlsFunc(false);
- if (this.extraEffectsStat)
- {
- if (this.extraEffectsTimer > 0)
- {
- --this.extraEffectsTimer;
- if (this.extraEffects)
- {
- if (!Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusIn"))
- Function.Call(Hash._0x2206BF9A37B7F724, (InputArgument)"FocusIn", (InputArgument)100, (InputArgument)false);
- if ((double)this.slowMoScale > 0.5)
- this.slowMoScale -= 0.05f;
- Game.TimeScale = this.slowMoScale;
- }
- if (Game.Player.Character.Health <= Game.Player.Character.MaxHealth)
- ++Game.Player.Character.Health;
- double num1 = (double)Function.Call<float>(Hash._0x085BF80FA50A39D1, (InputArgument)Game.Player.Character, (InputArgument)1.15f);
- }
- else
- {
- double num1 = (double)Function.Call<float>(Hash._0x085BF80FA50A39D1, (InputArgument)Game.Player.Character, (InputArgument)1f);
- if (Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusIn"))
- Function.Call(Hash._0x068E835A1D0DC0E3, (InputArgument)"FocusIn");
- if (!Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusOut"))
- {
- Function.Call(Hash._0x67C540AA08E4A6F5, (InputArgument)(-1), (InputArgument)"FocusOut", (InputArgument)"HintCamSounds");
- Function.Call(Hash._0x2206BF9A37B7F724, (InputArgument)"FocusOut", (InputArgument)100, (InputArgument)false);
- }
- if ((double)this.slowMoScale < 1.0)
- {
- this.slowMoScale += 0.1f;
- Game.TimeScale = this.slowMoScale;
- }
- else
- {
- this.followCamera = false;
- if (Function.Call<bool>(Hash._0x36AD3E690DA5ACEB, (InputArgument)"FocusOut"))
- Function.Call(Hash._0x068E835A1D0DC0E3, (InputArgument)"FocusOut");
- this.extraEffectsStat = false;
- }
- }
- }
- if (this.canRefill && (this.pillsCount < this.maxPills || this.cigsCount < this.maxCigs))
- {
- if (this.hintShow)
- DisplayHelpTextThisFrame("~INPUT_CONTEXT~ Refill ~g~medical~w~ supplies");
- float num1 = Function.Call<float>(Hash._0x1DD55701034110E5, (InputArgument)this.medbag);
- if (Game.IsControlJustPressed(2, Control.Context))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"mp_arrest_paired", (InputArgument)"cop_p1_rf_right_0", (InputArgument)3))
- {
- if ((double)num1 < (double)Game.Player.Character.HeightAboveGround)
- {
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@medic@standing@kneel@exit");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@medic@standing@kneel@exit"))
- Script.Wait(10);
- else
- break;
- }
- 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);
- }
- else
- {
- Function.Call(Hash._0xD3BD40951412FEF6, (InputArgument)"amb@code_human_in_car_mp_actions@grab_crotch@bodhi@rps@base");
- while (true)
- {
- if (!Function.Call<bool>(Hash._0xD031A9162D01088C, (InputArgument)"amb@code_human_in_car_mp_actions@grab_crotch@bodhi@rps@base"))
- Script.Wait(10);
- else
- break;
- }
- 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);
- }
- this.soundFX(Game.Player.Character, "shakeJar.wav");
- }
- int num2 = this.maxPills - this.pillsCount;
- int num3 = this.maxCigs - this.cigsCount;
- if (this.pillsCount < this.maxPills)
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- this.pillsCount = this.maxPills;
- UI.Notify("~g~+" + num2.ToString() + " ~w~Pills", true);
- }
- if (this.cigsCount < this.maxCigs)
- {
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- this.cigsCount = this.maxCigs;
- UI.Notify("~g~+" + num3.ToString() + " ~w~Cigs", true);
- }
- if ((Entity)this.medbag != (Entity)null && this.medbag.Exists())
- {
- this.medbag.Delete();
- this.medbag = (Prop)null;
- this.canRefill = false;
- }
- }
- void DisplayHelpTextThisFrame(string text)
- {
- Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
- Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
- Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
- }
- }
- this._iFruit.Update();
- if (this.deal && !this.payed)
- {
- int num1;
- if ((Entity)this.seller != (Entity)null)
- {
- position1 = this.seller.Position;
- if ((double)position1.DistanceTo(Game.Player.Character.Position) < 15.0)
- {
- num1 = !this.payed ? 1 : 0;
- goto label_941;
- }
- }
- num1 = 0;
- label_941:
- if (num1 != 0)
- this.callContact.Name = "Pay for purchases";
- }
- else
- this.callContact.Name = "Inventory menu";
- if (this.followCamera)
- this.followCameraCreateFunc(Game.Player.Character, this.CamObject);
- else
- this.followCameraDeleteFunc(Game.Player.Character, this.CamObject);
- if (Game.IsScreenFadedOut || Function.Call<bool>(Hash._0xD9D2CFFF49FAB35F, Array.Empty<InputArgument>()) || Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()))
- this.clearTrash();
- if (Game.Player.Character.IsOnFoot && (Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null && !this.isOccupied(Game.Player.Character))
- this.WeaponSwitchAnim(Game.Player.Character);
- if (this.bagPickUp)
- {
- Entity droppedBag = this.getDroppedBag(Game.Player.Character);
- if (droppedBag != (Entity)null && droppedBag.Exists() && droppedBag.Model == (Model)this.GetHashKey(this.stashedBagModel))
- {
- this.camTimer = 0;
- this.CamObject = droppedBag;
- this.Draw(1, this.hasBag, this.canTakeBagFromVehicle, this.hasHolster, this.isBagBought, this.isBagDropped);
- if (Function.Call<bool>(Hash._0x580417101DDB492F, (InputArgument)0, (InputArgument)51))
- {
- if (droppedBag != (Entity)null && droppedBag.Exists())
- {
- this.blipHandle(false, droppedBag, BlipSprite.Briefcase2, "DuffleBag", 0.85f, 200, true, true);
- droppedBag.Delete();
- }
- this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
- }
- }
- }
- if (!Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()) && !Game.MissionFlag)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) == (Entity)null && this.DoesPedHasBigWeapons(Game.Player.Character) && this.IsCurrentWeaponBig(Game.Player.Character.Weapons.Current.Hash))
- {
- Function.Call(Hash._0x0725A4CCFDED9A70, (InputArgument)Game.Player.Character, (InputArgument)false, (InputArgument)true, (InputArgument)true, (InputArgument)true, (InputArgument)true);
- Game.Player.Character.Weapons.Select(WeaponHash.Unarmed);
- }
- }
- else if ((Entity)this.bagModelReturn(Game.Player.Character) == (Entity)null && this.DoesPedHasBigWeapons(Game.Player.Character) && !Game.Player.Character.IsSittingInVehicle())
- this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
- if (!this.canTakeBagFromVehicle && this.canPutOnBagOnExit && (Game.IsControlJustPressed(2, Control.VehicleExit) || Game.IsDisabledControlPressed(2, Control.VehicleExit)))
- {
- this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
- if (this.changedPosition)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- {
- if (this.drawStrap)
- {
- Prop[] nearbyStrap = World.GetNearbyProps(Game.Player.Character.Position, 2f, (Model)this.GetHashKey("prop_cs_heist_bag_strap_01"));
- if (((IEnumerable<Prop>)nearbyStrap).Count<Prop>() > 0)
- {
- foreach (Prop prop in nearbyStrap)
- {
- prop.IsVisible = false;
- }
- }
- }
- }
- }
- }
- if (this.DufflebagTimeCounter < Game.GameTime)
- {
- this.DufflebagTimeCounter = Game.GameTime + 5000;
- if ((Entity)Game.Player.Character != (Entity)null && this.getDroppedBag(Game.Player.Character) != (Entity)null)
- {
- if (Function.Call<bool>(Hash._0xD9D2CFFF49FAB35F, Array.Empty<InputArgument>()))
- {
- this.getDroppedBag(Game.Player.Character).Delete();
- this.blipsRemove(BlipSprite.Information);
- }
- if (Game.Player.Character.IsOnFoot)
- {
- int num1;
- if (this.getDroppedBag(Game.Player.Character) != (Entity)null && this.getDroppedBag(Game.Player.Character).Exists())
- {
- position1 = Game.Player.Character.Position;
- num1 = (double)position1.DistanceTo(this.getDroppedBag(Game.Player.Character).Position) <= 2.0 ? 1 : 0;
- }
- else
- num1 = 0;
- if (num1 != 0)
- {
- if (!this.bagPickUp)
- this.bagPickUp = true;
- }
- else if (this.bagPickUp)
- this.bagPickUp = false;
- }
- }
- else if (this.bagPickUp)
- this.bagPickUp = false;
- int num2;
- if (Game.Player.Character.IsSittingInVehicle())
- {
- if (!Function.Call<bool>(Hash._0x0A7B270912999B3C, (InputArgument)Game.Player.Character.CurrentVehicle))
- {
- model = Game.Player.Character.CurrentVehicle.Model;
- if (!model.IsBike)
- {
- model = Game.Player.Character.CurrentVehicle.Model;
- if (!model.IsBicycle)
- {
- model = Game.Player.Character.CurrentVehicle.Model;
- num2 = !model.IsQuadbike ? 1 : 0;
- goto label_991;
- }
- }
- }
- }
- num2 = 0;
- label_991:
- if (num2 != 0)
- {
- Prop bag = this.bagModelReturn(Game.Player.Character);
- if ((Entity)bag != (Entity)null && bag.IsVisible)
- this.TakeOffBagInCar(bag, Game.Player.Character);
- else if ((Entity)bag == (Entity)null)
- {
- if (this.VehicleWithBag(Game.Player.Character))
- {
- this.canTakeBagFromVehicle = true;
- if (!this.notifed)
- {
- DisplayHelpTextThisFrame("~BLIP_INFO_ICON~ Your bag is stashed in this vehicle");
- this.blipHandle(true, (Entity)Game.Player.Character.CurrentVehicle, BlipSprite.Information, "DuffleBag", 0.85f, 200, false, false);
- this.notifed = true;
- }
- }
- else
- {
- this.canTakeBagFromVehicle = false;
- this.notifed = false;
- }
- }
- else if (!bag.IsVisible)
- this.canPutOnBagOnExit = true;
- }
- else
- {
- this.notifed = false;
- this.canTakeBagFromVehicle = false;
- this.canPutOnBagOnExit = false;
- }
- 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))
- this.bagSet(this.bagModelCheck(Game.Player.Character), Game.Player.Character);
- if ((Entity)Game.Player.Character != (Entity)null)
- {
- if (Game.Player.Character.IsOnFoot)
- this.checkBagVisibility(Game.Player.Character);
- else if ((Entity)Game.Player.Character.CurrentVehicle != (Entity)null && Game.Player.Character.IsSittingInVehicle())
- {
- model = Game.Player.Character.CurrentVehicle.Model;
- int num1;
- if (!model.IsBicycle)
- {
- model = Game.Player.Character.CurrentVehicle.Model;
- if (!model.IsQuadbike)
- {
- model = Game.Player.Character.CurrentVehicle.Model;
- num1 = model.IsBike ? 1 : 0;
- goto label_1014;
- }
- }
- num1 = 1;
- label_1014:
- if (num1 != 0)
- this.checkBagVisibility(Game.Player.Character);
- }
- }
- if (Game.MissionFlag || Function.Call<bool>(Hash._0xD3C2E180A40F031E, Array.Empty<InputArgument>()))
- {
- if (Game.Player.Character.Model != (Model)PedHash.Trevor)
- {
- Ped[] allPeds = World.GetAllPeds((Model)PedHash.Trevor);
- if (((IEnumerable<Ped>)allPeds).Count<Ped>() > 0)
- {
- foreach (Ped ped in allPeds)
- {
- if ((Entity)this.bagModelReturn(ped) == (Entity)null)
- {
- if (this.DoesPedHasBigWeapons(ped))
- this.bagSet(this.bagModelCheck(ped), ped);
- }
- else
- {
- this.checkBagVisibility(ped);
- if (!this.isStrapAttachedToPed(this.bagModelReturn(ped), ped))
- this.strapSet(this.bagModelReturn(ped), ped);
- }
- }
- }
- }
- if (Game.Player.Character.Model != (Model)PedHash.Michael)
- {
- Ped[] allPeds = World.GetAllPeds((Model)PedHash.Michael);
- if (((IEnumerable<Ped>)allPeds).Count<Ped>() > 0)
- {
- foreach (Ped ped in allPeds)
- {
- if ((Entity)this.bagModelReturn(ped) == (Entity)null)
- {
- if (this.DoesPedHasBigWeapons(ped))
- this.bagSet(this.bagModelCheck(ped), ped);
- }
- else
- {
- this.checkBagVisibility(ped);
- if (!this.isStrapAttachedToPed(this.bagModelReturn(ped), ped))
- this.strapSet(this.bagModelReturn(ped), ped);
- }
- }
- }
- }
- if (Game.Player.Character.Model != (Model)PedHash.Franklin)
- {
- Ped[] allPeds = World.GetAllPeds((Model)PedHash.Franklin);
- if (((IEnumerable<Ped>)allPeds).Count<Ped>() > 0)
- {
- foreach (Ped ped in allPeds)
- {
- if ((Entity)this.bagModelReturn(ped) == (Entity)null)
- {
- if (this.DoesPedHasBigWeapons(ped))
- this.bagSet(this.bagModelCheck(ped), ped);
- }
- else
- {
- this.checkBagVisibility(ped);
- if (!this.isStrapAttachedToPed(this.bagModelReturn(ped), ped))
- this.strapSet(this.bagModelReturn(ped), ped);
- }
- }
- }
- }
- }
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- {
- int num1;
- if (Function.Call<int>(Hash._0x79CFD9827CC979B6, (InputArgument)Game.Player.Character) == -1)
- {
- if (!Function.Call<bool>(Hash._0x7DCE8BDA0F1C1200, (InputArgument)Game.Player.Character))
- {
- num1 = Function.Call<bool>(Hash._0xF731332072F5156C, (InputArgument)Game.Player.Character, (InputArgument)4222310262U) ? 1 : 0;
- goto label_1062;
- }
- }
- num1 = 1;
- label_1062:
- if (num1 != 0)
- {
- if (!this.skyDiving)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- this.skydive(Game.Player.Character, this.bagModelReturn(Game.Player.Character), true);
- this.skyDiving = true;
- }
- }
- else
- {
- if (this.skyDiving && !this.changedPosition)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- this.skydive(Game.Player.Character, this.bagModelReturn(Game.Player.Character), false);
- this.skyDiving = false;
- }
- if (Game.Player.Character.Model == (Model)PedHash.Michael)
- {
- int num3;
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 1)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 3)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 12)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 3)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 15)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 21)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 22)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)9) != 5)
- {
- num3 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)9) == 9 ? 1 : 0;
- goto label_1082;
- }
- }
- }
- }
- }
- }
- }
- }
- num3 = 1;
- label_1082:
- if (num3 != 0)
- {
- if (!this.wearingGear)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), true);
- this.wearingGear = true;
- }
- }
- else if (this.wearingGear && !this.changedPosition)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), false);
- this.wearingGear = false;
- }
- }
- if (Game.Player.Character.Model == (Model)PedHash.Franklin)
- {
- int num3;
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 1)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 2)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 8)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 10)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 18)
- {
- num3 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) == 19 ? 1 : 0;
- goto label_1101;
- }
- }
- }
- }
- }
- num3 = 1;
- label_1101:
- if (num3 != 0)
- {
- if (!this.wearingGear)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), true);
- this.wearingGear = true;
- }
- }
- else if (this.wearingGear && !this.changedPosition)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), false);
- this.wearingGear = false;
- }
- }
- if (Game.Player.Character.Model == (Model)PedHash.Trevor)
- {
- int num3;
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 1)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 3)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 5)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) != 15)
- {
- num3 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)8) == 16 ? 1 : 0;
- goto label_1119;
- }
- }
- }
- }
- num3 = 1;
- label_1119:
- if (num3 != 0)
- {
- if (!this.wearingGear)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), true);
- this.wearingGear = true;
- }
- }
- else if (this.wearingGear && !this.changedPosition)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), false);
- this.wearingGear = false;
- }
- }
- if (Game.Player.Character.Model == (Model)PedHash.FreemodeMale01 || Game.Player.Character.Model == (Model)PedHash.FreemodeFemale01)
- {
- int num3;
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 1)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 2)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 3)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 4)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 5)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 6)
- {
- if (Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) != 7)
- {
- num3 = Function.Call<int>(Hash._0x67F3780DD425D4FC, (InputArgument)Game.Player.Character, (InputArgument)5) == 8 ? 1 : 0;
- goto label_1140;
- }
- }
- }
- }
- }
- }
- }
- num3 = 1;
- label_1140:
- if (num3 != 0)
- {
- if (!this.wearingGear)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), true);
- this.wearingGear = true;
- }
- }
- else if (this.wearingGear && !this.changedPosition)
- {
- if ((Entity)this.bagModelReturn(Game.Player.Character) != (Entity)null)
- this.diving(Game.Player.Character, this.bagModelReturn(Game.Player.Character), false);
- this.wearingGear = false;
- }
- }
- }
- }
- void DisplayHelpTextThisFrame(string text)
- {
- Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
- Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
- Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
- }
- }
- if (this.findSellerOption)
- {
- this.UsePhoneFunc(Game.Player.Character);
- int num1 = 0;
- int num2 = 176;
- int num3 = 177;
- DisplayHelpTextThisFrame("~y~Mark ~w~closest ~BLIP_INFO_ICON~ Dealer to purchase Supplies, Bags and Holsters");
- this.Draw(2, this.hasBag, this.canTakeBagFromVehicle, this.hasHolster, this.isBagBought, this.isBagDropped);
- if (this.isBagDropped)
- {
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num1))
- {
- if (this.getDroppedBag(Game.Player.Character) != (Entity)null)
- this.blipHandle(true, this.getDroppedBag(Game.Player.Character), BlipSprite.Information, "Dufflebag", 0.85f, 200, true, false);
- this.Notify("IBAG: ", "Stashed bag's location~n~ has been ~y~Marked", (int)byte.MaxValue, 0, 0, "CHAR_GANGAPP");
- Function.Call(Hash._0x95C9E72F3D7DEC9B, (InputArgument)2);
- this.findSellerOption = false;
- this.ClosePhoneFunc(Game.Player.Character, 0, 0);
- this.followCamera = false;
- this.soundFX(Game.Player.Character, "beep.wav");
- }
- }
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num3))
- {
- Function.Call(Hash._0x95C9E72F3D7DEC9B, (InputArgument)1);
- this.findSellerOption = false;
- this.ClosePhoneFunc(Game.Player.Character, 300, 0);
- this.followCamera = false;
- }
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num2))
- {
- this.findSellerOption = false;
- this.Notify("IBAG: ", " Dealers's location~n~ has been ~y~Marked", (int)byte.MaxValue, 0, 0, "CHAR_GANGAPP");
- Function.Call(Hash._0x95C9E72F3D7DEC9B, (InputArgument)3);
- this.CreateSeller(World.GetSafeCoordForPed(new Vector3(Game.Player.Character.Position.X + 50f, Game.Player.Character.Position.Y + 50f, Game.Player.Character.Position.Z), false));
- this.ClosePhoneFunc(Game.Player.Character, 0, 0);
- this.followCamera = false;
- this.soundFX(Game.Player.Character, "beep.wav");
- }
- this.camTimer = 0;
- if (!this.followCamera)
- {
- this.CamObject = (Entity)Game.Player.Character;
- this.followCamera = true;
- }
- void DisplayHelpTextThisFrame(string text)
- {
- Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
- Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
- Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
- }
- }
- if (this.inMenu)
- {
- Function.Call(Hash._0xC4E2813898C97A4B, (InputArgument)false);
- Function.Call(Hash._0x015C49A93E3E086E, (InputArgument)true);
- this.camTimer = 0;
- if (!this.followCamera)
- {
- this.CamObject = (Entity)this.bagModelReturn(Game.Player.Character);
- this.followCamera = true;
- }
- if (this.modMenuPool != null)
- {
- this.modMenuPool.ProcessMenus();
- this.modMenuPool.ProcessMouse();
- this.modMenuPool.MouseEdgeEnabled = true;
- if (!this.modMenuPool.IsAnyMenuOpen())
- {
- if (this.mainMenu != null)
- {
- if (!this.isOccupied(Game.Player.Character))
- this.weaponInventoryAnim(this.bagModelReturn(Game.Player.Character), Game.Player.Character);
- this.mainMenu.Visible = true;
- }
- else
- this.Setup(Game.Player.Character);
- }
- }
- else
- this.Setup(Game.Player.Character);
- }
- else if (this.modMenuPool != null && this.mainMenu != null)
- {
- this.mainMenuListString.Clear();
- this.stashedWeapons.Clear();
- this.characterWeapons.Clear();
- this.mainMenu.Visible = false;
- this.modMenuPool.CloseAllMenus();
- this.mainMenu.Clear();
- this.mainMenu = (UIMenu)null;
- this.modMenuPool = (MenuPool)null;
- }
- if (!((Entity)this.seller != (Entity)null))
- return;
- if (this.seller.IsAlive && !this.seller.IsFleeing && this.seller.Exists())
- {
- position1 = Game.Player.Character.Position;
- if ((double)position1.DistanceTo(this.seller.Position) < 50.0)
- {
- int num1;
- if (this.deal && this.greetingFinished)
- {
- position1 = Game.Player.Character.Position;
- if ((double)position1.DistanceTo(this.seller.Position) > 14.0)
- this.clearScriptFunction();
- if (!this.inProcessBag)
- {
- this.DisableControlsFunc(false);
- int num2 = 52;
- int num3 = 0;
- int num4 = 73;
- int num5 = 75;
- int num6 = 51;
- if (this.sellerAvailableItems <= 0 && this.TotalPrice <= 0)
- {
- DisplayHelpTextThisFrame("No ~o~items~w~ are available right now");
- }
- else
- {
- string[] strArray = new string[5]
- {
- " Price: ~c~",
- this.TotalPrice.ToString(),
- " ~g~$~n~~w~ Money: ~c~",
- null,
- null
- };
- num1 = Game.Player.Money;
- strArray[3] = num1.ToString();
- strArray[4] = " ~g~$";
- DisplayHelpTextThisFrame(string.Concat(strArray));
- }
- this.Draw(3, this.hasBag, this.canTakeBagFromVehicle, this.hasHolster, this.isBagBought, this.isBagDropped);
- if (!this.isBagBought)
- {
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num2))
- {
- if (!this.buyBag)
- {
- this.buyBag = true;
- --this.sellerAvailableItems;
- this.TotalPrice += this.BagPrice;
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- UI.Notify("Dufflebag has been ~g~addded~w~ to your ~o~Cart", true);
- }
- else
- {
- this.buyBag = false;
- ++this.sellerAvailableItems;
- this.TotalPrice -= this.BagPrice;
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
- UI.Notify("Dufflebag has been ~r~removed~w~ from your ~o~Cart", true);
- }
- }
- }
- else
- this.buyBag = false;
- if (!this.hasHolster)
- {
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num4))
- {
- if (!this.buyHolster)
- {
- this.buyHolster = true;
- --this.sellerAvailableItems;
- this.TotalPrice += this.HolsterPrice;
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- UI.Notify("Holster has been ~g~added~w~ to your ~o~Cart", true);
- }
- else
- {
- this.buyHolster = false;
- ++this.sellerAvailableItems;
- this.TotalPrice -= this.HolsterPrice;
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
- UI.Notify("Holster has been ~r~removed~w~ from your ~o~Cart", true);
- }
- }
- }
- else
- this.buyHolster = false;
- if (this.cigsCount < this.maxCigs || this.pillsCount < this.maxPills)
- {
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num3))
- {
- if (!this.buySupplies)
- {
- this.buySupplies = true;
- --this.sellerAvailableItems;
- this.TotalPrice += this.SupplyPrice;
- Function.Call(Hash._0x17430B918701C342, (InputArgument)0, (InputArgument)((int)byte.MaxValue), (InputArgument)0, (InputArgument)100);
- UI.Notify("Medical supplies has been ~g~added~w~ to your ~o~Cart", true);
- }
- else
- {
- this.buySupplies = false;
- ++this.sellerAvailableItems;
- this.TotalPrice -= this.SupplyPrice;
- Function.Call(Hash._0x17430B918701C342, (InputArgument)((int)byte.MaxValue), (InputArgument)((int)sbyte.MaxValue), (InputArgument)80, (InputArgument)100);
- UI.Notify("Medical supplies has been ~r~removed~w~ from your ~o~Cart", true);
- }
- }
- }
- else
- this.buySupplies = false;
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num5))
- {
- this.sellerDialogCounter = 3;
- this.inProcessBag = true;
- this.canceled = true;
- }
- if (Function.Call<bool>(Hash._0x91AEF906BCA88877, (InputArgument)0, (InputArgument)num6))
- {
- this.sellerDialogCounter = 7;
- this.inProcessBag = true;
- if (this.buyBag || this.buyHolster || this.buySupplies)
- this.canceled = false;
- }
- if (Function.Call<bool>(Hash._0xD71649DB0A545AA3, (InputArgument)this.seller, (InputArgument)Game.Player.Character, (InputArgument)10f))
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"oddjobs@assassinate@construction@", (InputArgument)"unarmed_fold_arms", (InputArgument)3))
- {
- Game.Player.Character.Task.LookAt((Entity)this.seller);
- Game.Player.Character.Task.PlayAnimation("oddjobs@assassinate@construction@", "unarmed_fold_arms", 3f, -1, AnimationFlags.Loop | AnimationFlags.UpperBodyOnly);
- }
- }
- else
- {
- Game.DisableAllControlsThisFrame(2);
- if (this.timeOut > 0)
- num1 = this.timeOut--;
- if (this.timeOut <= 0)
- {
- if (!Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"oddjobs@assassinate@construction@", (InputArgument)"unarmed_fold_arms", (InputArgument)3))
- {
- Game.Player.Character.Task.TurnTo((Entity)this.seller);
- this.seller.Task.TurnTo((Entity)Game.Player.Character);
- this.timeOut = 200;
- }
- else
- {
- Game.Player.Character.Task.ClearAll();
- Game.Player.Character.Task.TurnTo((Entity)this.seller);
- this.seller.Task.TurnTo((Entity)Game.Player.Character);
- this.timeOut = 200;
- }
- }
- }
- this.CamObject = (Entity)this.seller;
- this.camTimer = 0;
- this.followCamera = true;
- void DisplayHelpTextThisFrame(string text)
- {
- Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
- Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
- Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
- }
- }
- else
- {
- if (this.canceled)
- {
- Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GENERIC_NO", (InputArgument)"SPEECH_PARAMS_FORCE");
- Script.Wait(1000);
- Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GENERIC_BYE", (InputArgument)"SPEECH_PARAMS_FORCE");
- this.clearScriptFunction();
- }
- else if (this.payed)
- {
- if (Game.Player.Money > this.TotalPrice + this.TotalPrice / 100 * 5)
- {
- position1 = Game.Player.Character.Position;
- if ((double)position1.DistanceTo(this.seller.Position) <= 5.0)
- {
- this.sellerDialogFunc(this.sellerDialogCounter, this.buyHolster, this.buyBag, this.buySupplies, this.seller);
- }
- else
- {
- if (this.timeOut > 0)
- --this.timeOut;
- if (this.timeOut <= 0)
- {
- Game.Player.Character.Task.GoTo((Entity)this.seller);
- this.seller.Task.GoTo(Game.Player.Character.Position, false, 5000);
- this.timeOut = 200;
- }
- }
- }
- else
- {
- this.Notify("MAZE", "Transaction ~r~Failed", (int)byte.MaxValue, 0, 0, "CHAR_BANK_MAZE");
- this.Notify("MAZE", "~o~Not enough money on your account", (int)byte.MaxValue, 0, 0, "CHAR_BANK_MAZE");
- Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)this.seller, (InputArgument)"GENERIC_CURSE_MED", (InputArgument)"SPEECH_PARAMS_FORCE");
- Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GAME_BAD_SELF", (InputArgument)"SPEECH_PARAMS_FORCE");
- this.clearScriptFunction();
- }
- }
- else
- {
- if (Function.Call<bool>(Hash._0x1F0B79228E461EC9, (InputArgument)Game.Player.Character, (InputArgument)"oddjobs@assassinate@construction@", (InputArgument)"unarmed_fold_arms", (InputArgument)3))
- {
- Game.Player.Character.Task.ClearAll();
- Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GENERIC_YES", (InputArgument)"SPEECH_PARAMS_FORCE");
- }
- DisplayHelpTextThisFrame("~BLIP_INFO_ICON~ Pay for purchases with your ~y~Phone");
- }
- void DisplayHelpTextThisFrame(string text)
- {
- Function.Call(Hash._0x8509B634FBE7DA11, (InputArgument)"STRING");
- Function.Call(Hash._0x6C188BE134E074AA, (InputArgument)text);
- Function.Call(Hash._0x238FFE5C7B0498A6, (InputArgument)0, (InputArgument)0, (InputArgument)1, (InputArgument)(-1));
- }
- }
- }
- if ((Entity)this.seller != (Entity)null && !this.greeting)
- {
- position1 = Game.Player.Character.Position;
- if ((double)position1.DistanceTo(this.seller.Position) < 10.0)
- {
- this.greeting = true;
- }
- else
- {
- position1 = Game.Player.Character.Position;
- if ((double)position1.DistanceTo(this.seller.Position) < 50.0)
- {
- if (this.timeOut > 0)
- num1 = this.timeOut--;
- if (this.timeOut <= 0)
- {
- if (!Function.Call<bool>(Hash._0xD71649DB0A545AA3, (InputArgument)this.seller, (InputArgument)Game.Player.Character, (InputArgument)10f))
- {
- this.seller.Task.TurnTo((Entity)Game.Player.Character);
- this.timeOut = 200;
- }
- }
- }
- }
- }
- if (this.greeting && !this.greetingFinished)
- {
- position1 = Game.Player.Character.Position;
- if ((double)position1.DistanceTo(this.seller.Position) > 50.0)
- this.clearScriptFunction();
- position1 = Game.Player.Character.Position;
- if ((double)position1.DistanceTo(this.seller.Position) < 7.0)
- {
- if (!this.followCamera)
- {
- this.CamObject = (Entity)this.seller;
- this.followCamera = true;
- }
- this.camTimer = 0;
- }
- else
- this.followCamera = false;
- if (this.timeOut > 0)
- num1 = this.timeOut--;
- position1 = this.seller.Position;
- if ((double)position1.DistanceTo(Game.Player.Character.Position) < 2.5)
- {
- Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)Game.Player.Character, (InputArgument)"GENERIC_HI", (InputArgument)"SPEECH_PARAMS_FORCE");
- this.seller.Task.LookAt((Entity)Game.Player.Character, 1000);
- Function.Call(Hash._0x8E04FEDD28D42462, (InputArgument)this.seller, (InputArgument)"GENERIC_HOWS_IT_GOING", (InputArgument)"SPEECH_PARAMS_FORCE");
- if (this.sellerDialogCounter <= 0)
- {
- this.payed = false;
- this.greetingFinished = true;
- this.followCamera = false;
- this.seller.Task.ClearAll();
- Game.Player.Character.Task.ClearAll();
- this.deal = true;
- this.inProcessBag = false;
- this.update_inventory_status(Game.Player.Character);
- if (!this.buyBag && !this.isBagBought)
- ++this.sellerAvailableItems;
- if (!this.buyHolster && !this.hasHolster)
- ++this.sellerAvailableItems;
- if (!this.buySupplies && (this.cigsCount < this.maxCigs || this.pillsCount < this.maxPills))
- ++this.sellerAvailableItems;
- }
- }
- }
- }
- }
- else
- this.clearScriptFunction();
- }
- internal class Utilities
- {
- public static int GetBigWeaponCount(Ped ped)
- {
- int num = 0;
- foreach (Utilities.BigWeapons bigWeapons in Enum.GetValues(typeof(Utilities.BigWeapons)))
- {
- if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped.Handle, (InputArgument)bigWeapons.GetHashCode(), (InputArgument)false))
- ++num;
- }
- return num;
- }
- public static int GetSmallWeaponCount(Ped ped)
- {
- int num = 0;
- foreach (Utilities.SmallWeapons smallWeapons in Enum.GetValues(typeof(Utilities.SmallWeapons)))
- {
- if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped.Handle, (InputArgument)smallWeapons.GetHashCode(), (InputArgument)false))
- ++num;
- }
- return num;
- }
- public static int GetExplosivesCount(Ped ped)
- {
- int num = 0;
- foreach (Utilities.Explosives explosives in Enum.GetValues(typeof(Utilities.Explosives)))
- {
- if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped.Handle, (InputArgument)explosives.GetHashCode(), (InputArgument)false))
- ++num;
- }
- return num;
- }
- public static int GetMiscCount(Ped ped)
- {
- int num = 0;
- foreach (Utilities.Misc misc in Enum.GetValues(typeof(Utilities.Misc)))
- {
- if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped.Handle, (InputArgument)misc.GetHashCode(), (InputArgument)false))
- ++num;
- }
- return num;
- }
- public static int GetMeleeCount(Ped ped)
- {
- int num = 0;
- foreach (Utilities.Melee melee in Enum.GetValues(typeof(Utilities.Melee)))
- {
- if (Function.Call<bool>(Hash._0x8DECB02F88F428BC, (InputArgument)ped.Handle, (InputArgument)melee.GetHashCode(), (InputArgument)false))
- ++num;
- }
- return num;
- }
- private enum BigWeapons : uint
- {
- SniperRifle = 100416529, // 0x05FC3C11
- FireExtinguisher = 101631238, // 0x060EC506
- CombatPDW = 171789620, // 0x0A3D4D34
- HeavySniper = 205991906, // 0x0C472FE2
- PumpShotgun = 487013001, // 0x1D073A89
- HeavyShotgun = 984333226, // 0x3AABBBAA
- Minigun = 1119849093, // 0x42BF8A85
- GrenadeLauncherSmoke = 1305664598, // 0x4DD2DC56
- Gusenberg = 1627465347, // 0x61012683
- CompactRifle = 1649403952, // 0x624FE830
- HomingLauncher = 1672152130, // 0x63AB0442
- Railgun = 1834241177, // 0x6D544C99
- SawnOffShotgun = 2017895192, // 0x7846A318
- BullpupRifle = 2132975508, // 0x7F229F94
- Firework = 2138347493, // 0x7F7497E5
- CombatMG = 2144741730, // 0x7FD62962
- CarbineRifle = 2210333304, // 0x83BF0278
- MG = 2634544996, // 0x9D07F764
- BullpupShotgun = 2640438543, // 0x9D61E50F
- GrenadeLauncher = 2726580491, // 0xA284510B
- Musket = 2828843422, // 0xA89CB99E
- AdvancedRifle = 2937143193, // 0xAF113F99
- RPG = 2982836145, // 0xB1CA77B1
- AssaultRifle = 3220176749, // 0xBFEFFF6D
- SpecialCarbine = 3231910285, // 0xC0A3098D
- MarksmanRifle = 3342088282, // 0xC734385A
- AssaultShotgun = 3800352039, // 0xE284C527
- DoubleBarrelShotgun = 4019527611, // 0xEF951FBB
- AssaultSMG = 4024951519, // 0xEFE7E2DF
- SMG = 736523883, // 0x2BE6766B
- MicroSMG = 324215364, // 0x13532244
- CarbineRifleMKII = 0x83BF0278,
- SpecialCarbineMKII = 0x969C3D67,
- AssaultRifleMKII = 0x394F415C,
- BullupRifleMKII = 0x84D6FAFD,
- CombatMGMKII = 0xDBBD7280,
- HeavySniperMKII = 0xA914799,
- MarksManRifleMKII = 0x6A6C02E0,
- WidowMaker = 0xB62D1F67,
- SmgMKII = 0x78A97CD0,
- RayCarbine = 0x476BF155,
- }
- private enum SmallWeapons : uint
- {
- VintagePistol = 137902532, // 0x083839C4
- Pistol = 453432689, // 0x1B06D571
- APPistol = 584646201, // 0x22D8FE39
- StunGun = 911657153, // 0x3656C8C1
- FlareGun = 1198879012, // 0x47757124
- CombatPistol = 1593441988, // 0x5EF9FEC4
- Pistol50 = 2578377531, // 0x99AEEB3B
- SNSPistol = 3218215474, // 0xBFD21232
- Revolver = 3249783761, // 0xC1B3C3D1
- HeavyPistol = 3523564046, // 0xD205520E
- MachinePistol = 3675956304, // 0xDB1AA450
- MarksmanPistol = 3696079510, // 0xDC4DB296
- PistolMKII = 0xBFE256D4,
- RayPistol = 0xAF3696A1,
- HeavyRevolverMKII = 0xCB96392F,
- DoubleActionRevolver = 0x97EA20B8,
- SnsPistolMKII = 0x88374054,
- JerryCan = 0x34A67B97,
- }
- private enum Explosives : uint
- {
- StickyBomb = 0x2C3731D9,
- Grenade = 0x93E220BD,
- Cocktail = 0x24B17070,
- BZ = 0xA0973D5E,
- PipeBomb = 0xBA45E8B8,
- TearGas = 0xFDBC8A50,
- Flare = 0x497FACC3,
- ProximityMine = 0xAB564B93,
- }
- private enum Misc : uint
- {
- SnowBall = 0x787F0BB,
- Ball = 0x23C9F95C,
- Knife = 0x99B507EA,
- SwitchBlade = 0xDFE37640,
- Flashlight = 0x8BB05FD7,
- Dagger = 0x92A27487,
- BrassKnuckles = 0xD8DF3C3C,
- }
- private enum Melee : uint
- {
- Bat = 0x958A4A8F,
- BrokenBottle = 0xF9E6AA4B,
- CrowBar = 0x84BD7BFD,
- GolfClub = 0x440E4788,
- Hammer = 0x4E875F73,
- Hatchet = 0xF9DCBF2D,
- Machete = 0xDD5DF8D9,
- NightStick = 0x678B81B1,
- PipeWrench = 0x19044EE0,
- BattleAxe = 0xCD274149,
- PoolCue = 0x94117305,
- StoneHatchet = 0x3813FC08,
- }
- }
- private enum Inputs
- {
- INPUT_NEXT_CAMERA,
- INPUT_LOOK_LR,
- INPUT_LOOK_UD,
- INPUT_LOOK_UP_ONLY,
- INPUT_LOOK_DOWN_ONLY,
- INPUT_LOOK_LEFT_ONLY,
- INPUT_LOOK_RIGHT_ONLY,
- INPUT_CINEMATIC_SLOWMO,
- INPUT_SCRIPTED_FLY_UD,
- INPUT_SCRIPTED_FLY_LR,
- INPUT_SCRIPTED_FLY_ZUP,
- INPUT_SCRIPTED_FLY_ZDOWN,
- INPUT_WEAPON_WHEEL_UD,
- INPUT_WEAPON_WHEEL_LR,
- INPUT_WEAPON_WHEEL_NEXT,
- INPUT_WEAPON_WHEEL_PREV,
- INPUT_SELECT_NEXT_WEAPON,
- INPUT_SELECT_PREV_WEAPON,
- INPUT_SKIP_CUTSCENE,
- INPUT_CHARACTER_WHEEL,
- INPUT_MULTIPLAYER_INFO,
- INPUT_SPRINT,
- INPUT_JUMP,
- INPUT_ENTER,
- INPUT_ATTACK,
- INPUT_AIM,
- INPUT_LOOK_BEHIND,
- INPUT_PHONE,
- INPUT_SPECIAL_ABILITY,
- INPUT_SPECIAL_ABILITY_SECONDARY,
- INPUT_MOVE_LR,
- INPUT_MOVE_UD,
- INPUT_MOVE_UP_ONLY,
- INPUT_MOVE_DOWN_ONLY,
- INPUT_MOVE_LEFT_ONLY,
- INPUT_MOVE_RIGHT_ONLY,
- INPUT_DUCK,
- INPUT_SELECT_WEAPON,
- INPUT_PICKUP,
- INPUT_SNIPER_ZOOM,
- INPUT_SNIPER_ZOOM_IN_ONLY,
- INPUT_SNIPER_ZOOM_OUT_ONLY,
- INPUT_SNIPER_ZOOM_IN_SECONDARY,
- INPUT_SNIPER_ZOOM_OUT_SECONDARY,
- INPUT_COVER,
- INPUT_RELOAD,
- INPUT_TALK,
- INPUT_DETONATE,
- INPUT_HUD_SPECIAL,
- INPUT_ARREST,
- INPUT_ACCURATE_AIM,
- INPUT_CONTEXT,
- INPUT_CONTEXT_SECONDARY,
- INPUT_WEAPON_SPECIAL,
- INPUT_WEAPON_SPECIAL_TWO,
- INPUT_DIVE,
- INPUT_DROP_WEAPON,
- INPUT_DROP_AMMO,
- INPUT_THROW_GRENADE,
- INPUT_VEH_MOVE_LR,
- INPUT_VEH_MOVE_UD,
- INPUT_VEH_MOVE_UP_ONLY,
- INPUT_VEH_MOVE_DOWN_ONLY,
- INPUT_VEH_MOVE_LEFT_ONLY,
- INPUT_VEH_MOVE_RIGHT_ONLY,
- INPUT_VEH_SPECIAL,
- INPUT_VEH_GUN_LR,
- INPUT_VEH_GUN_UD,
- INPUT_VEH_AIM,
- INPUT_VEH_ATTACK,
- INPUT_VEH_ATTACK2,
- INPUT_VEH_ACCELERATE,
- INPUT_VEH_BRAKE,
- INPUT_VEH_DUCK,
- INPUT_VEH_HEADLIGHT,
- INPUT_VEH_EXIT,
- INPUT_VEH_HANDBRAKE,
- INPUT_VEH_HOTWIRE_LEFT,
- INPUT_VEH_HOTWIRE_RIGHT,
- INPUT_VEH_LOOK_BEHIND,
- INPUT_VEH_CIN_CAM,
- INPUT_VEH_NEXT_RADIO,
- INPUT_VEH_PREV_RADIO,
- INPUT_VEH_NEXT_RADIO_TRACK,
- INPUT_VEH_PREV_RADIO_TRACK,
- INPUT_VEH_RADIO_WHEEL,
- INPUT_VEH_HORN,
- INPUT_VEH_FLY_THROTTLE_UP,
- INPUT_VEH_FLY_THROTTLE_DOWN,
- INPUT_VEH_FLY_YAW_LEFT,
- INPUT_VEH_FLY_YAW_RIGHT,
- INPUT_VEH_PASSENGER_AIM,
- INPUT_VEH_PASSENGER_ATTACK,
- INPUT_VEH_SPECIAL_ABILITY_FRANKLIN,
- INPUT_VEH_STUNT_UD,
- INPUT_VEH_CINEMATIC_UD,
- INPUT_VEH_CINEMATIC_UP_ONLY,
- INPUT_VEH_CINEMATIC_DOWN_ONLY,
- INPUT_VEH_CINEMATIC_LR,
- INPUT_VEH_SELECT_NEXT_WEAPON,
- INPUT_VEH_SELECT_PREV_WEAPON,
- INPUT_VEH_ROOF,
- INPUT_VEH_JUMP,
- INPUT_VEH_GRAPPLING_HOOK,
- INPUT_VEH_SHUFFLE,
- INPUT_VEH_DROP_PROJECTILE,
- INPUT_VEH_MOUSE_CONTROL_OVERRIDE,
- INPUT_VEH_FLY_ROLL_LR,
- INPUT_VEH_FLY_ROLL_LEFT_ONLY,
- INPUT_VEH_FLY_ROLL_RIGHT_ONLY,
- INPUT_VEH_FLY_PITCH_UD,
- INPUT_VEH_FLY_PITCH_UP_ONLY,
- INPUT_VEH_FLY_PITCH_DOWN_ONLY,
- INPUT_VEH_FLY_UNDERCARRIAGE,
- INPUT_VEH_FLY_ATTACK,
- INPUT_VEH_FLY_SELECT_NEXT_WEAPON,
- INPUT_VEH_FLY_SELECT_PREV_WEAPON,
- INPUT_VEH_FLY_SELECT_TARGET_LEFT,
- INPUT_VEH_FLY_SELECT_TARGET_RIGHT,
- INPUT_VEH_FLY_VERTICAL_FLIGHT_MODE,
- INPUT_VEH_FLY_DUCK,
- INPUT_VEH_FLY_ATTACK_CAMERA,
- INPUT_VEH_FLY_MOUSE_CONTROL_OVERRIDE,
- INPUT_VEH_SUB_TURN_LR,
- INPUT_VEH_SUB_TURN_LEFT_ONLY,
- INPUT_VEH_SUB_TURN_RIGHT_ONLY,
- INPUT_VEH_SUB_PITCH_UD,
- INPUT_VEH_SUB_PITCH_UP_ONLY,
- INPUT_VEH_SUB_PITCH_DOWN_ONLY,
- INPUT_VEH_SUB_THROTTLE_UP,
- INPUT_VEH_SUB_THROTTLE_DOWN,
- INPUT_VEH_SUB_ASCEND,
- INPUT_VEH_SUB_DESCEND,
- INPUT_VEH_SUB_TURN_HARD_LEFT,
- INPUT_VEH_SUB_TURN_HARD_RIGHT,
- INPUT_VEH_SUB_MOUSE_CONTROL_OVERRIDE,
- INPUT_VEH_PUSHBIKE_PEDAL,
- INPUT_VEH_PUSHBIKE_SPRINT,
- INPUT_VEH_PUSHBIKE_FRONT_BRAKE,
- INPUT_VEH_PUSHBIKE_REAR_BRAKE,
- INPUT_MELEE_ATTACK_LIGHT,
- INPUT_MELEE_ATTACK_HEAVY,
- INPUT_MELEE_ATTACK_ALTERNATE,
- INPUT_MELEE_BLOCK,
- INPUT_PARACHUTE_DEPLOY,
- INPUT_PARACHUTE_DETACH,
- INPUT_PARACHUTE_TURN_LR,
- INPUT_PARACHUTE_TURN_LEFT_ONLY,
- INPUT_PARACHUTE_TURN_RIGHT_ONLY,
- INPUT_PARACHUTE_PITCH_UD,
- INPUT_PARACHUTE_PITCH_UP_ONLY,
- INPUT_PARACHUTE_PITCH_DOWN_ONLY,
- INPUT_PARACHUTE_BRAKE_LEFT,
- INPUT_PARACHUTE_BRAKE_RIGHT,
- INPUT_PARACHUTE_SMOKE,
- INPUT_PARACHUTE_PRECISION_LANDING,
- INPUT_MAP,
- INPUT_SELECT_WEAPON_UNARMED,
- INPUT_SELECT_WEAPON_MELEE,
- INPUT_SELECT_WEAPON_HANDGUN,
- INPUT_SELECT_WEAPON_SHOTGUN,
- INPUT_SELECT_WEAPON_SMG,
- INPUT_SELECT_WEAPON_AUTO_RIFLE,
- INPUT_SELECT_WEAPON_SNIPER,
- INPUT_SELECT_WEAPON_HEAVY,
- INPUT_SELECT_WEAPON_SPECIAL,
- INPUT_SELECT_CHARACTER_MICHAEL,
- INPUT_SELECT_CHARACTER_FRANKLIN,
- INPUT_SELECT_CHARACTER_TREVOR,
- INPUT_SELECT_CHARACTER_MULTIPLAYER,
- INPUT_SAVE_REPLAY_CLIP,
- INPUT_SPECIAL_ABILITY_PC,
- INPUT_CELLPHONE_UP,
- INPUT_CELLPHONE_DOWN,
- INPUT_CELLPHONE_LEFT,
- INPUT_CELLPHONE_RIGHT,
- INPUT_CELLPHONE_SELECT,
- INPUT_CELLPHONE_CANCEL,
- INPUT_CELLPHONE_OPTION,
- INPUT_CELLPHONE_EXTRA_OPTION,
- INPUT_CELLPHONE_SCROLL_FORWARD,
- INPUT_CELLPHONE_SCROLL_BACKWARD,
- INPUT_CELLPHONE_CAMERA_FOCUS_LOCK,
- INPUT_CELLPHONE_CAMERA_GRID,
- INPUT_CELLPHONE_CAMERA_SELFIE,
- INPUT_CELLPHONE_CAMERA_DOF,
- INPUT_CELLPHONE_CAMERA_EXPRESSION,
- INPUT_FRONTEND_DOWN,
- INPUT_FRONTEND_UP,
- INPUT_FRONTEND_LEFT,
- INPUT_FRONTEND_RIGHT,
- INPUT_FRONTEND_RDOWN,
- INPUT_FRONTEND_RUP,
- INPUT_FRONTEND_RLEFT,
- INPUT_FRONTEND_RRIGHT,
- INPUT_FRONTEND_AXIS_X,
- INPUT_FRONTEND_AXIS_Y,
- INPUT_FRONTEND_RIGHT_AXIS_X,
- INPUT_FRONTEND_RIGHT_AXIS_Y,
- INPUT_FRONTEND_PAUSE,
- INPUT_FRONTEND_PAUSE_ALTERNATE,
- INPUT_FRONTEND_ACCEPT,
- INPUT_FRONTEND_CANCEL,
- INPUT_FRONTEND_X,
- INPUT_FRONTEND_Y,
- INPUT_FRONTEND_LB,
- INPUT_FRONTEND_RB,
- INPUT_FRONTEND_LT,
- INPUT_FRONTEND_RT,
- INPUT_FRONTEND_LS,
- INPUT_FRONTEND_RS,
- INPUT_FRONTEND_LEADERBOARD,
- INPUT_FRONTEND_SOCIAL_CLUB,
- INPUT_FRONTEND_SOCIAL_CLUB_SECONDARY,
- INPUT_FRONTEND_DELETE,
- INPUT_FRONTEND_ENDSCREEN_ACCEPT,
- INPUT_FRONTEND_ENDSCREEN_EXPAND,
- INPUT_FRONTEND_SELECT,
- INPUT_SCRIPT_LEFT_AXIS_X,
- INPUT_SCRIPT_LEFT_AXIS_Y,
- INPUT_SCRIPT_RIGHT_AXIS_X,
- INPUT_SCRIPT_RIGHT_AXIS_Y,
- INPUT_SCRIPT_RUP,
- INPUT_SCRIPT_RDOWN,
- INPUT_SCRIPT_RLEFT,
- INPUT_SCRIPT_RRIGHT,
- INPUT_SCRIPT_LB,
- INPUT_SCRIPT_RB,
- INPUT_SCRIPT_LT,
- INPUT_SCRIPT_RT,
- INPUT_SCRIPT_LS,
- INPUT_SCRIPT_RS,
- INPUT_SCRIPT_PAD_UP,
- INPUT_SCRIPT_PAD_DOWN,
- INPUT_SCRIPT_PAD_LEFT,
- INPUT_SCRIPT_PAD_RIGHT,
- INPUT_SCRIPT_SELECT,
- INPUT_CURSOR_ACCEPT,
- INPUT_CURSOR_CANCEL,
- INPUT_CURSOR_X,
- INPUT_CURSOR_Y,
- INPUT_CURSOR_SCROLL_UP,
- INPUT_CURSOR_SCROLL_DOWN,
- INPUT_ENTER_CHEAT_CODE,
- INPUT_INTERACTION_MENU,
- INPUT_MP_TEXT_CHAT_ALL,
- INPUT_MP_TEXT_CHAT_TEAM,
- INPUT_MP_TEXT_CHAT_FRIENDS,
- INPUT_MP_TEXT_CHAT_CREW,
- INPUT_PUSH_TO_TALK,
- INPUT_CREATOR_LS,
- INPUT_CREATOR_RS,
- INPUT_CREATOR_LT,
- INPUT_CREATOR_RT,
- INPUT_CREATOR_MENU_TOGGLE,
- INPUT_CREATOR_ACCEPT,
- INPUT_CREATOR_DELETE,
- INPUT_ATTACK2,
- INPUT_RAPPEL_JUMP,
- INPUT_RAPPEL_LONG_JUMP,
- INPUT_RAPPEL_SMASH_WINDOW,
- INPUT_PREV_WEAPON,
- INPUT_NEXT_WEAPON,
- INPUT_MELEE_ATTACK1,
- INPUT_MELEE_ATTACK2,
- INPUT_WHISTLE,
- INPUT_MOVE_LEFT,
- INPUT_MOVE_RIGHT,
- INPUT_MOVE_UP,
- INPUT_MOVE_DOWN,
- INPUT_LOOK_LEFT,
- INPUT_LOOK_RIGHT,
- INPUT_LOOK_UP,
- INPUT_LOOK_DOWN,
- INPUT_SNIPER_ZOOM_IN,
- INPUT_SNIPER_ZOOM_OUT,
- INPUT_SNIPER_ZOOM_IN_ALTERNATE,
- INPUT_SNIPER_ZOOM_OUT_ALTERNATE,
- INPUT_VEH_MOVE_LEFT,
- INPUT_VEH_MOVE_RIGHT,
- INPUT_VEH_MOVE_UP,
- INPUT_VEH_MOVE_DOWN,
- INPUT_VEH_GUN_LEFT,
- INPUT_VEH_GUN_RIGHT,
- INPUT_VEH_GUN_UP,
- INPUT_VEH_GUN_DOWN,
- INPUT_VEH_LOOK_LEFT,
- INPUT_VEH_LOOK_RIGHT,
- INPUT_REPLAY_START_STOP_RECORDING,
- INPUT_REPLAY_START_STOP_RECORDING_SECONDARY,
- INPUT_SCALED_LOOK_LR,
- INPUT_SCALED_LOOK_UD,
- INPUT_SCALED_LOOK_UP_ONLY,
- INPUT_SCALED_LOOK_DOWN_ONLY,
- INPUT_SCALED_LOOK_LEFT_ONLY,
- INPUT_SCALED_LOOK_RIGHT_ONLY,
- INPUT_REPLAY_MARKER_DELETE,
- INPUT_REPLAY_CLIP_DELETE,
- INPUT_REPLAY_PAUSE,
- INPUT_REPLAY_REWIND,
- INPUT_REPLAY_FFWD,
- INPUT_REPLAY_NEWMARKER,
- INPUT_REPLAY_RECORD,
- INPUT_REPLAY_SCREENSHOT,
- INPUT_REPLAY_HIDEHUD,
- INPUT_REPLAY_STARTPOINT,
- INPUT_REPLAY_ENDPOINT,
- INPUT_REPLAY_ADVANCE,
- INPUT_REPLAY_BACK,
- INPUT_REPLAY_TOOLS,
- INPUT_REPLAY_RESTART,
- INPUT_REPLAY_SHOWHOTKEY,
- INPUT_REPLAY_CYCLEMARKERLEFT,
- INPUT_REPLAY_CYCLEMARKERRIGHT,
- INPUT_REPLAY_FOVINCREASE,
- INPUT_REPLAY_FOVDECREASE,
- INPUT_REPLAY_CAMERAUP,
- INPUT_REPLAY_CAMERADOWN,
- INPUT_REPLAY_SAVE,
- INPUT_REPLAY_TOGGLETIME,
- INPUT_REPLAY_TOGGLETIPS,
- INPUT_REPLAY_PREVIEW,
- INPUT_REPLAY_TOGGLE_TIMELINE,
- INPUT_REPLAY_TIMELINE_PICKUP_CLIP,
- INPUT_REPLAY_TIMELINE_DUPLICATE_CLIP,
- INPUT_REPLAY_TIMELINE_PLACE_CLIP,
- INPUT_REPLAY_CTRL,
- INPUT_REPLAY_TIMELINE_SAVE,
- INPUT_REPLAY_PREVIEW_AUDIO,
- INPUT_VEH_DRIVE_LOOK,
- INPUT_VEH_DRIVE_LOOK2,
- INPUT_VEH_FLY_ATTACK2,
- INPUT_RADIO_WHEEL_UD,
- INPUT_RADIO_WHEEL_LR,
- INPUT_VEH_SLOWMO_UD,
- INPUT_VEH_SLOWMO_UP_ONLY,
- INPUT_VEH_SLOWMO_DOWN_ONLY,
- INPUT_MAP_POI,
- }
- }
- }
Add Comment
Please, Sign In to add comment