Skip to content

Getting started | Global player variables

Andrzej edited this page Jun 4, 2025 · 1 revision

What are global player variables?

Imagine these like "road signs" that lead to specific players. Instead of checking each player on the server manually if they are e.g. an SCP, you can just point directly to @scpPlayers, and SER will figure out the rest!

Tip

These are always available for every script, as well as the sermethod command!

Important

These are dynamic variables, which means that their value can change over time.

  GiveItem @scpPlayers Radio
  Wait 1s
❗ DestroyItem @scpPlayers Radio

In this example, when an SCP changed their role before the DestroyItem method is executed, their radio will not be removed, because they are not in @scpPlayers variable anymore. This issue is adressed in Getting started #5 | Local player variables

Convention

  • Player variables like @scpPlayers start with the @ prefix, which tells SER that this value holds players - kinda like pinging people on Discord
  • The part after the @ prefix is called the variable name, which must start with a lowercase letter, but the name can also include uppercase letters and numbers.

How to find available player variables?

Simply run serhelp variables, and you will get a list of all available variables to use.

Note

If there is no global player variable that satisfies your needs (e.g. getting players from room EzGateA), you will need to create a custom local player variable. This issue is adressed in Getting started #5 | Local player variables

Clone this wiki locally