GetPlayerSkin: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
{{Server function}}
__NOTOC__
__NOTOC__
This function returns an integer containing the ID number of the selected player's skin.
This function returns an integer containing the ID number of the specified player's skin.


==Syntax==
==Syntax==
Line 6: Line 7:


===Required Arguments===
===Required Arguments===
*'''player''': The player whose skin you want to retrieve.
*'''player''': The player whose skin ID you want to retrieve.


===Returns===
===Returns===
Line 16: Line 17:
if ( spawnPlayer ( myPlayer, 1000, 1000, 1000, 90, 650 ) ) then
if ( spawnPlayer ( myPlayer, 1000, 1000, 1000, 90, 650 ) ) then
-- Tell the player what skin they've spawned with
-- Tell the player what skin they've spawned with
outputChatBox ( "Your skin ID is: "..getPlayerSkin ( myPlayer ), myPlayer )
outputChatBox ( "Your skin ID is: " .. getPlayerSkin ( myPlayer ), myPlayer )
end
end
</syntaxhighlight>
</syntaxhighlight>

Revision as of 13:36, 19 August 2007

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

Syntax

int getPlayerSkin ( player thePlayer )

Required Arguments

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

Returns

Returns an int indicating which skin the player has. See Character 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

See Also