Practical script - Discourage Surface camping
Predefined player variables come in handy!
Aim of the script
Let's create a script that damages all players currently camping on surface, and will broadcast a message to them to stop camping.
Execution
It's very simple! We only need 3 things:
BroadcastmethodDamagemethodA way to specify that we only want to affect players on the surface
The last point can be easily solved using predefined player variables! If you take a closer look at the serhelp variables command output, you will find what we need (as of 28.10.2025):
--- Facility zone variables ---
> @lightContainmentPlayers
> @heavyContainmentPlayers
> @entrancePlayers
> @surfacePlayers
> @otherPlayersThe @surfacePlayers has players which are on the surface!
With that out of the way, we can make a script and add some comments outlining what we want to achieve:
Damaging players
We can begin with the Damage method. Here is its documentation (as of 27.10.2025):
Because we do not want to damage every single player on the server, we cannot use the * character. That's why we will be using the @surfacePlayers variable!
Sending a broadcast
As we have already covered how broadcasts work, we can just add it without more explanation:
Final result

This simple script automatically discourages surface camping.
Last updated