Es.getplayerteam

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



Method: getplayerteam

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

Method Overview

Table of Contents

Contents


Description

Returns the target players team as an integer

Arguments

  • userid  : userid of player to get team of


Examples

import es
 
def player_spawn(event_var):
    team = es.getplayerteam(event_var['userid'])
    name = es.getplayername(ev['userid']
    if team == 2:
        es.msg('%s just spawned as a Terrorist!'%name)
    elif team == 3:
        es.msg('%s just spawned as a Counter-Terrorist!'%name)

Notes

Team ids:

  • 0 = Unassigned
  • 1 = Spectators
  • 2 = Terrorists
  • 3 = Counter-Terrorists

See Also

blog comments powered by Disqus