Ejemplo n.º 1
0
        private void SetupClientOnConnect()
        {
            this.ClearChat();
            SendClientMessage(Color.White, "SERWER: Witaj {0} na serwerze Mrucznik RolePlay!", Name);
            if (PlayerHelpers.IsNameFormatCorrect(Name) == false)
            {
                SendClientMessage(Color.Red, "SERWER: Twój nick jest niepoprawny! Nick musi posiadać formę: Imię_Nazwisko!");
                Kick();
            }
            ToggleClock(true);
            var sounds = new[] { 1187, 171, 176, 1076, 1187, 157, 162, 169, 178, 180, 181, 147, 140 };

            PlaySound(sounds[new Random().Next(sounds.Length)]);
            Task.Delay(1000).ContinueWith(t =>
            {
                if (!IsConnected)
                {
                    return;
                }

                Position       = new Vector3(-2819.9297f, 1134.0607f, 26.0766f);
                Angle          = 326.0f;
                CameraPosition = new Vector3(-2801.6691f, 1151.7545f, 31.5482f);
                SetCameraLookAt(new Vector3(-2819.05078f, 1141.4909f, 23.3147f));
            });
            ShowAuthFlow();
        }