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

    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.
May 22, 2020
1
0
0
23
im having some trouble with a report skript. Im pretty new and i would like some help.

This Is My Skript:

command report [<player>] [<text>]:
trigger:
if arg-1 isn't set:
send "&cUsage: /Report (player) reason)"
if arg-1 is "%player%":
send "&cYou cannot report yourself!"
if arg-2 is "[<text>]":
send "&cYou reported [<player>]"
if player-argument is offline:
send "&7player-argument &cis offline!"
 
im having some trouble with a report skript. Im pretty new and i would like some help.

This Is My Skript:

command report [<player>] [<text>]:
trigger:
if arg-1 isn't set:
send "&cUsage: /Report (player) reason)"
if arg-1 is "%player%":
send "&cYou cannot report yourself!"
if arg-2 is "[<text>]":
send "&cYou reported [<player>]"
if player-argument is offline:
send "&7player-argument &cis offline!"
You must put the tabs where they belong. Try this:
code_language.skript:
command /report [<player>] [<string>]:
    trigger:
        if arg 1 is "%player%":
            send "&cYou cannot report yourself!"
        else if arg 1 is set:
            if arg 2 is set:
                send "You reported &7%arg 1%&f with reason&7 %arg 2%"
                loop all players:
                    if loop-player has permission "report.staff":
                        send "&4%arg 1%&c was reported by &4%command executor%&c with reason:&4 %arg 2%" to loop-player
[doublepost=1590132444,1590132108][/doublepost]Oh! I forgot something about the code. Do this better:
code_language.skript:
command /report [<player>] [<string>]:
    trigger:
        if arg 1 is not set:
            send "&c/report <player> <reason>"
        else if arg 1 is "%player%":
            send "&cYou cannot report yourself!"
        else if arg 1 is set:
            if arg 2 is set:
                send "&fYou reported &7%arg 1%&f with reason:&7 %arg 2%"
                loop all players:
                    if loop-player has permission "report.staff":
                        send "&4%arg 1%&c was reported by &4%command executor%&c with reason:&4 %arg 2%" to loop-player
            else:
                send "&c/report %arg 1% <reason>"
 
Status
Not open for further replies.