setPedArmor | Multi Theft Auto: Wiki Skip to content

setPedArmor

Client-side
Server-side
Shared

Pair: getPedArmor

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function allows you to set the armor value of a ped. Function also added client-side.

Syntax

setPedArmor ( )

Code Examples

server

This example removes the armor of a player.

function armor (player, command)
if command == "addarmor" then
setPedArmor ( player, 100 ) -- Set player's armor to 100 when he types the command 'addarmor'
elseif command == "removearmor" then
setPedArmor ( player, 0 ) -- Set player's armor to 0 when he types the command 'removearmor'
end
end
addCommandHandler ("addarmor", armor)
addCommandHandler ("removearmor", armor)

See Also