Hello, im trying to make a party system and I stock every parties in a list {parties::*} as a list that contains the players from the party {parties::'random uuid'::'players'} and im a the point where i'm trying to be able to run a command that would delete a specific party but I can't make it work.
If anyone has any idea where Im going wrong please, thank you!
If anyone has any idea where Im going wrong please, thank you!
Code:
if arg-1 is "delete":
if arg-2 is set:
loop {parties::*}: #loop every parties
if contains({parties::%loop-value%::*}, arg-2) is true: #check if loop party contains player arg-2
delete {parties::%loop-value%} #does not work, loop value is a random uuid set on create
#tried deleting {parties::%loop-value%::*} but it delete the players but not the party
else:
loop {parties::*}: #same but it deletes the party of the command runner instead, same problem
if contains({parties::%loop-value%::*}, player) is true:
delete {parties::%loop-value%}
if arg-1 is "deleteall": #this part works, dw about that
delete {parties::*}
send "deleted every parties" to player
Last edited: