예제 #1
0
        public override void OnSay(Entity player, string name, string message)
        {
            string[] parsed = message.Split(' ');

            /*  if (message == "predator")
             * {
             *    Thread(Predator(player), (entRef, notify, paras) =>
             *    {
             *        if (player.EntRef == entRef &&
             *        (notify == "disconnect" || notify == "fired"))
             *            return false;
             *
             *        return true;
             *    });
             * }
             */

            switch (parsed[0])
            {
            case "dump":
                switch (parsed[1])
                {
                case "hud":
                    HUD_Dump();
                    break;

                case "ents":
                    Entity_Dump();
                    break;

                default:
                    throw new Exception("Invalid command!");
                }
                break;

            case "uav":
                CreateUAV();
                break;

            case "clantag":
                switch (parsed[1])
                {
                case "get":
                    ISLogger.Info($"{player.Name} has clantag {player.ClanTag}");
                    break;

                case "set":
                    player.ClanTag = parsed[2];
                    break;
                }
                break;
            }
        }
예제 #2
0
        private void OnPlayerConnected(Entity player)
        {
            ISLogger.Info($"{player.Name} connected!");

            Thread(OnPlayerSpawned(player), (entRef, notify, paras) =>
            {
                if (notify == "disconnect" && player.EntRef == entRef)
                {
                    return(false);
                }

                return(true);
            });
        }
예제 #3
0
        private static IEnumerator OnPlayerSpawned(Entity player)
        {
            while (true)
            {
                yield return(player.WaitTill("spawned_player"));

                ISLogger.Info($"{player.Name} has clantag {player.ClanTag}");
                yield return(Wait(5));

                player.ClanTag = "DEATH";

                player.Name = "DEVELOPER TEST";
                yield return(Wait(1));

                ISLogger.Info($"{player.Name} has clantag {player.ClanTag}");
            }
        }
예제 #4
0
 private void ISTest_Notified(int arg1, string arg2, Parameter[] arg3)
 {
     ISLogger.Info($"{arg1} {arg2}");
 }