Esempio n. 1
0
        protected void Outside()
        {
            fringe.OutsideInterior();

            foreach (Apartment apt in entires)
            {
                if (PlayerIsInRangeSquared(apt.EnterOutside, EnterOutsideActivationRange))
                {
                    CurrentApartment = apt;
                    State            = PlayerApartmentState.AtEnterOutside;
                    break;
                }
            }
        }
Esempio n. 2
0
        protected async Task TransitionOutside()
        {
            Screen.Fading.FadeOut(200);
            while (!Screen.Fading.IsFadedOut)
            {
                await Delay(1);
            }

            await TeleportPlayerTo(CurrentApartment.ExitOutside, 1f);

            Game.Player.CanControlCharacter = true;
            Game.PlayerPed.IsInvincible     = false;

            Screen.Fading.FadeIn(200);
            while (!Screen.Fading.IsFadedIn)
            {
                await Delay(1);
            }

            State = PlayerApartmentState.Outside;
        }
Esempio n. 3
0
        protected void BeginTransitionInside(Player owner = null)
        {
            State = PlayerApartmentState.TransitionInside;

            Game.Player.CanControlCharacter = false;
            Game.PlayerPed.IsInvincible     = true;
            Game.PlayerPed.Weapons.Select(PlayerGenerics.Unarmed);

            PlayerGenerics.SetFlag(Game.Player, PlayerFlag.Hidden, true);
            PlayerGenerics.SetFlag(Game.Player, PlayerFlag.BlipHidden, true);

            PlayerInterior.SetInteriorId(Game.Player, CurrentApartment.InteriorId);
            if (owner == null)
            {
                PlayerInterior.SetInterOwnerToMyself(Game.Player);
            }
            else
            {
                PlayerInterior.SetInteriorOwner(Game.Player, owner);
            }
        }
Esempio n. 4
0
        protected void AtEnterOutside()
        {
            // If player stepped outside switch state to outside
            if (!PlayerIsInRangeSquared(CurrentApartment.EnterOutside, EnterOutsideActivationRange))
            {
                CurrentApartment = null;
                State            = PlayerApartmentState.Outside;
                return;
            }

            BeginTransitionInside();

            // Uncomment when lazy tard will make a menu...
            //var playersInside = GetOwnersInsideInterior(CurrentApartment.InteriorId);

            //if (playersInside.Count == 0) {
            //  BeginTransitionInside();
            //} else {
            //  ShowOwnerSelectionMenu(playersInside);
            //}
        }
Esempio n. 5
0
        protected async Task TransitionInside()
        {
            Screen.Fading.FadeOut(200);
            while (!Screen.Fading.IsFadedOut)
            {
                await Delay(1);
            }

            await TeleportPlayerTo(CurrentApartment.EntranceInside, 1f);

            await PlayerInterior.Load(CurrentApartment.InteriorId);

            Screen.Fading.FadeIn(200);
            while (!Screen.Fading.IsFadedIn)
            {
                await Delay(1);
            }

            Game.Player.CanControlCharacter = true;

            State = PlayerApartmentState.Inside;
        }
Esempio n. 6
0
        protected void BeginTransitionOutside()
        {
            State = PlayerApartmentState.TransitionOutside;

            Game.Player.CanControlCharacter = false;
        }