1. Hi,

    I'm very new to Oxide coding and I'm new to C.

    In a Rust plugin, I have a message that is presented to the player and I want to present it to all players.

    Existing Player Message:
    Code:
    SendMessage(player, "groupAssigned", usergroup.requirement, Config["serverName"].ToString(), usergroup.usergroup);
    "groupAssigned" is a Registered message as follows

    Code:
    ["groupAssigned"] = "Congratulations, by spending <color={0}>{1} minutes</color> on <color={0}>{2}</color> you have been assigned to the usergroup <color={0}>{3}</color>. Thank you for playing!",
    It's my understanding that I should use Server.Broadcast, but I'm having trouble converting it.

    How might I convert the SendMessage to Server.Broadcast?

    Also, how might I capture the player name and send it back to the registered message like the usergroup.requirement?

    Thanks in advance.
     
  2. SendMessage - custom function that developer of plugin wrote.
    Default methods to send private message:
    player.ChatMessage, or SendReply(player, ...)

    So answer for you question:
    Server.Broadcast(string.Format("groupAssigned", usergroup.requirement, Config["serverName"].ToString(), usergroup.usergroup));
     
  3. lol a literal answer. Obviously after testing that converts it, converts the entire thing to a string, but escapes with the quotes. The custom function is what processes the arguments.