Solved StaffChat

  • 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 comminuty!

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

BrettPlayMC

Supporter
Jan 26, 2017
715
53
28
SkUnity Street
Before this thread starts I just wanna say that I am a complete noob in script which is why I request a lot of scripts to be made. Hope you understand! <3
Category: Chat

Suggested name: StaffChat

What I want:
A staff chat script. You know what I mean. :emoji_wink:

Ideas for commands:
/sc (Alias: /staffchat) - Enables staff chat. Run again and it disables staff chat.
You can also do where /sc [message] sends a message in staff chat. Both would be nice but idk if that's possible.

Ideas for permissions:
staffchat.use

When I'd like it by: This week! <3
 
Before this thread starts I just wanna say that I am a complete noob in script which is why I request a lot of scripts to be made. Hope you understand! <3
Category: Chat

Suggested name: StaffChat

What I want:
A staff chat script. You know what I mean. :emoji_wink:

Ideas for commands:
/sc (Alias: /staffchat) - Enables staff chat. Run again and it disables staff chat.
You can also do where /sc [message] sends a message in staff chat. Both would be nice but idk if that's possible.

Ideas for permissions:
staffchat.use

When I'd like it by: This week! <3

Code:
command /staffchat [<text>]:
    permission: staffchat.use
    trigger:
        if arg 1 is "enable" or "on":
            message "&8[&4StaffChat&8] &7You have enabled &4StaffChat&7!"
            set {staffchat.%player%} to true
        else:
            if arg 1 is "disable" or "off":
                message "&8[&4StaffChat&8] &7You have disabled &4StaffChat&7!"
                set {staffchat.%player%} to false

on chat:
    if {staffchat.%player%} is true:
        cancel event
        loop all players:
            if {staffchat.%loop-player%} is true:
                message "&8[&4StaffChat&8] &7%player's nickname% &8>> &f%message%" to loop-player

EDIT: Picture link is http://prnt.sc/e1otog