Observer turns noclip into an observer mode for staff: a noclipping player is invisible,
not solid, invulnerable and hidden from everyone without the 'moderate' permission.
Entering it requires the 'noclip' permission. A player who leaves observer mode is put back
where they entered it if the observer_reset config is on; plugins can decide that per
player through the ShouldObserverReset hook.
Summary
Hooks
Hooks
Takes a player who dies in observer mode out of it, so that they do not respawn invisible and invulnerable. They are not moved back to where they entered it.
Parameters
- victim Player
- _inflictor Entity
- _attacker Entity
Implements hook PlayerEnterNoclip
On the server
Puts the player into observer mode: noclipping, invisible, not solid, invulnerable and hidden from players without the 'moderate' permission. The previous position, angles, color and move type are kept in actor.observer_data. Requires the 'noclip' permission.
Parameters
- actor Player
Returns
- Boolean always false, which blocks the default noclip
On the client
Blocks the default noclip clientside, since observer mode is handled by the server.
Parameters
- _actor Player
Returns
- Boolean always false
Defined in
Implements hook PlayerExitNoclip
On the server
Takes the player out of observer mode and restores what was saved on entering it. The player is moved back to where they started unless ShouldObserverReset said not to. The weapon is only drawn again when the player carries nothing, since the engine drops the carried object as soon as the weapon is drawn and draws the weapon by itself once the object is let go of. A vanished player stays hidden.
Parameters
- actor Player
Returns
- Boolean always false, which blocks the default noclip
On the client
Blocks the default noclip clientside, since observer mode is handled by the server.
Parameters
- _actor Player
Returns
- Boolean always false
Defined in
Implements hook RegisterPermissions
Registers the 'noclip' permission used by observer mode.
Implements hook ShouldObserverReset
Keeps players where they are when leaving observer mode if the 'observer_reset' config is off.
Parameters
- _actor Player
Returns
- Boolean false if the player should not be moved back, nil otherwise