Solved Giving each loop-player an item

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

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

Maldini

New Member
Mar 24, 2020
6
0
1
24
loop {_survivor::*}:
teleport loop-value to {survivor.spawn}
if {exp.%loop-value%} < 5:
add 1 iron sword to {_survivor::*}'s inventory
add 1 bow of punch 1 to {_survivor::*}'s inventory
add 12 arrows to {_survivor::*}'s inventory
set {_survivor::*}'s helmet to iron helmet
set {_survivor::*}'s chestplate to iron chestplate
if {exp.%loop-value%} >= 5 :
if {exp.%loop-value%} < 10:
add 1 iron sword to {_survivor::*}'s inventory
add 1 bow of punch 1 to {_survivor::*}'s inventory
add 16 arrows to {_survivor::*}'s inventory
set {_survivor::*}'s helmet to iron helmet
set {_survivor::*}'s chestplate to iron chestplate

Hello, im trying to make a skript that gives the survivor different armor based on their level. But when I use this skript it gives me the items of all the players looped. Anyone know how to give each loop-player a different set of armor based on their level.
 
1st. You should format your code so it is indented and easy to read

2nd. Instead of using "set {_survivor::*}'s", just do "set loop-value's"
 
Status
Not open for further replies.