Scripting/Squirrel/Events/Player/onPlayerRequestClass

From VC-MP Wiki

Jump to: navigation, search

This is called when the player is "requesting a skin". Also know as "selecting skins".

Syntax

function onPlayerRequestClass( player, iID, iTeam, iSkin )

Parameters

  • player - The pointer of the player
  • iID - The ID of the skin on the server
  • iTeam - The TeamID of the skin on the server
  • iSkin - The global skin ID

Example

When the players is requesting a skin, he will be spammed.

function onPlayerRequestClass( player, ID, Team, Skin )
{
     MessagePlayer( "Viewing skin #" + Skin, player );
}

or

function onPlayerRequestClass( player, ID, Team, Skin )
{
     Announce("~B~" + GetSkinName( Skin ), player );
}

Notes

The function MessagePlayer was used in in this example. More info about them in corresponding pages.

Related Events

Personal tools
squirrel scripting