PlayerIsSpectator

From Zandronum Wiki
Jump to: navigation, search
Zandronum SkulltagOverlay.png Warning: This feature is Zandronum specific and may not supported by ZDoom and its other child ports!
Documentation may not be accurate, see ACS Functions.

int PlayerIsSpectator (int player)

Usage

Takes one argument, which is the player number it uses and returns the spectator status.

Return value

  • 0 if the player is not a spectator
  • 1 if the player is a true spectator
  • 2 if the player is a dead spectator (when a player was killed and waits for the round to end to respawn)

Examples

 1 Script 1 (int player) DISCONNECT
 2 {
 3     if (!PlayerIsSpectator(player))
 4     {
 5         PrintBold(s: "Someone disconnected.");
 6     }
 7     else if (PlayerIsSpectator(player))
 8     {
 9         PrintBold(s: "Someone became a spectator.");
10     }
11 }