1. Code:
    class Broadcaster:
        def __init__(self):
            self.Title = "Broadcaster"
            self.Description = "Easy Broadcasting"
            self.Author = "NoSharp"
            self.Version = V(0, 1, 0)    def Init(self):
            command.AddChatCommand("Broadcast %s", self.Plugin, "B")
               
        def B(self, server, cmd, args):
            rust.SendChatMessage(server, "%s")
     
  2. Wulf

    Wulf Community Admin

    First, you'd need to set an actual chat command, as "Broadcast %s" wouldn't be valid. A valid example could be "broadcast" or similar.

    Next, you can get the chat from the args, such as args[0] or by joining all the args together (it's a list essentially.)
     
  3. so like:
    class Broadcaster:
    def __init__(self):
    self.Title = "Broadcaster"
    self.Description = "This example illustrates how to use a basic configuration file"
    self.Author = "NoSharp"
    self.Version = V(0, 1, 0)

    def Init(self):
    command.AddChatCommand("Broadcast", self.Plugin, "B")

    def B(self, server, cmd, args):
    rust.SendChatMessage(server, "args[0]")
     
  4. args[0] is not meant to be a string, remove the "". This will not actually send a chat message to the server, for that, you need the rust.BroadcastChat(string chatname, string message) method.
     
  5. but without the "" around args[0]
     
  6. Your "server" variable is actually referencing the BasePlayer that is running the command (you). I'd change it back to player to avoid confusion. ;)