Solved staffchat ? help...

  • 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.

FlFlxGamer

Member
Feb 7, 2019
28
1
0
command /sc [<text>]:
aliases: staffchat
permission: staffchat.use
permission message: &4You are not a staffer to use this command
trigger:
if arg 1 is not set:
send "&8&m-------------------"
send "&cCorrect command: /sc on &4&lor /sc off"
send "&8&m-------------------"
else:
if arg 1 is set on:
set {staffchat.%player%} to true
send "&8&m-------------------"
send "&8[ ] &9Your staffchat is now &aEnabled !"
send "&8&m-------------------"
if arg 1 is set off:
set {staffchat.%player%} to false
send "&8&m-------------------"
send "&8[ ] &9Your staffchat is now &4Disabled !"
send "&8&m-------------------"
on chat:
if {staffchat.%player%} is true:
cancel event
loop all players
if {staffchat.%loop-player%} is true:
send "&8 [ &4Staff &8] &4%player's nickname%>> &9%message%" to loop-player
[doublepost=1549546902,1549546862][/doublepost]sorry if i wrote somthing that i haven't to write but im new in the site so yeah
 
code_language.skript:
command sc [<text>]:
    aliases: staffchat
    permission: staffchat.use
    permission message: &4You are not a staffer to use this command
    trigger:
        arg = "on" or "enable":
            set {staffchat.%player%} to true
            send "&8&m-------------------"
            send "&8[ ] &9Your staffchat is now &aEnabled !"
            send "&8&m-------------------"
        else if arg = "off" or "disable":
            clear {staffchat.%player%}
            send "&8&m-------------------"
            send "&8[ ] &9Your staffchat is now &4Disabled !"
            send "&8&m-------------------"
        else:
            send "&8&m-------------------"
            send "&cCorrect command: /sc on &4&lor /sc off"
            send "&8&m-------------------"

chat:
    {staffchat.%player%} is set
    cancel event
    send "&8 [ &4Staff &8] &4%player's nickname%>> &9%message%" to all players where [input has permission "staffchat.use"]
Here you go, @FlFlxGamer, hope this helps.
 
@FlFlxGamer You have to put the code into the popup menu, not after it. If you want to edit it afterwards (without the popup menu), put it inbetween [.CODE=SKRIPT] and (so here the code should be) [/CODE] (not here)
 
Status
Not open for further replies.