#how do I make a runCommand execute for all entities of this const?
1 messages · Page 1 of 1 (latest)
you can use a for loop
So I will need to make a bigger code
The problem is that it should be in if
If (players.getDynamicProperty() > player.getDynamicProperty())
And for that, I'll have to do something more complex...
ooowhh i know how to do that
const players = player.dimension.getPlayers({ location: player.location, maxDistance: 30})
if (players.find(f => f.id == player.id).getDynamicProperty() > player.getDynamicProperty())
wait a minute:v thats just the same
use world.getPlayers instead of player.dimension.getEntities
and then
players.forEach(p => {
p.sendMessage('yeet');
});