The Spawn Point Tool places and removes spawn points. Left click adds a point where the owner stands, facing the way they look, for the group picked in the tool's settings: everyone or a faction. Right click removes the point the owner is aiming at. While the tool is held the existing points are drawn in the world. The tool requires the 'spawnpoints' permission, which each of its actions checks as well.

Summary

Functions

Builds the tool's settings panel: a list of the groups a spawn point can be placed for.

Methods

Adds a spawn point for the selected group at the spot the owner stands on, or the spot on the ground below them when they are in the air.
Removes the spawn point the owner is aiming at: the one their line of sight runs through first, or else the one closest to the spot they are looking at, or else the one they are standing on.

Functions

Builds the tool's settings panel: a list of the groups a spawn point can be placed for.

Parameters

  • panel Panel the tool's control panel

Methods

Adds a spawn point for the selected group at the spot the owner stands on, or the spot on the ground below them when they are in the air.

Parameters

  • _trace Map trace result of the tool owner's aim

Returns

  • Boolean true if the point was added (always true clientside), false if the selected group does not exist or there is no room for a point, nil if the owner is not valid or lacks the 'spawnpoints' permission

Removes the spawn point the owner is aiming at: the one their line of sight runs through first, or else the one closest to the spot they are looking at, or else the one they are standing on.

Parameters

  • trace Map trace result of the tool owner's aim

Returns

  • Boolean true if a point was removed (always true clientside), false if the owner is not aiming at a point, nil if the owner is not valid or lacks the 'spawnpoints' permission

Defined in