1. How can i stop the console command?
    For example, if player write to console "chat.add" dont realize this command in the game world
     
  2. Wulf

    Wulf Community Admin

    If you simply want to send chat via your own console, just use say. I don't see why you'd need to do that though.

    If you are trying to send a message, you don't need to use chat.add. See http://docs.oxidemod.org/#sendchatmessage.
     
  3. Yes. I know command rust.SendChatMessage(player, name, message, userid).
    But, I want block command "chat.add", if player press key F1, and write this command to console
     
  4. Wulf

    Wulf Community Admin

    Pretty sure only admin can use that command, but I haven't tested.

    You could try this, but I'm pretty sure blocking chat.add will cause some issues with the chat. http://oxidemod.org/resources/command-block.647/

    Otherwise, you could try something like this:
    Code:
    function PLUGIN:OnRunCommand(arg)
        if not arg then return end
        if not arg.connection then return end
        if not arg.connection.player then return end
        if not arg.cmd then return end
        if not arg.cmd.name then return end
        local player = arg.connection.player
        local command = arg.cmd.namefull
        if command == "chat.add" then return false end
    
     
  5. Thank you very much!
    [DOUBLEPOST=1423423910][/DOUBLEPOST]I did so
    Code:
    function PLUGIN:OnRunCommand(arg)
        if not arg then return end
        if not arg.connection then return end
        if not arg.connection.player then return end
        if not arg.cmd then return end
        if not arg.cmd.name then return end
        local player = arg.connection.player
        local command = arg.cmd.namefull
        if command == "chat.add" then return false end
    
    And install command-block...

    chat.add is not blocked =(



    Official Servers too allowed "chat.add"
    [DOUBLEPOST=1423463399,1423416977][/DOUBLEPOST]Command "chat.add" not fixed in arg.cmd.namefull
    [DOUBLEPOST=1423491589][/DOUBLEPOST]this is bug?
     
  6. Wulf

    Wulf Community Admin

    I don't see what your issue is with it. The code is just an example, not a plug and play method. arg.cmd.namefull is not a "fix", it's a variable.
     
  7. arg.cmd.namefill empty when the write command "chat.add"
     
  8. Wulf

    Wulf Community Admin

    Try arg.cmd.name then.
     
  9. empty
    =(
     
  10. You can't block chat.add since that is the client command used to display the message in the actual game ui, basically everything send through "chat.add" is only visible to the player sending it unless it's specifically send to a player through a plugin. So OnRunCommand will never run on the command chat.add
     
  11. Ok. Thank you.
     
  12. Wulf

    Wulf Community Admin

    That was my thought, but I've never tried it. I know you can handle chat.say.