onPlayerTeamChange

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This is called when a player changes their team.

Syntax

  1. function onPlayerTeamChange( Player player, int old, int new )

Arguments

  • player - The pointer of the player
  • old - The team player was in before the change
  • new - Their new team

Returns

This event does not handle return values.

Example

This message will notify the player which team they just entered.

  1.  
  2. function onPlayerTeamChange( player, old, new )
  3. {
  4. MessagePlayer( "You entered team " + new, player );
  5. return 1;
  6. }
  7.  

Notes

The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox