SetPlayerArmor
From Multi Theft Auto: Wiki
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. | |
Please use setPedArmor instead. |
This function allows you to set the armor value of a player.
Syntax
bool setPlayerArmor ( player thePlayer, float playerArmor )
Required Arguments
- thePlayer: the player whose armor you want to modify.
- playerArmor: the amount of armor you want to set on the player. Valid values are from 0 to 100.
Returns
Returns true if the armor was changed succesfully. Returns false if an invalid player is specified, or the armor value specified is out of acceptable range.
Example
Click to collapse [-]
ServerThis example removes the armor of a player.
function givePlayerArmor ( player, command ) setPlayerArmor ( player, 100 ) --Set player's armor to 100 when he types the command 'addarmor' end addCommandHandler ( "addarmor", givePlayerArmor ) function removePlayerArmor ( player, command ) setPlayerArmor ( player, 0 ) --Set player's armor to 0 when he types the command 'removearmor' end addCommandHandler ( "removearmor", removePlayerArmor )
See Also
- forcePlayerMap
- getAlivePlayers
- getDeadPlayers
- getPlayerACInfo
- getPlayerAnnounceValue
- getPlayerBlurLevel
- getPlayerCount
- getPlayerFromName
- getPlayerIdleTime
- getPlayerIP
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
FROM VERSION 1.5.7 r19626 ONWARDS
- getPlayerSerial
- getPlayerTeam
- getPlayerVersion
- getPlayerWantedLevel
- getRandomPlayer
- givePlayerMoney
- isPlayerMapForced
- isPlayerMuted
- isPlayerNametagShowing
- isVoiceEnabled
- redirectPlayer
- resendPlayerACInfo
- resendPlayerModInfo
- setPlayerAnnounceValue
- setPlayerBlurLevel
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerMuted
- setPlayerName
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
FROM VERSION 1.5.7 r19626 ONWARDS
- setPlayerTeam
- setPlayerVoiceBroadcastTo
- setPlayerVoiceIgnoreFrom
- setPlayerWantedLevel
- spawnPlayer
- takePlayerMoney
- takePlayerScreenShot