Hey guys so i think i found a way to fake the online player-count for your servers.I will post the code here but it`s not working 100% yet , the Assembly-CSharp.dll still has to be modified but i don't manage to do it. SO if anyone would be nice enough to help me out here, id be really thankful.
Code:
using Facepunch.Steamworks;
using System;
using UnityEngine;
namespace Oxide.Plugins
{
[Info("OnlineFaker", "HAVEFUN", "1.0")]
[Description("Fake it till you make it")]
internal class OnlineFaker : RustPlugin
{
public bool Active = true;
//Starting value fake online
public static int FAKE_ONLINE;
public int test;
//
const int MAX_FAKE_ONLINE = 32;
//Maximum possible fake online
const int MIN_FAKE_ONLINE = 32;
/* // The maximum change in online, when upgrading
const int MAX_STEP_FAKE = 4;
//
The minimum change is online, when updating
const int MIN_STEP_FAKE = -4;*/
static readonly System.Random random = new System.Random();
void OnServerInitialized() => GenerateOnline();
void GenerateOnline()
{
timer.Once(30, GenerateOnline);
test = random.Next(MIN_FAKE_ONLINE, MAX_FAKE_ONLINE);
test = test+BasePlayer.activePlayerLis*****unt;
if (test<Rust.Global.SteamServer.MaxPlayers)
{
FAKE_ONLINE = test;
}
else
{
while(test>=Rust.Global.SteamServer.MaxPlayers)
{
test=test-random.Next(4,9);
}
FAKE_ONLINE = test;
}
}
void OnUpdateServerInformation(string tags)
{
if (BasePlayer.activePlayerLis*****unt >= FAKE_ONLINE || !Active) return;
Rust.Global.SteamServer.GameTags = tags.Replace("cp" + BasePlayer.activePlayerLis*****unt, "cp" + FAKE_ONLINE);
Rust.Global.SteamServer.BotCount = FAKE_ONLINE;
}
int GetFakeOnline()
{
if (BasePlayer.activePlayerLis*****unt >= FAKE_ONLINE || !Active) return BasePlayer.activePlayerLis*****unt;
return FAKE_ONLINE;
}
}
}
thanks in advance if anyone can help me to finish this