We've moved! Join us as we continue development on our new site at umod.org!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  1. Wulf

    Wulf Community Admin Oxide Developer

    Sure, in the plugin's support thread. ;)
     
  2. What's the best way to print to chat globally with a Steam profile as the Avatar? I can't seem to get one to reliably work. There's a lot of ways in older plugins but these all seem unreliable at best now.
     
  3. rust.BroadcastChat(BasePlayer player, string name, string message, string userId)

    Not 100% if that’s the correct arguments tbf.

    The userId you supply is the steam avatar of the message. (Presuming the player is in the servers /users/ storage)
     
  4. I don't think the player has to be in the servers storage. From what im aware it just fetches it from some steam API.
     
    redBDGR likes this.
  5. Is for example used in that "Player" library:
    Code:
    // Oxide.Game.Rust.Libraries.Player
    public void Message(BasePlayer player, string message, string prefix, ulong userId = 0uL, params object[] args)
    {
        if (string.IsNullOrEmpty(message))
        {
            return;
        }
        message = ((args.Length != 0) ? string.Format(Formatter.ToUnity(message), args) : Formatter.ToUnity(message));
        string text = (prefix != null) ? (prefix + " " + message) : message;
        player.SendConsoleCommand("chat.add", new object[]
        {
            userId,
            text,
            1.0
        });
    }
    In result it's a simple "chat.add" being sent to the clients with parameters, like also the "userId" of that chat-entry.