Enzo's Counterstrike Emporium updated 24-sep-06


Team Change Notification - An Eventscript

What it Does

Let's you know if a player joins or leaves your team with a small sound and some text.

Installation

  1. This could use rewriting as it is the oldest, simplest form of an eventscript.
  2. Copy this text into the file cfg/eventscripts/player_team.cfg
// team 2 is T, team 3 is CT
// es_userteam is the previous team index (0 if none)
// team is the new team index
 
// sound if leaving
if (event_var(team) equalto 0) then es_delayed 3 ma_cexec_all playgamesound player/footsteps/mud3.wav
 
// sound if new player
if (event_var(es_userteam) equalto 0) then es_delayed 3 ma_cexec_all playgamesound buttons/blip2.wav
 
// sound if switch team
if (event_var(es_userteam) notequalto 0) then if (event_var(team) notequalto 0) then es_delayed 3 ma_cexec_all playgamesound buttons/bell1.wav
 
// text messages
if (event_var(team) equalto 2) then es_delayed 3 es_msg #lightgreen === event_var(es_username) has joined the Terrorists  ===
if (event_var(team) equalto 3) then es_delayed 3 es_msg #lightgreen === event_var(es_username) has joined the Counter Terrorists ===
if (event_var(team) equalto 0) then es_delayed 3 es_msg #lightgreen === event_var(es_username) has left the building ===