1. LaserHydra

    LaserHydra Grenade Master Plugin Developer

    Hello, im searching for the Player Class of The Forest. ALl I found was BoltEntity and not much more, but that didnt work. Also to print to chat I found ChatInput.textList.Add("This Message")
    but all does not seem to work.
    error CS0246: The type or namespace name `BoltEntity' could not be found. Are you missing an assembly reference? (Idk if im missing an assembly reference maybe)

    error CS0103: The name `ChatInput' does not exist in the current context
    --- Double Post Merged, Jul 21, 2015 ---
    Umm I found something, in TheForest.UI.Multiplayer
    But I can't do
    using TheForest.UI.Multiplayer;
    it tells me
    error CS0246: The type or namespace name `TheForest' could not be found. Are you missing `Oxide.Game.TheForest.Libraries' using directive?
    --- Double Post Merged, Jul 22, 2015, Original Post Date: Jul 21, 2015 ---
    @Wulf you got an idea? :c
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    What does your plugin look like so far?
     
  3. LaserHydra

    LaserHydra Grenade Master Plugin Developer

    Well, i didnt start anything special yet. I wanted to start simple with a message getting broadcasted on plugin load. But also i would need the player class for later tests and the actual plugin i try working on.
    --- Double Post Merged, Jul 22, 2015, Original Post Date: Jul 22, 2015 ---
    @Wulf
    Code (C#):

    using System.Collections.Generic;
    using System.Reflection;
    using System;
    using System.Data;
    using UnityEngine;
    using Oxide.Core;
    using TheForest.UI.Multiplayer;

    namespace Oxide.Plugins
    {
        [Info("Plugin", "LaserHydra", "1.0.0", ResourceId = 0)]
        [Description("Description")]
        class Plugins : TheForestPlugin
        {
            void Loaded()
            {
                BroadcastChat("SERVER", "Plugin loaded!");
            }
            #region UsefulMethods
            //---------------------------->   Converting   <----------------------------//

            string ArrayToString(string[] array, int first)
            {
                int count = 0;
                string output = array[first];
                foreach (string current in array)
                {
                    if (count <= first)
                    {
                        count++;
                        continue;
                    }

                    output = output + " " + current;
                    count++;
                }
                return output;
            }

            //---------------------------->   Chat Sending   <----------------------------//

            void BroadcastChat(string prefix, string msg = null)
            {

                if (msg != null)
                {
                    ChatBox.SendLine("<color=orange>" + prefix + "</color>: " + msg);
                }
                else
                {
                    msg = prefix;
                    ChatBox.SendLine(msg);
                }
            }

            /*void SendChatMessage(ChatBox.Player player, string prefix, string msg = null)
            {
                if(msg != null)
                {
                    SendReply(player, "<color=orange>" + prefix + "</color>: " + msg);
                }
                else
                {
                    msg = prefix;
                    SendReply(player, msg);
                }
               
            }*/


            //---------------------------------------------------------------------------//
            #endregion
        }
    }
     
     
  4. LaserHydra

    LaserHydra Grenade Master Plugin Developer

    @Mughisi maybe you know something about this?
     
    Last edited: Oct 18, 2015