SetPlayerSkin: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
<syntaxhighlight lang="lua">root = getRootElement () | <syntaxhighlight lang="lua">root = getRootElement () | ||
addEventHandler ( "onSpawnpointUse", root, "onSpawnpointUse" ) | addEventHandler ( "onSpawnpointUse", root, "onSpawnpointUse" ) | ||
function onSpawnpointUse ( player ) --When a player uses a | function onSpawnpointUse ( player ) --When a player uses a maps spawnpoint | ||
setPlayerSkin ( player, randInt ( 10, 100 ) ) --Set the joined player's skin to a random number between 10 and 100 | setPlayerSkin ( player, randInt ( 10, 100 ) ) --Set the joined player's skin to a random number between 10 and 100 | ||
end</syntaxhighlight> | end</syntaxhighlight> |
Revision as of 22:10, 14 June 2006
Changes the model (skin) of a player
Syntax
bool setPlayerSkin ( element player, int id )
Required Arguments
- Player: Refers to a player whos model (skin) ID will be changed.
- ID:: A GTASA player model (skin) ID. Link below to all valid GTASA model (skin) IDs.
Example
Explain what the example does here
root = getRootElement () addEventHandler ( "onSpawnpointUse", root, "onSpawnpointUse" ) function onSpawnpointUse ( player ) --When a player uses a maps spawnpoint setPlayerSkin ( player, randInt ( 10, 100 ) ) --Set the joined player's skin to a random number between 10 and 100 end
See Also
GTASA IDs (vehicles, weapons, weathers, characters, colors): http://info.vces.net/ (Special thanks to Brophy and Ratt for making these lists)
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState