Пример #1
0
        public static async void TdSelTest(BasePlayer player)
        {
            _td1?.Dispose();
            _td2?.Dispose();

            _td1 = new TextDraw(new Vector2(220, 120), "E")
            {
                Selectable   = true,
                UseBox       = true,
                BackColor    = Color.Green,
                BoxColor     = Color.Blue,
                Alignment    = TextDrawAlignment.Right,
                IsApplyFixes = true,
                Proportional = true,
                Shadow       = 3,
                Font         = TextDrawFont.Pricedown,
                Outline      = 2,
                ForeColor    = Color.White,
                Width        = 400f,
                Height       = 400f
            };
            _td2 = new PlayerTextDraw(player, new Vector2(220, 180), "Q")
            {
                Selectable   = true,
                UseBox       = true,
                BackColor    = Color.Green,
                BoxColor     = Color.Blue,
                Alignment    = TextDrawAlignment.Right,
                IsApplyFixes = true,
                Proportional = true,
                Shadow       = 3,
                Font         = TextDrawFont.Pricedown,
                Outline      = 2,
                ForeColor    = Color.White,
                Width        = 400f,
                Height       = 400f
            };

            _td1.Show(player);
            _td2.Show();

            await Task.Delay(5);

            player.SelectTextDraw(Color.Red);

            player.ClickTextDraw += (sender, args) =>
            {
                player.SendClientMessage($"Selected TD: {_td1 == args.TextDraw}");
            };
            player.ClickPlayerTextDraw += (sender, args) =>
            {
                player.SendClientMessage($"Selected PTD: {_td2 == args.PlayerTextDraw}");
            };
            player.CancelClickTextDraw += (sender, args) =>
            {
                player.SendClientMessage("Canceled TD selection");
            };
        }
Пример #2
0
        public static void Testa(BasePlayer player)
        {
            var d = new TextDraw(new Vector2(100, 100), "Diploma", TextDrawFont.Diploma);
            var p = new TextDraw(new Vector2(100, 140), "Pricedown", TextDrawFont.Pricedown);
            var n = new TextDraw(new Vector2(100, 180), "Normal", TextDrawFont.Normal);

            p.Show(player);
            d.Show(player);
            n.Show(player);
        }
Пример #3
0
        public static void Testa(BasePlayer player)
        {
            var d = new TextDraw(new Vector2(100, 100), "Diploma", TextDrawFont.Diploma);
            var p = new TextDraw(new Vector2(100, 140), "Pricedown", TextDrawFont.Pricedown);
            var n = new TextDraw(new Vector2(100, 180), "Normal", TextDrawFont.Normal);

            p.Show(player);
            d.Show(player);
            n.Show(player);
        }
Пример #4
0
        public override void OnRequestClass(PlayerRequestClassEventArgs e)
        {
            ObserveNextVehicle();
            helperTextdraw.Show(this);

            var position = SpawnPositionsHelper.Positions[Id];

            SetSpawnInfo(0, 0, position.Position, position.Angle);

            base.OnRequestClass(e);
        }
Пример #5
0
        public void OnPlayerConnect(Player player, IVehicleRepository vehiclesRepository, IWorldService worldService)
        {
            Console.WriteLine("I connected! " + player.Entity);

            player.AddComponent <TestComponent>();

            _zone.Show(player.Entity);
            _welcome.Show(player.Entity);

            vehiclesRepository.FooForPlayer(player.Entity);

            var obj = worldService.CreatePlayerObject(player, 16638, new Vector3(50, 10, 40), Vector3.Zero, 1000);

            obj.DisableCameraCollisions();
        }
Пример #6
0
 public void OnPlayerConnect(Player player)
 {
     _welcome.Show(player.Entity);
 }