#Using player placeholder in console command

1 messages · Page 1 of 1 (latest)

thorny tangle
#

Hey there, I want to make it so I can give the player a certain crate key every 15 minutes when in a specific region from console. How do I make the console command give it to the player using the placeholder? Here is my skript:
every 15 minutes:
loop all players:
if "%region at loop-player%" contains "sfk":
broadcast "&7All the players in the AFK area have got a reward!"
play sound "entity.experience_orb.pickup" with volume 3 to all players
execute console command "give %player% diamond 10"
The %player% doesn't work, so how do I make it so it work?

lean thorn
#

loop-player

thorny tangle
#

Sorry what do you mean?

lean thorn
#

You're looping all players, you have to use loop-player instead of player

thorny tangle
#

Ok I will try that

#

It gives an error when I changed if "%region at player%" contains "sfk"

weary adder
#

he didnt mean that line

#

check yourr code

gray moat
#

uhhh

#

...

#

This is going to broadcast it however many times there are players in the afk region

#

so if there're five it'll go