Es.getlivingplayercount

From EventScripts Community Encyclopedia
This article is a stub. Please help by adding to it.



Method: getlivingplayercount

Module: es
Class: (no class)
EventScripts version: 2.0

Method Overview

Table of Contents

Contents


Description

Retrieve the number of living players.

This is the Python equivalent of: http://www.eventscripts.com/pages/es_getlivingplayercount

Arguments

  • () = retrieve the total number living players.

Optional: Team Number: optional parameter to specify which team you want.

  • (2) = retrieve the number living terrorists.
  • (3) = retrieve the number living counter-terrorists.


Examples

  • Retrieve the total number of living players
living_players = es.getlivingplayercount()
es.msg("Number of living players:", living_players)
  • Retrieve the number of living terrorists
living_ts = es.getlivingplayercount(2)
es.msg("Number of living terrorists:", living_ts)

Notes

  • Valve takes a second or two to register a player as fully dead, so this value is not so reliable in player_death, etc.

See Also

blog comments powered by Disqus