GetIntParam() public method

public GetIntParam ( string paramName ) : int
paramName string
return int
コード例 #1
0
        private static void GetHigh(Skill skill)
        {
            var rng = Random.Range(0, 100);
            SkillEventHandler.Do(x =>
            {
                Function.Call(Hash.SET_TIME_SCALE, rng < 80 ? 0.4f : 0.2f);
                Function.Call(Hash.SET_TIMECYCLE_MODIFIER, rng < 80 ? "phone_cam6" : "phone_cam7");
                var slowTime = skill.GetIntParam("Slow Time");
                if (rng > 80)
                {

                    RPG.Notify(Notification.Danger("Woah, what a hit! HP Lost"));
                    if (Game.Player.Character.Health > 10)
                        Game.Player.Character.Health -= 10;
                    else
                        Game.Player.Character.Health = 5;
                }
               SkillEventHandler.Wait(slowTime);
                Function.Call(Hash.SET_TIME_SCALE, 1f);
                Function.Call(Hash.SET_TIMECYCLE_MODIFIER, "");

            });
        }
コード例 #2
0
        private static void Reinforcement(Skill skill)
        {
            var rng = Random.Range(0, 100);
            SkillEventHandler.Do(x =>
            {
                Function.Call(Hash.SET_TIME_SCALE, rng < 80 ? 0.4f : 0.2f);
                Function.Call(Hash.SET_TIMECYCLE_MODIFIER, rng < 80 ? "phone_cam6" : "phone_cam7");
                var crewSize = skill.GetIntParam("Crew Size");
                var crewHp = skill.GetIntParam("Member HP");
                var crewWeapon = skill.GetStringParam("Weapon");
                var crewWeaponEnum = (WeaponHash)Enum.Parse(typeof(WeaponHash), crewWeapon);

                for (int i = 0; i < crewSize; i++)
                {
                    Model model = PedHash.Security01SMM;
                    model.Request(1000);
                    var ped = World.CreatePed(model, new Vector3(Game.Player.Character.Position.X + 0.5f, Game.Player.Character.Position.Y + 0.5f, Game.Player.Character.Position.Z + 0.5f)+Vector3.RandomXY());
                    RPG.WorldData.AddPed(new NpcObject("ReinforcementsPed_" + i,ped));
                    ped.RelationshipGroup = Game.Player.Character.RelationshipGroup;
                    ped.Health = crewHp;
                    if (crewHp > 20) ped.Armor = 20;
                    ped.Weapons.Give(crewWeaponEnum,1000,true,true);
                    ped.CanSwitchWeapons = true;
                }
            });
        }
コード例 #3
0
        private static void BlazedOffGlory(Skill skill)
        {
            SkillEventHandler.Do(x =>
            {
                Function.Call(Hash.SET_TIMECYCLE_MODIFIER, "phone_cam1");
                var blazeTime = skill.GetIntParam("Blaze Time");
                var damageBuff = skill.GetFloatParam("Damage Buff");

                //set damage to +damageBuff
                Function.Call(Hash.SET_PLAYER_WEAPON_DAMAGE_MODIFIER, Game.Player, 0.5f * (1 + damageBuff));

               SkillEventHandler.Wait(blazeTime);

                //set damage to default
                Function.Call(Hash.SET_PLAYER_WEAPON_DAMAGE_MODIFIER, Game.Player, 0.5f);

                Function.Call(Hash.SET_TIMECYCLE_MODIFIER, "");

            });
        }