SetPlayerSkin: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Needs_Checking|Broke I think--[[User:Ransom|Ransom]] 22:22, 10 September 2007 (CDT)}}
{{Needs_Checking|Broke I think. Also why player arg on client only funct?--[[User:Ransom|Ransom]] 22:22, 10 September 2007 (CDT)}}


{{Client function}}
{{Client function}}

Revision as of 03:22, 11 September 2007

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)