Hello everybody. I am trying to make a ticket support system. All the code is done, I just do not find how to define the creator of the ticket that will get his answer. I tried several things, I'm a little lost.
> I would like that with the command /support TEXT, it generates a ticket. This ticket can be answered with /answer IDTICKET TEXT. The player who created the ticket gets the answer.
The player must be anonymous.
Code:
Thank's in advance !
[doublepost=1534983118,1534833096][/doublepost]Nobody has any idea? I still have not found
> I would like that with the command /support TEXT, it generates a ticket. This ticket can be answered with /answer IDTICKET TEXT. The player who created the ticket gets the answer.
The player must be anonymous.
Code:
code_language.skript:
command /support [<text>]:
trigger:
if arg 1 is set:
set {ticketCreator::%player%} to player
set {ticketId::%player%} to "%random integer between 0 and 9999%"
send "&aYour request for help has been sent!"
loop all players:
if loop-player has the permission "Admin":
send "" to loop-player
send "&fA player has applied for help : &e%arg 1%" to loop-player
send "" to loop-player
make console execute command "tellraw %loop-player% {text:""&f» &6&lPROCESS THE REQUEST &f«"",clickEvent:{action:suggest_command,value:""/answer %{ticketId::%player%}% ""},hoverEvent:{action:show_text,value:""&eAnswer""}}"
command /answer [<text>] [<text>]:
trigger:
if {ticketId::%player%} is set:
set {p} to {ticketCreator::%player%}
delete {ticketCreator::%player%}
delete {ticketId::%player%}
send "&aYour reply has been sent!"
send "" to {_p}
send "&c%player% &fresponded to your request for help: &e%arg-text-2%" to {_p}
send "" to {_p}
Thank's in advance !
[doublepost=1534983118,1534833096][/doublepost]Nobody has any idea? I still have not found