Skip to content
Axwabo edited this page Mar 2, 2025 · 4 revisions

Player Selection Stack

The selection stack allows users to store multiple lists of players and use them with commands.

When a list of players is pushed onto the stack, it will be the list used with the next command.

See player selectors on how to use the stack with commands.

Additionally, the @stack RA option can be enabled to select players on the stack in the Remote Admin GUI. Execute the raOpt show @stack command to make the option visible.

Example:

  1. stackPush @a - pushes all players onto the stack

  2. stackPush @s - pushes the sender onto the stack (becomes the first list, index 0)

  3. give @stack 0 - gives a janitor keycard to the players in the first list (@s)

    The first list is popped (removed) from the stack. List @a becomes first.

Important

A stack may only contain 1024 lists. There is no limit to how many players an individual list can contain, however, one list cannot contain the same player twice.

Commands

Name Description
stackClear Removes all lists from the selection stack
stackDuplicate Duplicates the given lists, pushing them onto the stack
stackList Shows all lists of players. The topmost (#0) value is shown last
stackPop Removes the topmost (or at given index) list from the stack
stackPush Pushes the given players onto the selection stack
stackReverse Reverses the order of the lists, making the last list the first

Duplication Indexes

Note

Duplication cannot be performed if the amount of list(s) to add would overflow the max stack size of 1024

If no index is specified, the topmost list is duplicated.

all or * will copy the entire stack, doubling its size.

first or f or top or t - same as if no index is specified.

Multiple numeric indexes can be specified at once, separated by any of the following symbols: .,;_+-

The order of added lists will depend on the order which indexes were specified, the last given list landing on the top of the stack.

Index 0 is the topmost (first) list, 1 is second, etc.

Example: stackDuplicate 0,3,4,2 - pushes the first, fourth, fifth, and finally the third list.

Clone this wiki locally