1. Help I found the {session.averagePing} it is responsible for ping.
    I can't find what is responsible for online
     
  2. Wulf

    Wulf Community Admin

  3. 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);
    }
     
  4. Wulf

    Wulf Community Admin

    GameManager.Instance.GetPlayerCount() would get you the current player count in Hurtworld.
     
  5. [DOUBLEPOST=1499183935][/DOUBLEPOST]Oh sorry here is the ping

    [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 working
     

    Attached Files:

    Last edited by a moderator: Jul 4, 2017
  6. Wulf

    Wulf Community Admin

    I know those methods work fine, they are used in the Hurtworld extension and plugins daily. Without knowing exactly what "doesn't work" about them on your end, such as any errors... anything you are seeing... etc., then I can't really say.
     
  7. [ChatCommand("online")]
    void cmdsetonline(PlayerSession session, string command)
    {
    Singleton<AlertManager>.Instance.GenericTextNotificationServer($"Players: {GameManager.Instance.GetPlayerCount()}", session.Player);
    }
    [DOUBLEPOST=1499186007][/DOUBLEPOST]Correct?
     
  8. Wulf

    Wulf Community Admin

    Looks fine to me, any errors when compiling or using?
     
  9. Here's the error
     

    Attached Files:

  10. Wulf

    Wulf Community Admin

    You need session.Player.averagePing, not session.averagePing.
     
  11. Uraaaaa works thank you very much =))))))))))))))))))))
     
    Last edited by a moderator: Jul 4, 2017
  12. moving the post...
     
  13. Wulf

    Wulf Community Admin

    Open the game's Assembly-CSharp.dll in a .NET decompiler.
     
  14. oh ok thx :D
     
  15. 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");
            }
        }
    }
     
  16. Wulf

    Wulf Community Admin

    There is no player.Reply for PlayerSession, that's a method from Oxide for IPlayer. You can use hurt.SendChatMessage(player, "Test") instead for a HurtworldPlugin, else convert to a universal Covalence plugin.
     
  17. I have to say thats kinda brain f*** xD
     
  18. Wulf

    Wulf Community Admin

    There are already plugins for ping and player listing by the way, look under the Universal Plugins section.
     
  19. New to Oxide community so I dont know if or where the plugins like home/lootingrate/stacksize are :/
     
  20. Wulf

    Wulf Community Admin

    Hurtworld plugins are under the Hurtworld Plugins section. There are also plugins for Hurtworld under the Universal Plugins section. If you are using the itemv2 branch of Hurtworld, there aren't a lot of Hurtworld-only plugins that work for it right now.