1. Hello
    the date the file has this structure
    Code:
    {
        "7656139123123123": {
        "name": lola,
          "points": 5   
        }    "765611212312312986": {
        "name": begun,
          "points": 23
        
        }
        "76561337923434432": {
         "name": ProInsa,
          "points": 11
        
        }
      }
    how to sort by points the list of names and display them in the chat for the first 5 names?
    1. begun
    2. ProInsa
    3. lola

    I started and stood in a deadlock
    Code:
     var data = Interface.GetMod().DataFileSystem.GetDatafile("qw");[ChatCommand("qw")]
            private void qw(BasePlayer player, string command, string[] args) {
            int n = 0;
                sb.append(n+1).append("name")
            }
     
  2. not to create another topic, I ask here
    how do I display a message in chat that could see all players?
     
  3. Wulf

    Wulf Community Admin

    For the data sorting, it generally defaults to sorting A-z based on the primary keys. I think you can specify other options, but I'm unsure how.

    PrintToChat("Message");
     
    Last edited: Mar 29, 2016
  4. thank you. And if there is the same as sleep or wait?
    I need to do the delay
     
  5. Wulf

    Wulf Community Admin

    Add a timer before it if you need to delay it.
     
  6. how to stop timer? and is it possible to send the server into reboot
     
    Last edited by a moderator: Mar 25, 2016
  7. Wulf

    Wulf Community Admin

    var timer = create your timer here
    timer.Destroy()

    To reboot the server, just send the command to reboot it.
     
  8. you should be given a medal for helping me
    but I do not understand about the restart. what command I need to send from the plugin and where?
     
  9. I am suffering for 2 days, but was unable to display in chat even name
    can anyone help?
     
  10. Wulf

    Wulf Community Admin

    Code:
    rust.RunServerCommand("restart");
    Code:
    [ChatCommand("qw")]
    void CmdQW(BasePlayer player, string command, string[] args)
    {
        SendReply(player, $"Your name is {player.displayName}");
        PrintToChat(${player.displayName} used the qw chat command");
    }