SetPlayerSkin

From Multi Theft Auto: Wiki
Revision as of 03:22, 11 September 2007 by Ransom (talk | contribs)
Jump to navigation Jump to search
Dialog-information.png This article needs checking.

Reason(s): Broke I think. Also why player arg on client only funct?--Ransom 22:22, 10 September 2007 (CDT)

Changes the model (skin) of a player.

Syntax

bool setPlayerSkin ( player thePlayer, int id )

Required Arguments

  • thePlayer: Refers to a player whose model (skin) ID will be changed.
  • id: A GTASA player model (skin) ID. List of Character Skins

Example

This code will apply a random skin to a player each time he spawns.

function onSpawnpointUse ( spawnedplayer )                -- When a player uses a maps spawnpoint
    setPlayerSkin ( spawnedplayer, randInt ( 10, 100 ) )  -- Set the spawned player's skin to a random number between 10 and 100
end
addEventHandler ( "onSpawnpointUse", getRootElement ( ), onSpawnpointUse )

See Also

GTASA IDs (vehicles, weapons, weathers, characters, colors): http://info.vces.net/ (Special thanks to Brophy and Ratt for making these lists)