[SOLVED] Message for staff chat

Discussion in 'Skript' started by Trench, Aug 11, 2018.

Thread Status:
Not open for further replies.
  1. Uh ok so I was wondering how you would make like so if you did maybe something with replacing messages but puts into the staff chat? Say if you type /sc it would bring you in the staff chat so you do not have to type /sc (message) if this is possible please let me know! Thanks :D -Silent
     
  2. its pretty easy... just create a command for your /sc and have it set a variable like {staffchat::%player%} and then create an on chat event, if that variable is true cancel the event and send the message to people who have the perm for staffchat
     
  3. Uh how would that be in code because I have tried one thing but it totally failed I think I did the wrong event xD
     
  4. Also I am using a different plugin for the staff chat so I was wondering if I could just make like a command for /staffchat but have an alias /sc then it would just auto type in that chat?
     
  5. You could do something like this
    Code (Text):
    command /sc:
        permission: staff.chat
        trigger:
            if {staffchat::%player%} is not true:
                set {staffchat::%player%} to true
                send "&aSTAFF CHAT ON"
                stop
            if {staffchat::%player%} is true:
                set {staffchat::%player%} to false
                send "&cSTAFF CHAT OFF"
                stop

    on chat:
        if {staffchat::%player%} is true:
            cancel event
            loop all players:
                if loop-player has permission "staff.chat":
                    send "[&bStaffChat&7] &r%player% >> %message%" to loop-player
     
  6. im a little confused by this. Assuming you are meaning to write a skript so when they type in chat it will use the other chat plugin? that seems like an odd way of doing things. Its probably possible, but I wouldn't suggest doing it that way
     
  7. Yeah I was not totally sure if you could do it in skript so I had just found a plugin but this will probably work better thanks!
     
  8. Is there a way to put it for the "staff chat off" to just have a command as /ac for allchat then I can configure the messages?
     
  9. yeah, just write a command, to set the variable to false
     
  10. Ok I will try.. (i have bad skript skills lol)
     
  11. Well I just tried your regular code but it does not do anything?
     
  12. i just tried it and it works.... I don't have anyone on my test server to test with, but did you give yourself the permission "staff.chat" or op yourself?
     
  13. I am opped so it should work..
     
  14. What is it doing and/or not doing?
     
  15. I type /sc and the message does not get sent to me and nothing happens I am still in the normal chat
     
  16. i just tried it. I typed in chat, and it shows in chat.
    Then, I type /sc
    Then type in chat and it shows the staff chat message
    then i type /sc
    and i type in chat, and it shows regular chat
    If you are using another chat plugin, it might be interfering with that.
    [​IMG]

    Also... when you do /sk reload <name of skript>
    is it giving any errors?
     
  17. Well I already removed the staff plugin when I tried to test your code but yeah the messages that you get I do not get weird I will look if maybe something else happened with the other plugin i used to have.
     
  18. Yeah I still cannot find anything that would cause this problem and no errors in console I can send what it does when I type it:
    Code (Text):

    WeFloatDownHere [cd8fe277-65fa-4623-8189-9dc86ffc9272]: /sc
     
  19. And then nothing happens at all so weird :p
     
    • Funny Funny x 1
  20. That is very weird.
    Please answer the following (without saying latest)
    Which version of minecraft are you using?
    Which version/author of Skript are you using?
     
Thread Status:
Not open for further replies.