Player Report

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

lunarenzox

Member
May 13, 2018
17
0
0
21
hello guys, can any one make a skript that can report any player like /report (player) (reason), and make it to notified by staff if they have permissions, also make a history of a player that only staff can check
 
code_language.skript:
command /report [<player>] [<text>]:
    description: Main Report Command
    permission: command.report
    permission message: You don't have permission to do this
    trigger:
        if arg-1 isn't set:
            send "Error, you must specify a player"
        else if arg-2 isn't set:
            send "You must specify a reason"
        else if arg-2 isn't "Fly" or "Speed" or "Aura" or "KillAura":
            send "Error, that is not a valid Reason"
            send "Reasons: Fly, Speed, KillAura"
        else:
            add arg-2 to {Reports::%arg-1's uuid%::*}
            send "Successfully reported %arg-1%, Thanks for the report"
            send "Note: False reports will be punished"
            loop all players:
                if loop-player has permission "report.staff":
                    send "ALERT! %player% has reported %arg-1% for %arg-2%" to loop-player
                    send "To check the logs, type /checkreport [Player]" to loop-player
    
command /checkreport [<offline player>]:
    description: Main Report Checking Command
    permission: report.staff
    permission message: You don't have permission to do this
    trigger:
        if arg-1 isn't set:
            send "You must specify a user"
        else:
            send "Viewing Report Status of: %arg-1%"
            send ""
            loop {Reports::%arg-1's uuid%::*}:
                send "##%loop-index% - %loop-value%"
            send ""
            send "Total Reports Made: %size of {Reports::%arg-1's uuid%::*}%"

NOTE: This has not been tested