HelpText

Moved

Total Downloads: 18,186 - First Release: Oct 23, 2014 - Last Update: Feb 3, 2017

4.92105/5, 38 likes
  1. Wulf

    Wulf Community Admin

    Do you have any plugins that actually support it? It only triggers what plugins provide generally unless you set custom help.
     
  2. Comrade you have a default that is loaded
    Code:
    {
      "Settings": {
        "AllowHelpTextFromOtherPlugins": true,
        "CustomHelpText": [
          "custom helptext",
          "custom helptext"
        ]
      },
      "UseCustomHelpText": false
    }
    the command help does not work.
    And if you change the configuration on :
    Code:
    {
      "CustomHelpText": [
        "/help - справка по командам в игре",
        "/friend add имя игрока - добавить в друзья",
        "/friend remove имя игрока - удалить из друзей",
        "/friend list - показать список друзей",
        "/remove - удаление ваших построек",
        "/clan - информация о текущем клане",
        "/c сообщение - отправить сообщенние всем сокланам",
        "/clan create название клана описание - создание нового клана",
        "/clan join название клана - вступить в клан, в который вы были приглашены",
        "/clan leave - покинуть клан",
        "/tpr имя игрока - запросить телепорт к игроку",
        "/tpa - разрешить телепорт",
        "/tpc - отменить телепорт",
        "/home название - телепорт домой",
        "/sethome название - сохранить точку телепорта",
        "/removehome название - удалить точку телепорта",
        "/homelist - показать сохраненные точки домов",
        "/kit - увидеть доступные наборы",
        "/ad on/off - включить или выключить автозакрытие дверей",
        "/pm ник - написать приватное сообщение, /r - ответить на последнее сообщение",
        "/hitmarker on/off - включить или выключить маркер попаданий"
      ],
      "Settings": {
        "AllowHelpTextFromOtherPlugins": "false",
        "UseCustomHelpText": "true"
      }
    }
    Then everything works fine. You have signs and symbols are not correct when you load the plugin.
     
  3. Thanks Gannik! This was making me crazy. You are correct, the default config is messed up.
     
  4. А может кто подсказать, как сделать вводимый текст цветным? Буду благодарен.
    And who can tell how to input text color? I will be grateful.
     
  5. <color=orange>text</color>
     
  6. /help work only for admins... how accord permission for all players?
     
  7. Wulf

    Wulf Community Admin

    The command is available for all players, it just triggers what plugins send or what you have in the config.
     
  8. Any way to save custom as pages not a scroll?
     
    Last edited by a moderator: Jun 27, 2016
  9. Im hoping someone can help me and see where I'm messing up. I dont want the default help from other plugins so I mad my own CustomHelpText. I set AllowHelpTextFromOtherPlugins to false and set UseCustomHelpText to true... but now it dosent work at all? No errors and Rcon says the plugin loaded fine. Ill attack my .json if someone can take a look at it :)
     

    Attached Files:

  10. Everytime somebody uses /help I got this error in console, but help works and everything seems to be printed/shown to player

    Code:
    (23:32:46) | [Oxide] 23:32 [Error] Failed to call hook 'SendHelpText' on plugin 'PlayerInformations v1.2.4' (InvalidCastException: Cannot cast from source type to destination type.)
    (23:32:46) | [Oxide] 23:32 [Debug]   at Oxide.Plugins.PlayerInformations.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
     
  11. Wulf

    Wulf Community Admin

    That's an error with the PlayerInformations plugin, not this one.
     
  12. Ah okay but it only happens when somebody uses /help :) anyway will post it under that plugin ;)
     
  13. custom text not working.. tried it..
     
  14. I made a simple fix (missing JSON "Settings" tag).
     

    Attached Files:

  15. The Problem is that the Plugin write and read other kinds of data structure.

    it writes a Config file like this:
    Code:
    {
            "Settings": {
                    "AllowHelpTextFromOtherPlugins": true,
                    "CustomHelpText": [
                            "custom helptext",
                            "custom helptext"
                    ]
            },
            "UseCustomHelpText": false
    }
    ,but it reads Config files like this:
    Code:
    {
           "Settings": {
                  "AllowHelpTextFromOtherPlugins": true,
                  "UseCustomHelpText": false
           },
           "CustomHelpText": [
                  "custom helptext",
                  "custom helptext"
           ]
    }
    This Problem comes from an little failure in the Code.

    The original code from line 20 to 40:
    Code:
    private void Loaded()
    {
            this.UseCustomHelpText = GetConfig<bool>("Settings","UseCustomHelpText", false);
            this.AllowHelpTextFromOtherPlugins = GetConfig<bool>("Settings","AllowHelpTextFromOtherPlugins", true);
            this.CustomHelpText = GetConfig<List<object>>("CustomHelpText", new List<object>() {
                    "custom helptext",
                    "custom helptext"
            });
    }protected override void LoadDefaultConfig ()
    {
            Config["UseCustomHelpText"] = false;
            Config["Settings","AllowHelpTextFromOtherPlugins"] = true;
            Config["Settings","CustomHelpText"] = CustomHelpText = new List<object>() {
                    "custom helptext",
                    "custom helptext"
            };        SaveConfig();
    }
    ,but to write and read the same data structure, it must be like the following lines
    (corrected by me. I have me orientated by the config-json Example on the Main Page(the variation is reading correctly)):
    Code:
    private void Loaded()
    {
            this.UseCustomHelpText = GetConfig<bool>("Settings","UseCustomHelpText", false);
            this.AllowHelpTextFromOtherPlugins = GetConfig<bool>("Settings","AllowHelpTextFromOtherPlugins", true);
            this.CustomHelpText = GetConfig<List<object>>("CustomHelpText", new List<object>() {
                    "custom helptext",
                    "custom helptext"
            });
    }protected override void LoadDefaultConfig ()
    {
            Config["Settings","UseCustomHelpText"] = false;
            Config["Settings","AllowHelpTextFromOtherPlugins"] = true;
            Config["CustomHelpText"] = CustomHelpText = new List<object>() {
                    "custom helptext",
                    "custom helptext"
            };        SaveConfig();
    }
    @Calytic : Please correct this issue at your next Release.

    An corrected version is Attached
     
  16. Hi i desperatly need help with my server. i have been trying to get this /help command to work but it just isint working. I dont want any help messages from other plugins. HELP ME PLEASE!

    Hellp please!!!!!!!!!! I really cant get it to work even thou i changed the json file!!! WHAT AM I SUPPOSE TO DOO!!!!!!
     
    Last edited by a moderator: Aug 7, 2016
  17. do not change the HelpText.cs (because if you make an update, your settings are gone).
    The right way:
    1. put the HelpText.cs in your yourRustFolder/server/yourServerIdentity/oxide/plugins folder
    2. start your server once
    3. look into your yourRustFolder/server/yourServerIdentity/oxide/config folder, there is an file called HelpText.json (if you use my HelpText.cs, then is this file in the correct structure) This json file is created only if it not exist. So this file is not changed after updating HelpText.cs
      Make all your Settings in the json File!
    4. start your server and be happy :)
    or shortly for you:
    1. the json file should look like the attached file for you: (put this in your yourRustFolder/server/yourServerIdentity/oxide/config)
    2. the normal HelpText.cs : (put this in your yourRustFolder/server/yourServerIdentity/oxide/plugins)
    3. start your server and be happy :)
     

    Attached Files:

  18. Code:
    [08/19/2016 03:28:02] [Oxide] 03:27 [Error] Error while compiling HelpText.cs(59,45): error CS1061: Type `Oxide.Core.Libraries.Covalence.IPlayer' does not contain a definition for `ConnectedPlayer' and no extension method `ConnectedPlayer' of type `Oxide.Core.Libraries.Covalence.IPlayer' could be found. Are you missing an assembly reference?
    last update
     
  19. Fixed version for update with working custom text.
     
  20. I saw update, sorry...