SetPedSkin

From Multi Theft Auto: Wiki
Revision as of 20:57, 23 February 2010 by Ca11um (talk | contribs) (Added example and added to Deprecated category.)
Jump to navigation Jump to search


Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does.

Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does.

This function changes the skin of a ped.

Syntax

bool setPedSkin ( ped thePed, int skinID )

Required Arguments

  • thePed: The ped whose model will be changed.
  • skinID: A GTASA player model (skin) ID. See Character Skins.

Example

Click to collapse [-]
Server

This example sets a players skin to the cop skin when they spawn.

function setCopSkin ()
	setPedSkin ( source, 280 )
	outputChatBox ( "You are now a cop.", source, 255, 0, 0 )
end
addEventHandler ( "onPlayerSpawn", getRootElement(), setCopSkin )

See Also