1. class test:
    def __init__(self):
    self.Title = "welcome"
    self.Description = "welcome"
    self.Author = "Aparent"
    self.Version = V(1, 0, 0)

    def Init(self):
    command.AddChatCommand("test", self.Plugin, "TestCommand")

    def TestCommand(self, cmd, args, player):
    player.Reply("WE DID IT :D")
    [DOUBLEPOST=1468494339][/DOUBLEPOST]
    Code:
    class test:
        def __init__(self):
            self.Title = "welcome"
            self.Description = "welcome"
            self.Author = "Aparent"
            self.Version = V(1, 0, 0)    def Init(self):
            command.AddChatCommand("test", self.Plugin, "TestCommand")    def TestCommand(self, cmd, args, player):
            player.Reply("WE DID IT :D")
    
     
  2. Because Reply is a method provided by ILivePlayer and the Python extension defaults to the Rust BasePlayer instead of the Covalence ILivePlayer.
     
  3. So it would be:
    Code:
    class test:
        def __init__(self):
            self.Title = "welcome"
            self.Description = "welcome"
            self.Author = "Aparent"
            self.Version = V(1, 0, 0)    def Init(self):
            command.AddChatCommand("test", self.Plugin, "TestCommand")    def TestCommand(self, cmd, args, player):
            BasePlayer.Reply("WE DID IT :D")
     
  4. No, you'll have to use Rust's messaging methods until Covalence support is added for the Python extension.
    rust.SendChatMessage(player, "Prefix/Plugin name", msg)
     
  5. still nothing :(
    Code:
    class test:
        def __init__(self):
            self.Title = "welcome"
            self.Description = "welcome"
            self.Author = "Aparent"
            self.Version = V(1, 0, 0)    def Init(self):
            command.AddChatCommand("test", self.Plugin, "TestCommand")    def TestCommand(self, cmd, args, player):
            rust.SendChatMessage(player, "test", msg)
     
  6. You obviously need to specify the message to send.
     
  7. Code:
    class test:
        def __init__(self):
            self.Title = "welcome"
            self.Description = "welcome"
            self.Author = "Aparent"
            self.Version = V(1, 0, 0)    def Init(self):
            command.AddChatCommand("test", self.Plugin, "TestCommand")    def TestCommand(self, cmd, args, player):
            rust.SendChatMessage(player, msg, "Prefix/Plugin name")
    [DOUBLEPOST=1468503958][/DOUBLEPOST]stil nothing
     
  8. Wulf

    Wulf Community Admin

    The "msg" needs to come from somewhere.
     
  9. so like this

    Code:
    class test:
        def __init__(self):
            self.Title = "welcome"
            self.Description = "welcome"
            self.Author = "Aparent"
            self.Version = V(1, 0, 0)    def Init(self):
            command.AddChatCommand("test", self.Plugin, "TestCommand")    def TestCommand(self, cmd, args, player, msg):
            rust.SendChatMessage(player(msg "Prefix/Plugin name"))
     
  10. Wulf

    Wulf Community Admin

    No, you can't just make up new arguments. ;) The order is wrong too, it'd be self, player, cmd, args.

    The message and player comes from args, which you'd need to get from Rust.
     
  11. im new :/
     
    Last edited by a moderator: Jul 14, 2016
  12. is there away of finding Rust Hooks?
     
  13. Wulf

    Wulf Community Admin

    They're all listed in the Docs at the top of the page.
     
  14. it says to use:
    Code:
        def TestCommand(self, player, cmd, args):
            player.Reply("Test successful!")
    [DOUBLEPOST=1468510062][/DOUBLEPOST]but in the beginning i tried this to no avail
     
  15. Wulf

    Wulf Community Admin

    Code:
        def TestCommand(self, player, cmd, args):
            rust.SendChatMessage(player, "Test successful!")
     
  16. Thanks :D i have been trying to fix it all day :D
    [DOUBLEPOST=1468510373][/DOUBLEPOST]SOLVED