BetterSay

Moved

Total Downloads: 5,081 - First Release: Apr 30, 2015 - Last Update: May 13, 2018

5/5, 14 likes
  1. LaserHydra submitted a new resource:

    Better Say Command - Customize the Say console command output as you want

    Read more about this resource...
     
  2. Wulf

    Wulf Community Admin

  3. Wulf

    Wulf Community Admin

    You should actually add a few more checks in as well to prevent errors on server startup.
    Code:
    function PLUGIN:OnRunCommand(arg)
        if not arg then return end
        if not arg.cmd then return end
        if not arg.cmd.namefull then return end
        if arg.cmd.namefull == "global.say" then
            local prefix = "<size=" .. self.Config.PrefixSize .. ">" .. "<color=" .. self.Config.PrefixColor .. ">" .. self.Config.Prefix .. "</color>" .. "</size>"
            local oldMessage = arg:GetString(0, "text")
            local newMessage = "<size=" .. self.Config.TextSize .. ">" .."<color=" .. self.Config.TextColor .. ">" .. oldMessage .. "</color>" .. "</size>"
            rust.BroadcastChat(prefix, newMessage)
            print(self.Config.Prefix .. ": " .. oldMessage)
            return false
        end
    end
     
  4. Don´t work for me, when i write some text it only shows the first word.
     
  5. Wulf

    Wulf Community Admin

    Use quotes.
     
  6. i get this error :
    Code:
    [5/2/2015 1:34:45 PM] [Oxide] 1:34 PM [Error] Failed to call hook 'OnRunCommand' on plugin 'Better Say'
    File: bettersay.lua Line: 20 attempt to index field 'cmd' (a nil value):
      at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
     
  7. Guys, is it possible to implement the announcement from the administrator on the center of the screen as it could have been done in old rust legacy? :)
     
  8. Im not sure with that. @Wulf is it possible?
     
  9. LaserHydra updated Better Say Command with a new update entry:

    fixed error

     
  10. Wulf

    Wulf Community Admin

    Rust doesn't have notices like Legacy had, at least not yet. Until Garry implements something the server can customize and control, then the best you have is chat messages.
     
  11. Any player can use this command in console. Please fix
     
  12. @Wulf I got a question. Could you open a Conversation with me please? Thanks. Its just a small thing.
     
  13. LaserHydra updated Better Say Command with a new update entry:

    fix

     
  14. I think theres a issue somewhere in this, using rusty for console chat (will test the regular console on my box) I have to either TypeLikeThis or Type_like_this for it to be sent through, any spaces only the first word gets sent, I'll test console in am inute
     
  15. you need to use quotes around it. "Type like this"
    or use the website version of rusty, that one does it automaticly.
    http://tools.bbtracker.net/
     
  16. Nevermind :D
     
  17. :D