From Zandronum Wiki
Jump to navigation Jump to 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 SetDeadSpectator(int playernumber, bool state)


Turns a player that is alive into a dead spectator or vice versa. This function will only effect dead spectators or players that are alive, not true spectators. Also, a player cannot be forced to dead spectators if the game currently isn't in progress (i.e. waiting for players or is in the countdown/results sequences). They may however, be revived at anytime so as long as the game isn't in the results sequence.

If sv_DeadPlayersCanKeepInventory is set, the dead spectator will be resurrected with the inventory he had before he died. If sv_SameSpawnSpot is set, the dead spectator will be resurrected at his current location.


  • playernumber: Number of the player to effect
  • state: The state to set on the effected player (1 DeadSpectator, 0 Alive)


This script will turn the selected player into Dead Spectator if he is alive, or resurrect him if he is a Dead Spectator.

1script 29999 (int pnum)
3  if (PlayerIsSpectator(pnum) == 0) { SetDeadSpectator(pnum,1); }
4  else if (PlayerIsSpectator(pnum) == 2) {  SetDeadSpectator(pnum,0); }