1. I play a lot of Forest and like to host co op games but doing it publicly can suck if you have a griefer who wants to keep killing you with an axe. So either a way to kick and/or ban people would be great or a way to disable ff would be nice also
     
  2. Ill see if I find a possibility to do that in the current state :)
     
  3. Wulf

    Wulf Community Admin

    You should be able to kick/ban using native calls.
     
  4. Since i have The Forest i will look the possibilities to make a plugin.
     
  5. lol Wulf you forgot you're talking to someone who needed your help once just to fix one of my screwed up configs. I have no idea what using native calls are unless you're talking about calling the natives that keep trying to eat me in the game :)
     
  6. Wulf

    Wulf Community Admin

    I was replying to LaserHydra. ;)
     
  7. I just wanted to write what Wulf did. Here right above But Wulf is always the quickest to respond ^^ hes just WULF
     
  8. I tested a mod for a guy a while back that had made a kick ban feature and a player list but it involved replacing a dll file
     
  9. My only problem is, that I wont be able to test / debug it as I got no The Forest. :c
     
  10. Wulf

    Wulf Community Admin

    You may be able to use something from the below code.

    Code:
        private void OnGUI()
        {
            if (BoltNetwork.isServer)
            {
                GUILayout.BeginArea(new Rect((float)(Screen.width - 200 - 10), 10f, 200f, (float)(Screen.height - 20)));
                IEnumerator<BoltEntity> enumerator = BoltNetwork.entities.GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        BoltEntity current = enumerator.Current;
                        if (!current.StateIs<IPlayerState>())
                        {
                            continue;
                        }
                        GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                        GUILayout.Label(current.GetState<IPlayerState>().name, new GUILayoutOption[0]);
                        if (GUILayout.Button("Kick", new GUILayoutOption[] { GUILayout.Width(50f) }))
                        {
                            current.source.Disconnect();
                        }
                        GUILayout.EndHorizontal();
                    }
                }
                finally
                {
                    if (enumerator == null)
                    {
                    }
                    enumerator.Dispose();
                }
                GUILayout.EndArea();       
    The call appears to be to player:BoltConnection.Disconnect().

    For banning, we'd probably need a CanUserLogin hook or at least an OnPlayerConnected hook, and manually keep a ban list.
     
  11. Damnit I had a copy in my steam inv and just gave it to someone last night. I get paid Friday, if you want I'll get you a copy for helping out
     
  12. Would be awesome!
    [DOUBLEPOST=1435854762][/DOUBLEPOST]
    So I would propably use that for kicking, and then write a script which adds ppl do a datatable and doesnt let those people join for ban. Any idea how to block a player on connect? Is there already the hook OnPlayerConnected or OnPlayerApprove?
     
  13. I got that for you Laser. hit me up when you're online
     
  14. Im here. This is my steam:
    http://steamcommunity.com/id/LaserHydra/
    - Laser :)
    [DOUBLEPOST=1435958411,1435927034][/DOUBLEPOST]
    Thanks, gonna see what I can do! Im finally home....
     
  15. Had no time to work on it yet sadly. Im Sorry. Also this Weekend I wont be here. Ill see that I get to do it next week.
     
  16. Any progress?
     
  17. LaserHydra is offline for many days. So probably he went somewhere.
     
  18. Yeah I was not at home for a few days. Im sorry for that. I will go back into it, and just start over with this.
     
  19. Anyone else feel like taking a stab at this?
     
  20. Does not seem like anyone else is currently wanting to develope for The Forest. I decided to maybe wait some time until its Oxide is having more features. And I maybe finally am able to find out what I need.