Help creating a report skript

  • 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 am currently trying to create a report skript. I just started and my first goal is to make sure the player that is being reported is online. My first problem that i've run into is I am trying to set "{_allPlayers} to all players but {_allPlayers} can only be set to one object. Even if I do get that to work I don't know how to detect a player name from {_allPlayers}, any help is much appreciated

Code so far: https://pastebin.com/5T6ynpzR
 
You would need to use a list variable {_allPlayers::*}
 
No need to loop
code_language.skript:
if arg-1 is online:
 
Change command line to /report [<player>]
or do
set {_} to arg parsed as an offline player
 
I just changed [<text>] to [<player>] and it worked perfectly but now my question is how do I save and delete this report?
You would need to create an ID system where every time a report is created you get its ID for future references. A global variable that's increased by 1 every time a report is generated. Then, you can just do:

set {reports::%id of the report%} to "%text of the report%" to save a report.
delete {reports::%id of the report%} to delete a report.
 
You would need to create an ID system where every time a report is created you get its ID for future references. A global variable that's increased by 1 every time a report is generated. Then, you can just do:

set {reports::%id of the report%} to "%text of the report%" to save a report.
delete {reports::%id of the report%} to delete a report.
Should I just copy and paste that? And how would I open the report?
 
Status
Not open for further replies.