This is called when a player changes their skin.
- function onPlayerSkinChange( Player player, int old, int new )
- player - The pointer of the player
- old - The skin player had before the change
- new - The new skin
This event does not handle return values.
This will tell the player if they just changed to a cop skin.
- function onPlayerSkinChange( player, old, new )
- if ( new == 1 ) // ID 1 = cop
- MessagePlayer( "You are now a cop.", player );
- return 1;
The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.