Пример #1
0
        private void Interact()
        {
            RPG.UIHandler.CloseAll();
            Popup.CloseLastPopup();
            var nearbyLoot = PlayerMethods.GetNearbyLoot(2.5f).FirstOrDefault();

            if (nearbyLoot != null)
            {
                RPGMethods.Loot(nearbyLoot);
            }

            var nearestPed = RPGInfo.NearestPed;

            if (nearestPed != null && !Game.Player.Character.IsInCombat)
            {
                var npcObject = RPG.WorldData.Npcs.FirstOrDefault(n => n.IsQuestNpc && n.EntityHandle == nearestPed.Handle);
                if (npcObject != null)
                {
                    if (npcObject.Name == "Matthew" && RPG.PlayerData.Tutorial.PressJToOpenMenu && RPG.PlayerData.Tutorial.BoughtAmmoFromShop && RPG.PlayerData.Tutorial.GetAKill && RPG.PlayerData.Tutorial.UnlockSkillWithSp && RPG.PlayerData.Tutorial.UsingSkills && RPG.PlayerData.Tutorial.SpawnVehicle)
                    {
                        var tut = RPG.GetPopup <TutorialBox>();
                        RPG.PlayerData.Tutorial.TutorialDoneExceptSpeak = true;
                        RPG.PlayerData.Tutorial.SpokeToNpc = true;
                        EventHandler.Do(o =>
                        {
                            tut.Hide();
                        });
                    }

                    RPG.UIHandler.StartDialog(npcObject);
                }
            }
        }
Пример #2
0
        public override void Update()
        {
            Ped player = Game.Player.Character;

            NearestPed   = World.GetNearbyPeds(player, 3).FirstOrDefault();
            NearbyLoot   = PlayerMethods.GetNearbyLoot(2.5f).FirstOrDefault();
            IsWideScreen = Function.Call <bool>(Hash.GET_IS_WIDESCREEN);
            Wait(400);
        }