GetPlayerSkin: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 13: Line 13:
==Example==
==Example==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
if (spawnPlayer ( player, 1000, 1000, 1000, 90, 650 ) ) then
-- Spawn a player
outputChatBox ( ( "Player's skin ID is: ", getPlayerSkin (player) ), player )
if ( spawnPlayer ( myPlayer, 1000, 1000, 1000, 90, 650 ) ) then
-- Tell the player what skin they've spawned with
outputChatBox ( ( "Your skin ID is: ", getPlayerSkin ( myPlayer) ), myPlayer )
end
end
</syntaxhighlight>
</syntaxhighlight>

Revision as of 16:44, 18 May 2006

This function returns an integer containing the ID number of the selected player's skin.

Syntax

int getPlayerSkin ( player thePlayer )

Required Arguments

  • player: The player whose skin you want to retrieve.

Returns

Returns an int indicating which skin the player has. See player skins.

Example

-- Spawn a player 
if ( spawnPlayer ( myPlayer, 1000, 1000, 1000, 90, 650 ) ) then
	-- Tell the player what skin they've spawned with
	outputChatBox ( ( "Your skin ID is: ", getPlayerSkin ( myPlayer) ), myPlayer )
end