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
Solved Kick / ban with permissions
Discussion in 'Plugin Requests' started by MeatCircus, Jul 2, 2015.
-
Ill see if I find a possibility to do that in the current state
-
Wulf Community Admin
-
Since i have The Forest i will look the possibilities to make a plugin.
-
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
-
Wulf Community Admin
-
-
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
-
My only problem is, that I wont be able to test / debug it as I got no The Forest. :c
-
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();
For banning, we'd probably need a CanUserLogin hook or at least an OnPlayerConnected hook, and manually keep a ban list. -
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
-
[DOUBLEPOST=1435854762][/DOUBLEPOST] -
I got that for you Laser. hit me up when you're online
-
http://steamcommunity.com/id/LaserHydra/
- Laser
[DOUBLEPOST=1435958411,1435927034][/DOUBLEPOST] -
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.
-
Any progress?
-
-
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.
-
Anyone else feel like taking a stab at this?
-