So I’m trying to make a friends list on my server (adding, removing, opening friend list, all that stuff), and I’m pretty sure I might be doing something wrong. I also want to figure out how to make each person have their own friends list. I’m just learning skript, so I’m going to make plenty of mistakes, and other random stuff.
Here is an example code for adding a friend:
Here is some code for accepting the friend request:
But I’m wondering if you can add arguments to a list, and remove that specific argument. So if someone could help, that would be greatly appreciated! Thanks
Here is an example code for adding a friend:
Code:
command /friend [add] <player>:
if arg-1 is online // <— this might not be real code idk:
send “%player% has sent a friend request!” to arg-1
send “You sent a friend request to %arg-1%!” to player
else:
send “%arg-1% is not online right now” to player
Here is some code for accepting the friend request:
Code:
command /friend [accept] <player>:
if arg-1 is online:
if {%player%friendslist::*} does not contain arg-1:
send “%player% has accepted your request!% to arg-1
send “You are now friends with %arg-1%”
add arg-1 to {%player%friendslist::*}
add player to {%arg-1%friendlist::*} // I really don’t know what I’m doing
else:
send “%arg-1% is already your friend!”
else:
send “%arg-1% is not online right now”
But I’m wondering if you can add arguments to a list, and remove that specific argument. So if someone could help, that would be greatly appreciated! Thanks