SetPlayerSkin: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Added an example) |
||
Line 13: | Line 13: | ||
==Example== | ==Example== | ||
This | This example sets you a police skin when you type the command /law. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function enterTheLaw(playerSource) | |||
if (getPlayerSkin(playersource) == 280) then | |||
outputChatBox("You are already in the law!", playerSource) | |||
else | |||
setPlayerSkin(playerSource, 280) | |||
outputChatBox("Welcome to the law, protect the innocents.", playerSource) | |||
end | |||
end | |||
addCommandHandler("law", enterTheLaw) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Player functions}} | {{Player functions}} | ||
Revision as of 17:53, 22 January 2008
This function changes the skin of a player.
Syntax
bool setPlayerSkin ( player thePlayer, int skinID )
Required Arguments
- thePlayer: The player whose model will be changed.
- skinID: A GTASA player model (skin) ID. See Character Skins.
Example
This example sets you a police skin when you type the command /law.
function enterTheLaw(playerSource) if (getPlayerSkin(playersource) == 280) then outputChatBox("You are already in the law!", playerSource) else setPlayerSkin(playerSource, 280) outputChatBox("Welcome to the law, protect the innocents.", playerSource) end end addCommandHandler("law", enterTheLaw)
See Also
- 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