Help I found the {session.averagePing} it is responsible for ping.
I can't find what is responsible for online
Solved Getting ping and player count?
Discussion in 'Hurtworld Development' started by ЯЗакон, Jul 4, 2017.
-
Wulf Community Admin
You can either use the API we provide, or see how we do it here:
- Ping: Oxide/Player.cs at develop · OxideMod/Oxide · GitHub
- Player count: Oxide/HurtworldExtension.cs at develop · OxideMod/Oxide · GitHub
-
I do not understand anything = (
Can simply write that instead of that paste: ($"Пинг: {GetPlayerCount}", session.Player);
Instead: GetPlayerCount
to appear online. For example 1 or 5 players
[DOUBLEPOST=1499183569][/DOUBLEPOST]as here:
[ChatCommand("ping")]
void cmdsetexp(PlayerSession session, string command)
{
Singleton<AlertManager>.Instance.GenericTextNotificationServer($"Пинг: {GetPlayerCount}", session.Player);
} -
Wulf Community Admin
-
[ChatCommand("ping")]
void cmdsetexp(PlayerSession session, string command)
{
Singleton<AlertManager>.Instance.GenericTextNotificationServer($"Ping: {session.averagePing}", session.Player);
}
And if you insert instead of session.averagePing | GameManager.Instance.GetPlayerCount() then it does not work
Please look not working why
[DOUBLEPOST=1499184808][/DOUBLEPOST]Ping works but here's online not workingAttached Files:
Last edited by a moderator: Jul 4, 2017 -
-
Wulf Community Admin
-
void cmdsetonline(PlayerSession session, string command)
{
Singleton<AlertManager>.Instance.GenericTextNotificationServer($"Players: {GameManager.Instance.GetPlayerCount()}", session.Player);
}
[DOUBLEPOST=1499186007][/DOUBLEPOST]Correct? -
Wulf Community Admin
-
Attached Files:
-
-
Wulf Community Admin
-
Last edited by a moderator: Jul 4, 2017
-
moving the post...
-
Wulf Community Admin
-
-
I dont know what im doing wrong
Code:using UnityEngine; using Oxide.Core;namespace Oxide.Plugins { [Info("PlayerCount", "Prowiler", 1.0)] public class PlayerCount : HurtworldPlugin { [ChatCommand("players")] private void GetPlayerCount(PlayerSession player, string command) { player.Reply("Test"); } } }
-
Wulf Community Admin
-
I have to say thats kinda brain f*** xD
-
Wulf Community Admin
-
New to Oxide community so I dont know if or where the plugins like home/lootingrate/stacksize are :/
-
Wulf Community Admin