Пример #1
0
 /// <summary>
 ///     The main constructor.
 /// </summary>
 public WebSwing(SpiderManProfile profile) : base(profile)
 {
     // Request our animations.
     Streaming.RequestAnimationDictionary("skydive@parachute@");
     Streaming.RequestAnimationDictionary("missrappel");
     Streaming.RequestAnimationDictionary("swimming@swim");
     Streaming.RequestAnimationDictionary("move_fall");
     new Model("bmx").Request();
 }
Пример #2
0
 /// <summary>
 ///     The main constructor.
 /// </summary>
 public Melee(SpiderManProfile profile) : base(profile)
 {
     Streaming.RequestAnimationDictionary("melee@unarmed@streamed_core");
     Streaming.RequestAnimationDictionary("anim@mp_snowball");
     Streaming.RequestAnimationDictionary("random@arrests");
     Streaming.RequestAnimationDictionary("swimming@swim");
     Streaming.RequestAnimationDictionary("weapons@projectile@");
     Profile.LocalUser.BlockPermanentEvents = true;
 }
Пример #3
0
 public WallCrawl(SpiderManProfile profile) : base(profile)
 {
     // Request our thingys.
     Streaming.RequestAnimationDictionary("swimming@swim");
     Streaming.RequestAnimationDictionary("move_crouch_proto");
     Streaming.RequestAnimationDictionary("laddersbase");
     Streaming.RequestAnimationDictionary("move_m@brave");
     new Model("w_pi_pistol").Request();
 }
Пример #4
0
 public TazerWebs(SpiderManProfile profile) :
     base(profile)
 {
     Abilities = new List <SpecialAbility>
     {
         new WebZip(profile),
         new WebSwing(profile)
     };
     Streaming.RequestAnimationDictionary("ragdoll@human");
 }
Пример #5
0
 /// <summary>
 ///     The main ctor.
 /// </summary>
 public WebAttachments(SpiderManProfile profile) : base(profile)
 {
     Streaming.RequestAnimationDictionary("guard_reactions");
     Streaming.RequestAnimationDictionary("move_crouch_proto");
     Streaming.RequestAnimationDictionary("amb@code_human_wander_texting@male@base");
     Streaming.RequestAnimationDictionary("weapons@projectile@");
     Streaming.RequestAnimationDictionary("swimming@swim");
     new Model("bmx").Request();
     BackgroundThread.RegisterTick(UpdateAttachments);
 }
Пример #6
0
 public SpiderWebs(SpiderManProfile profile) :
     base(profile)
 {
     Abilities = new List <SpecialAbility>
     {
         new WebSwing(profile),
         new WebZip(profile),
         new WebAttachments(profile)
     };
 }
Пример #7
0
        /// <summary>
        ///     Called in the first tick of the main
        ///     script.
        /// </summary>
        public WebZip(SpiderManProfile profile) : base(profile)
        {
            // Make sure to request rope textures,
            // if they haven't already loaded.
            Rope.LoadTextures();

            // Request our animations.
            Streaming.RequestAnimationDictionary("weapons@projectile@");
            Streaming.RequestAnimationDictionary("move_fall");
            Streaming.RequestAnimationDictionary("swimming@swim");
            Streaming.RequestAnimationDictionary("amb@world_vehicle_police_carbase");
            Streaming.RequestAnimationDictionary("skydive@base");
            Streaming.RequestAnimationDictionary("move_crouch_proto");

            new Model("bmx").Request();
        }
Пример #8
0
        /// <summary>
        ///     Our update method.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnTick(object sender, EventArgs e)
        {
            InitMemory();
            UpdateMenus();

            if (!ModEnabled || _setProfileNull)
            {
                if (!_initAbilities)
                {
                    return;
                }
                StopAllAbilities();
                _initAbilities    = false;
                _spiderManProfile = null;
                _setProfileNull   = false;
                return;
            }

            // Update our player's character in case he changes models.
            if (!Entity.Exists(PlayerCharacter))
            {
                // Set the new ped.
                SetPlayerCharacter();
                StopAllAbilities();
                _initAbilities = false;
            }

            // Initialize our abilities.
            InitAbilities();
            UpdateAbilities();

            Function.Call((Hash)0xC388A0F065F5BC34, Game.Player.Handle, 1f);
            Function.Call(Hash.SET_PLAYER_HEALTH_RECHARGE_MULTIPLIER, Game.Player.Handle,
                          _spiderManProfile.HealthRechargeMultiplier);

            // Stop the player from using/having a parachute.
            StopPlayerFromUsingParachute();
        }
Пример #9
0
        /// <summary>
        ///     The main constructor.
        /// </summary>
        public PlayerController()
        {
            Tick    += OnTick;
            Aborted += OnAborted;
            Interval = 0;

            _scriptComms.Init("Spider-Man Script", "Version 2.0");
            _mainMenu = new UIMenu("Spider-Man Script");
            _menuPool = new MenuPool();
            _menuPool.AddMenu(_mainMenu);

            var files = Directory.GetFiles(".\\scripts\\Spider-Man Files\\Profiles\\", "*.ini");

            foreach (var file in files)
            {
                var profile = new SpiderManProfile(file);
                profile.Init();
                profile.AddToMenu(_mainMenu, _menuPool);
            }

            SpiderManProfile.ProfileActivated += (sender, args, profile) =>
            {
                _spiderManProfile = (SpiderManProfile)profile;
            };

            var deactivateButton = new UIMenuItem("Deactivate Powers");

            _mainMenu.AddMenuItem(deactivateButton);
            _mainMenu.OnItemSelect += (sender, item, index) =>
            {
                if (item == deactivateButton && _spiderManProfile != null)
                {
                    _setProfileNull = true;
                }
            };
        }
 public TrainingWheelsProtocol(SpiderManProfile profile) :
     base(profile)
 {
 }
Пример #11
0
 /// <summary>
 ///     The main constructor.
 /// </summary>
 public StarkTech(SpiderManProfile profile) :
     base(profile)
 {
     // Create's the weapon wheel.
     CreateWheel();
 }
Пример #12
0
 protected SpecialAbility(SpiderManProfile profile)
 {
     Profile = profile;
 }
Пример #13
0
 public WebGrenade(SpiderManProfile profile) : base(profile)
 {
     new Model("w_ex_grenadefrag").Request();
 }
Пример #14
0
 protected Tech(SpiderManProfile profile)
 {
     Profile = profile;
 }
Пример #15
0
 /// <summary>
 ///     Our main constructor.
 /// </summary>
 public Agility(SpiderManProfile profile) : base(profile)
 {
     // These are so that spider-man is more stable
     // while he's falling / running into traffic.
     Profile.LocalUser.IsCollisionProof = true;
 }
Пример #16
0
 public InstantKill(SpiderManProfile profile) :
     base(profile)
 {
     Streaming.RequestAnimationDictionary("melee@unarmed@base");
 }
Пример #17
0
 public MultiDisarm(SpiderManProfile profile) : base(profile)
 {
 }