Exemplo n.º 1
0
        private void KeyPress(Synapse.Api.Events.SynapseEventArguments.PlayerKeyPressEventArgs ev)
        {
            if (ev.Player.RoleType != RoleType.Scp106)
            {
                return;
            }

            switch (ev.KeyCode)
            {
            case KeyCode.Alpha1:
                if (!PluginClass.Config.PocketScps)
                {
                    return;
                }
                var player = ev.Player.LookingAt?.GetPlayer();
                if (player == null)
                {
                    return;
                }
                if (player.RealTeam != Team.SCP || player.RoleType == RoleType.Scp106)
                {
                    return;
                }
                player.Position = Vector3.up * -1997;
                break;

            case KeyCode.Alpha2:
                ev.Player.GetComponent <Scp106ReworkScript>().DoPocketAnimation();
                break;

            case KeyCode.Alpha3:
                ev.Player.GetComponent <Scp106ReworkScript>().Stalk(false);
                break;
            }
        }
Exemplo n.º 2
0
        private void OnKeyPress(Synapse.Api.Events.SynapseEventArguments.PlayerKeyPressEventArgs ev)
        {
            if (ev.Player.RoleID != 56)
            {
                return;
            }

            RoleType role;

            switch (ev.KeyCode)
            {
            case KeyCode.Alpha1: role = RoleType.ClassD; break;

            case KeyCode.Alpha2: role = RoleType.Scientist; break;

            case KeyCode.Alpha3: role = RoleType.FacilityGuard; break;

            case KeyCode.Alpha4: role = RoleType.NtfLieutenant; break;

            case KeyCode.Alpha5: role = RoleType.ChaosInsurgency; break;

            case KeyCode.Alpha6:
                var targets = Server.Get.GetPlayers(x => x.RealTeam == Team.MTF || x.RealTeam == Team.CDP || x.RealTeam == Team.RSC).Count;
                ev.Player.SendBroadcast(7, PluginClass.PluginTranslation.ActiveTranslation.Targets.Replace("%targets%", targets.ToString()));
                return;

            default: return;
            }

            (ev.Player.CustomRole as Scp056PlayerScript).SwapRole(role);
        }
Exemplo n.º 3
0
        private void OnKeyPress(Synapse.Api.Events.SynapseEventArguments.PlayerKeyPressEventArgs ev)
        {
#if DEBUG
            if (ev.KeyCode == KeyCode.Alpha7)
            {
                ev.Player.CustomRole = new Scp056PlayerScript();
            }
#endif
            if (ev.Player.RoleID != 56)
            {
                return;
            }

            RoleType role;

            switch (ev.KeyCode)
            {
            case KeyCode.Alpha1: role = RoleType.ClassD; break;

            case KeyCode.Alpha2: role = RoleType.Scientist; break;

            case KeyCode.Alpha3: role = RoleType.FacilityGuard; break;

            case KeyCode.Alpha4: role = RoleType.NtfLieutenant; break;

            case KeyCode.Alpha5: role = RoleType.ChaosInsurgency; break;

            case KeyCode.Alpha6:
                var targets = Server.Get.GetPlayers(x => x.RealTeam == Team.MTF || x.RealTeam == Team.CDP || x.RealTeam == Team.RSC).Count;
                ev.Player.SendBroadcast(7, PluginClass.GetTranslation("targets").Replace("%targets%", targets.ToString()));
                return;

            default: return;
            }

            ev.Player.ChangeRoleAtPosition(role);
            ev.Player.MaxHealth = PluginClass.Config.Scp056Health;
            ev.Player.Ammo5     = 999;
            ev.Player.Ammo7     = 999;
            ev.Player.Ammo9     = 999;
        }