onPlayerSkinChange

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 skin.

Syntax

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

Arguments

  • player - The pointer of the player
  • old - The skin player had before the change
  • new - The new skin

Returns

This event does not handle return values.

Example

This will tell the player if they just changed to a cop skin.

  1.  
  2. function onPlayerSkinChange( player, old, new )
  3. {
  4. if ( new == 1 ) // ID 1 = cop
  5. MessagePlayer( "You are now a cop.", player );
  6. return 1;
  7. }
  8.  

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