SetPedSkin: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (Replaced deprecated with deprecatedwithalt)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
{{Deprecated}}
{{DeprecatedWithAlt|setElementModel|}}
 
Please use [[setElementModel]]


This function changes the skin of a ped.
This function changes the skin of a ped.

Revision as of 14:57, 3 June 2013

Template:DeprecatedWithAlt

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