Пример #1
0
 private void SetClass(Synapse.Api.Events.SynapseEventArguments.PlayerSetClassEventArgs ev)
 {
     if (ev.Role == RoleType.Scp106)
     {
         ev.Player.GetComponent <Scp106ReworkScript>().stalkCanBeUsedTime = Time.time + PluginClass.Config.StalkSpawnCooldown;
     }
 }
Пример #2
0
 private void OnSetClass(Synapse.Api.Events.SynapseEventArguments.PlayerSetClassEventArgs ev)
 {
     if (ev.Player.RoleID == 56 && (ev.Player.CustomRole is Scp056PlayerScript script) && !script.Spawned)
     {
         script.Spawned = true;
         ev.Position    = PluginClass.Config.Scp056SpawnPoint.Parse().Position;
     }
 }
Пример #3
0
 private void Player_PlayerSetClassEvent(Synapse.Api.Events.SynapseEventArguments.PlayerSetClassEventArgs ev)
 {
     if (ev.Player.RoleID == 35 && ev.Player.CustomRole is Scp035PlayerScript p && p._target != null)
     {
         ev.Position = p._target.Position;
         ev.Rotation = p._target.transform.rotation.eulerAngles.y;
     }
 }
Пример #4
0
 private void OnSetClass(Synapse.Api.Events.SynapseEventArguments.PlayerSetClassEventArgs ev)
 {
     if (ev.Player.RoleID == 56)
     {
         ev.Position = PluginClass.Config.Scp056SpawnPoint.Parse().Position;
         ev.Items    = PluginClass.Config.Items.Select(x => x.Parse()).ToList();
     }
 }
Пример #5
0
 private void Player_PlayerSetClassEvent(Synapse.Api.Events.SynapseEventArguments.PlayerSetClassEventArgs ev)
 {
     if (ev.Player.RoleType == RoleType.ClassD)
     {
         Random r           = new Random();
         int    SpawnChance = r.Next(0, 101);
         if (SpawnChance <= Plugin.Config.SpawnChance)
         {
             ev.Player.RoleID = 343;
         }
         Spawn343(ev.Player);
     }
 }
Пример #6
0
        private void OnSetClass(Synapse.Api.Events.SynapseEventArguments.PlayerSetClassEventArgs ev)
        {
            Timing.CallDelayed(0.5f, () =>
            {
                if (ev.Player.RealTeam == Team.SCP)
                {
                    ev.Player.GiveTextHint(PluginClass.Translation.ActiveTranslation.Spawn, 7.5f);

                    var config = PluginClass.Config.ScpConfigs?.FirstOrDefault(x => x.Id == ev.Player.RoleID);
                    if (config == null || config.Health < 0)
                    {
                        return;
                    }

                    ev.Player.MaxHealth = config.Health;
                    ev.Player.Health    = config.Health;
                }
            });
        }