Solved Making Staffchat On or Off

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

wesnoah3

Active Member
Aug 18, 2017
73
3
8
Skript Version: 1.12
Skript Author: bensku
Minecraft Version: 1.12

Hello, I have already made a staff chat skript but in order to talk in it you must do /staffchat (message). Im wondering if there is a way to do just /staffchat or /staffchat on then all your messages will be in staffchat then when you type /staffchat or /staffchat off you will be able to talk in regular chat again.
Code: https://pastebin.com/AxtiuKVE
 
Something like this should work
code_language.skript:
command /staffchat:
    trigger:
        if {inStaffChat::%player%} is set:
            delete {inStaffChat::%player%}
        else:
            set {inStaffChat::%player%} to true

on chat:
    if {inStaffChat::%player%} is true:
        #do staff chat stuff
 
Something like this should work
code_language.skript:
command /staffchat:
    trigger:
        if {inStaffChat::%player%} is set:
            delete {inStaffChat::%player%}
        else:
            set {inStaffChat::%player%} to true

on chat:
    if {inStaffChat::%player%} is true:
        #do staff chat stuff
Ah, ok, thanks, worked like charm
 
Status
Not open for further replies.