コード例 #1
0
        private void Server_SendingConsoleCommand(Exiled.Events.EventArgs.SendingConsoleCommandEventArgs ev)
        {
            //if (!ev.Allow) return;

            if (ev.Name.Equals("drop") || ev.Name.Equals("throw"))
            {
                ev.Allow = false;
                Inventory inv = ev.Player.GameObject.GetComponent <Inventory>();
                if (inv != null)
                {
                    int index = inv.GetItemIndex();
                    if (index == -1)
                    {
                        ev.ReturnMessage = "Buddy, you should be holding an item...";
                        return;
                    }

                    whoThrew = ev.Player.Id;
                    inv.CallCmdDropItem(index);
                    ev.ReturnMessage          = "Rude boi throwing items at people smh";
                    inv.NetworkitemUniq       = -1;
                    inv.Network_curItemSynced = ItemType.None;
                }
            }
        }
コード例 #2
0
 private void ServerEvents_SendingConsoleCommand(Exiled.Events.EventArgs.SendingConsoleCommandEventArgs ev)
 {
     if (ev.Name.ToLowerInvariant() == "sshelp")
     {
         ev.ReturnMessage = $"Scattered Survival Mode v{Version}\n" +
                            "Class D will spawn randomly in Entrance and Light Containment Zone.\n" +
                            "\n" +
                            "SCP win if the player's lives reach 0. Lives are shared between everyone.\n" +
                            (Config.EnableGeneratorWinCondition ? "Players win by killing the SCP or activating all 5 generators.\n" : "Players win by killing the SCP\n") +
                            "\n" +
                            "-Items will spawn randomly across the map.\n" +
                            "-Decontamination and nuke are disabled.\n" +
                            "-SCP914 is disabled.\n" +
                            "-Unless all 5 generators are active, dead SCP will respawn as SCP079. SCP079 does not need to be killed to win.\n" +
                            (Config.EnableHalfHpFemurBreaker ? "-SCP106 pelvis breaker no longer kills 106. Instead, it reduces their current HP by half.\n" : string.Empty);
         ev.Allow = true;
     }
 }