Inside and Out radius? [duplicate]

I think there is a way to do an inside radius, and an outside radius, but how? I want to have a spawnpoint, where @a[r=30] is in gamemode a, and everyone outside is gamemode s. How would I write this?


Solution 1:

Use the rm (Radius minimum) argument. For example:

/gamemode @a[rm=30] s

In 1.13 the commands are:

gamemode @a[distance=..30] adventure
gamemode @a[distance=30..] survival