コード例 #1
0
 private void OnPlayerChangingRole(ChangingRoleEventArgs ev)
 {
     if (Scp999Manager.IsScp999(ev.Player))
     {
         Scp999Manager.UnMakeScp999(ev.Player);
     }
 }
コード例 #2
0
 private void OnPlayerPickingUpItem(PickingUpItemEventArgs ev)
 {
     if (Scp999Manager.IsScp999(ev.Player))
     {
         ev.IsAllowed = false;
     }
 }
コード例 #3
0
 private void OnPlayerDroppingItem(DroppingItemEventArgs ev)
 {
     if (Scp999Manager.IsScp999(ev.Player))
     {
         ev.IsAllowed = false;
     }
 }
コード例 #4
0
 private void OnPlayerShooting(ShootingEventArgs ev)
 {
     if (Scp999Manager.IsScp999(ev.Shooter))
     {
         var weapon = ev.Shooter.Inventory.items[ev.Shooter.CurrentItemIndex];
         weapon.durability = 1000f;
         ev.Shooter.Inventory.items[ev.Shooter.CurrentItemIndex] = weapon;
     }
 }
コード例 #5
0
 private void OnPlayerShot(ShotEventArgs ev)
 {
     if (Scp999Manager.IsScp999(ev.Shooter))
     {
         ev.Damage = 0;
         var referenceHub = ev.Target.GetComponent <ReferenceHub>();
         if (referenceHub != null)
         {
             var player = Player.Get(referenceHub);
             if (player.Health + Config.HealPerShot <= player.MaxHealth * Config.MaxHealPercent / 100)
             {
                 player.Health += Config.HealPerShot;
             }
         }
     }
 }
コード例 #6
0
 private void OnServerRestartingRound()
 {
     Scp999Manager.Clear();
 }