Scripting/Squirrel/Events/Player/onPlayerRequestClass
From VC-MP Wiki
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
- onPlayerJoin
- onPlayerPart
- onPlayerSpawn
- onPlayerDeath
- onPlayerKill
- onPlayerTeamKill
- onPlayerChat
- onPlayerAction
- onPlayerPM
- onPlayerFailedPM
- onPlayerTeamChat
- onPlayerCommand
- onPlayerHealthChange
- onPlayerArmourChange
- onPlayerWeaponChange
- onPlayerCashChange
- onPlayerScoreChange
- onPlayerKeyStateChange
- onPlayerMove
- onPlayerRequestClass
- onPlayerRequestAmmunation
- onPlayerRequestAmmuWeapon
- onPlayerStartSpectating
- onPlayerExitSpectating
- onPlayerRconLogin
- onPlayerRconLoginAttempt
- onPlayerFall
- onPlayerVersion
